Adam Bien's Weblog
AJAX, SOAP, NoSQL, EJB--All Wrong Acronyms
Most of the popular acronyms are wrong:
- SOAP (Simple Object Access Protocol): is neither simple nor object oriented. "SOAP originally stood for 'Simple Object Access Protocol' but this acronym was dropped with Version 1.2 of the standard.[2] Version 1.2 became a W3C recommendation on June 24, 2003. The acronym is sometimes confused with SOA, which stands for Service-oriented architecture, but the acronyms are unrelated…" http://en.wikipedia.org/wiki/SOAP
- AJAX (Asynchronous JavaScript and XML): Most of AJAX applications are using JSON, not XML. AJAX' core component is the
XMLHttpRequestJavaScript object / browser API. WithoutXMLHttpRequestwould be hard to implement an AJAX application... - NoSQL: "… Some authors refer to them as "Not only SQL" to emphasize that some NoSQL systems do allow SQL-like query language to be used…" https://en.wikipedia.org/wiki/NoSQL. …and often the offered NoSQL query language is structured and very similar to SQL :-)
- EJB (Enterprise Java Beans): Well designed JavaBeans are actually not well designed EJBs.
- YAGNI there should be no acronym for that. Thinking about that may cause endless loops :-)
See you at Java EE Workshops at MUC Airport!
Posted at 11:45AM May 15, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[0] | Views/Hits: 3040
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienMaven: Lifecycle Hooks Lead To Infrequent Integrations
You could build, test and deploy the entire Java EE Application and even create a working application server from scratch with a single mvm clean install command. The only problem is: it will take forever and you will have to repeat the whole process over and over again, even if you were only interested in particular build steps.
If mvm clean install would just execute the unit tests, your feedback will be significantly faster. Instead of waiting hours, you get the first results in seconds.
A series of composable jobs, each executing a goal or maven plugin, could be realized with http://jenkins-ci.org, or a simple shell / batch script on the developer's machine.
Instead of executing all plugins at once by hooking them to the lifecycle, you could implement a series of chained together jobs. E.g.
- Job:
mvm clean install - Job:
mvn failsafe:integration-test - Job: server setup
- Job: deployment
- Job: system test execution
- Job: quality assurance
- Job: promotion
- Job: tagging / release
- ...
The faster the feedback, the more valuable it gets. A monolithic mvn clean install leads to too long builds, less feedback and becomes less valuable for Continuous Integration. CI degrades to nightly builds…
Just start with an essential setup essential and not with a super-pom.
[See also an in-depth discussion in the "Real World Java EE Night Hacks--Dissecting the Business Tier" book, page 136 in, chapter "Continuous Integration and QA"]
See you at Java EE Workshops at MUC Airport (Effective JavaEE)!
Posted at 05:35AM May 13, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[2] | Views/Hits: 1511
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienReal World Java EE - Devoxx 2012 Session is Online
Watch @parleys
See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.
Thanks for watching and see you at Java EE Workshops at MUC Airport!
Posted at 10:09PM May 07, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[3] | Views/Hits: 2615
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienEssential Vaadin 7 / Java EE Maven 3 POM
With an additional Maven 3 dependency and three dependencies in total, you can integrate Vaadin 7 with your Java EE 6/7 backend in an efficient way. No XML configuration or any other configuration is needed.
With the cdi-integration you can not only inject EJBs and CDI managed beans directly to the UIs and views, but also expose the view with a single annotation:
import com.vaadin.cdi.CDIUI;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import javax.inject.Inject;
@CDIUI
public class WelcomePage extends UI {
@Inject
ReceptionService service;
@Override
protected void init(VaadinRequest request) {
setSizeFull();
String message = service.welcome();
Label label = new Label(message);
setContent(new HorizontalLayout(label));
}
}
@Stateless
public class ReceptionService {
public String welcome() {
return "Hello, Developer! No XML, No Configuration, and it works!";
}
}
The pom.xml is based on a minimalistic Java EE template enhanced with three additional dependencies to Vaadin mentioned before:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.airhacks</groupId>
<artifactId>vaadin-with-javaee-pom</artifactId>
<version>1.0-SNAPSHOT</version>
<url>http://airhacks.com</url>
<packaging>war</packaging>
<name>vaadin-with-javaee-pom</name>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-cdi</artifactId>
<version>1.0.0.alpha1</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
<version>7.0.4</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
<version>7.0.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
A deployable Java EE project was pushed into https://github.com/AdamBien/vaadin-with-javaee-pom/
See you at Java EE Workshops at MUC Airport (particularly at JavaEE UI workshop)!
Posted at 09:08PM Apr 30, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[3] | Views/Hits: 2023
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienA Minimalistic POM For JavaEE 6/7
The essential pom for JavaEE projects is < 40 lines of xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.airhacks</groupId>
<artifactId>javaee-essentials-pom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
The war plugin has only has to be added to make web.xml optional :-). If you need a web.xml (for JAX-RS or Servlets web.xml is not needed), you can remove the war plugin as well.
The pom.xml was also checked-in into: https://github.com/AdamBien/javaee-essentials-pom
If you are planning to write tests (:-)), you should replace the javaee-web-api dependency with an actual server implementation.
See you at Java EE Workshops at MUC Airport (Maven is discussed in the "Effective JavaEE" workshop)!
Posted at 07:20AM Apr 27, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[6] | Views/Hits: 2453
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienExceptions Are Objects
Exceptions are objects and should be treated as such. Organizing exceptions in an exception(s) package
is problematic. Consequently you would also have to create packages for classes, interfaces, beans etc.
Usually you are not searching for classes, interfaces or exceptions during the development cycle, rather than for functionality first. It is a better idea to organize the code after domain responsibilities and not obvious nature. Also it easily possible to find exceptions with any modern IDE regardless of their location: all exceptions have to inherit from java.lang.Exception
See you at Java EE Workshops at MUC Airport, particularly Effective JavaEE and JavaEE Architectures!
Posted at 05:47AM Apr 25, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[2] | Views/Hits: 2323
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBien1h With Enterprise JavaFX 8--JAX 2013 Session [German]
Dependency Injection, Inversion of Control, Maven, CSS 3 and WYSIWYG …with JavaFX
Mentioned projects:
- https://github.com/AdamBien/airhacks-control
- https://github.com/AdamBien/airpad
- https://github.com/AdamBien/afterburner.fx
- https://github.com/AdamBien/followme.fx
- https://github.com/AdamBien/lightfish
See you at Java EE Workshops at MUC Airport, and particularly JavaEE User Interfaces!
See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.
Posted at 12:26PM Apr 24, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[0] | Views/Hits: 1391
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienDependency Injection …and there is no magic
Dependency Injection is easier to implement, than to explain. In this 8 minute-screencast I explained what happens behind the scenes within an application server during initialization:
The screencast is actually the first 10 minutes of the airhacks.com workshop (Bootstrap). For unknown reasons, I referred to "side" with "size".I was too lazy to re-record it and recognized it after the fact...
Because DI is so easy, I built an injection "framework" for JavaFX: http://afterburner.adam-bien.com
See you at Java EE Workshops at MUC Airport!
See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.
Posted at 11:18AM Apr 19, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[6] | Views/Hits: 4048
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienThe Raise Of Anti-Cloud Devices
Transporter [amazon.com] feels almost like dropbox, but is a physical device you have to plug somewhere into your network. Folders on your machine are going to be synchronized automatically with the transporter. You can choose whether you would like to keep a local copy or access the remote files directly.
You can even keep multiple transporters, which synchronize the data in P2P fashion.
The main difference to dropbox is the data location. Transporter is you device and your data is stored on a replaceable hard disk and your own private cloud.
About four years ago, I wondered Will Moores Law Kill Public Clouds?. There are still public clouds out there :-), but cheap hardware and technologies like KVM, VMWare, or XEN bundled with automation, make a private cloud interesting.
The only caveat of private clouds is power and bandwidth. Because of higher density, centralized computing is more efficient, than decentralized devices. However, Transporter is a low power device and could be competitive with commercial, public cloud storage offerings.
No idea, whether Transporter uses Java somewhere, or not :-)
Posted at 07:00AM Apr 16, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[6] | Views/Hits: 2160
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBienEvents: Enterprise JavaFX 8, Vaadin 7, Pragmatic JavaEE, Distributed Persistence and JavaOne
- JAX Conference in Mainz 23.04.2013 | 09:45 - 11:00 Uhr Enterprise JavaFX 8 with a few slides, lots of code and a bit of coding I would like to introduce some best practices and working (some crazy) ideas for DI, IoC, MVP and Build in "enterprise" JavaFX context. It is the premiere of afterburner.fx.
- JAX Conference in Mainz: 23.04.2013 | 14:45 - 15:45 Productive JavaEE: Everything I'm going to say / code is self-evident :-)
- "night talk": Vaadin 7 und Java EE JUG Berlin, 29.04.2013
- May 7th, 2013, MUC Airport Persistence Strategies: From NoSQL, over JPA to Clusters and Grids with Java SE, EE and alternatives In this workshop I would like the Persistence / Distribution / Transactions FAQs from recent airhacks.com We will start with "stock" JavaEE 7 / JPA 2.1 persistence, NoSQL, Grids, Caches and end with P2P. Already sufficient registrations (so the workshop will take place), some seats still available. This time we don't have the largest room--so hurry up!
- Infoshare Conference 16.05-17.05: Java EE – And The Bloat Is Gone and JavaEE (7) Un-Workshop: In the recent years the workshop was overcrowded. This year there should be unlimited space :-) I got many good questions, so I don't even try to provide an agenda.
- 22.07 - 27.07.2013, MUC Airport Modular Java EE Workshops at Munich Airport. From Beginner to Java EE 7 Features Deltas. Already sufficient registrations (so the workshop will take place), some seats still available.
- I was invited to JavaOne: Lean And Opinionated Java EE7 Applications: See you in San Francisco!
Posted at 08:19AM Apr 15, 2013 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[0] | Views/Hits: 1592
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBien
