days
-1
-1
hours
0
0
minutes
-3
-4
seconds
0
-7
search
Java tutorial

Coding for desktop and mobile with HTML5 and Java EE 7

Geertjan Wielenga
Programming image via Shutterstock

Full-blown applications programmed for your browser – that’s where it’s at, right now, says JAX London speaker Geertjan Wielenga in this sneak preview from the upcoming JAX Magazine issue.

We can no longer make assumptions about where and how the applications we develop will be used. Where originally HTML, CSS, and JavaScript were primarily focused on presenting documents in a nice and friendly way, the utility of the browser has exploded beyond what could ever have been imagined. And, no, it’s not all about multimedia – i.e., no, it’s not all about video and audio and the like. It’s all about full blown applications that can now be programmed for the browser. Why the browser? Because the browser is everywhere: on your mobile device, on your tablet, on your laptop, and on your desktop computer.

Seen from the perspective of the Java ecosystem, this development is a bit of a blow. All along, we thought the JVM would be victorious, i.e., we thought the ‘write once, run anywhere’ mantra would be exclusively something that we as Java developers could claim to be our terrain. To various extents, of course, that’s still true, especially if you see Android as Java for mobile. Then you could make the argument that on all devices, some semblance of Java is present. The arguments you’d need to make would be slightly complicated by the fact that most of your users don’t actually have Java installed, i.e., they physically need to do so, or your application needs to somehow physically install Java on your user’s device. Whether you’re a Java enthusiast or not, you need to admit that the reach of the browser is far broader and more intuitively present than Java, at this point.

So, how do we deal with this reality? How can you make sure that your next application supports all these different devices, which each have their own specificities and eccentricities? On the simplest level, each device has its own screen size. On a more complex level, not every device needs to enable interaction with your application in the same way. Some of those devices have more problems with battery life than others. Responsive design via CSS may simply not be enough, simply because CSS hides DOM elements. It does not prevent the loading of resources, meaning that the heavy map technology that you intend for the tablet user is going to be downloaded all the same for the mobile user, even though it will not be shown, thanks to CSS.

Did you know?

Did you know there’s something called “responsive JavaScript”, which is much more powerful than “responsive CSS”? Did you know that there are a number of techniques you can use when creating enterprise-scale JavaScript applications, including modularity via RequireJS? Did you know that AngularJS is not the only answer when it comes to JavaScript application frameworks?

And finally, are you aware of the meaningful roles that Java, especially Java EE, can continue to play in the brave new old world of JavaScript?

These questions and concerns will be addressed during my session at JAX London, via a range of small code snippets and examples, i.e., you will certainly see as much code, and technical tips and tricks, as you will see slides. Undoubtedly, you will leave the session with a lot of new insights and questions to consider when starting your next enterprise-scale applications, whether in Java or in JavaScript!

Author
Geertjan Wielenga
Geertjan is product manager of NetBeans IDE and lives in Amsterdam, the Netherlands. He blogs at blogs.oracle.com/geertjan.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of