Unlocking the Java EE Platform with HTML5
What I did was a typical HTML5 Application with a pure HTML/JS Client and a REST Server Backend. The Application looks like this:
This is a typical Single-Page Application with two logical Screens. After entering a search expression the logo disapears (annimated) and the result list fades in. The Architecture of this application looks like this.
I also integrate an EJB-Session Bean to get the REST-Annotated-Code clean of business/searchlogic. This kind of Client has some benefits over a typicall JEE Java Server Faces application.
- The Server itself can be stateless – so we can distribute free in the cloud – each call can go to a different server. That helps for scalability
- The development is HTML5/JS/CSS for the client and pure Java on the server. We have a clean separation of concerns – and we can distribute the development easily in different teams.
This kind of client has also some pain points
- JS is currently not typed. So the autocomplete support is limited. Refactoring is a nightmare. Microsoft works currently on Typescipt which should make is easier for such tools. Netbeans support for typescript is on the way.
- The current library situation is like the Wild West. Everybody claims to have the best library for application development – There are many unsolved questions if you want to build enterprise scale applications on that unsafe basis.
But nevertheless, this kind of application is a current trend. I will show you in this blog how to build this application with Netbeans 7.4 and Glassfish 4.
The video shows every step of my demo at the JavaOne.