From WebSockets to HTML5: What's new and what's next for Java EE 7
By Jason Tee
If anyone knows Java, it's Peter Pilgrim, a self-styled educationalist and Java Champion based in the UK. But even he admits that it can be tough to keep up with all the new specifications for Java EE. When he wrote the Java EE 7 Developer Handbook, he found that learning was as big a part of the process as writing.
"You have less understanding of the specification than you think you have. There's also so much new stuff that you really don't know yet. To understand the specifications that are under development, you have to actually program with the betas and try your hand at a few things." Fortunately for us, Peter did apply himself diligently to learning all the ins and outs of version 7. We had him talk us through some newer features that may interest today's enterprise Java developers – and what he thinks the next EE version should include.
Java EE 7 Gets Mobile
What would be nice is if we could use annotations to create our own administrative objects for JDBC, JMS, or even a managed task executor
Peter Pilgrim, Java Champion
Peter shares a couple of aspects of Java EE 7 that help facilitate modern mobile development. First, it has JAX-RS on the server and client side. You can write mobile clients to send restful messages using JSON objects between the client and server. You can also use asynchronous input and output to have an end point that receives a data buffer and pushes it back asynchronously.
The long awaited standardization of WebSockets is another win for Java EE7. WebSockets offer bi-directional, real-time communication between servers and clients. As an alternative to AJAX, they may address some issues with both speed and scalability (depending on your use case and how effectively you can code). Because WebSockets work across platforms, they are also fragmentation-friendly.
What Comes Next for Java EE?
Well, there's no telling what will happen when a group of experts get into a virtual or actual room together to lobby for their own pet features. But Peter has a few improvements in mind that would make things easier for developers in the trenches. Features that would make mobile and embedded programming simpler are still at the top of the list.
"A big frustration is that a few of the things in the EE specification have some use in standalone clients. For example, context and dependency injection (which is basically Juice and bits of Spring), you don't have to run that in the EE environment. It would be nice if that had an SE flavor as well. Then we could write clients that communicate with the server-side. So, I hope that is standardized." Peter says it would also be nice for developers who write standalone clients to be able to hook into the Java messaging systems that run on the EE side.
The other big area for innovation is the cloud. If you recall, Java EE 7 was supposed to be positioning itself for cloud before Oracle switched the focus to HTML5 productivity. This probably seemed like a more urgent issue at the time, but the cloud still looms large on the horizon. Peter actually thinks it's too early for standardized cloud PaaS. There's much to learn before we have any kind of grasp on best practices that can translate into a new Java EE version. However, there are some tools Oracle could put in the hands of developers without setting everything in stone. "What would be nice is if we could use annotations to create our own administrative objects for JDBC, JMS, or even a managed task executor. That would mean we are halfway there to provisioning resources for an EE application." In fact, this might be a good preparatory step for later standardization since it would provide lots of lessons learned along the way.
Top Tools to Use with EE 7
01 Jan 2014