Coding for desktop and mobile with HTML5 and Java EE 7
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.
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?