Over a million developers have joined DZone.
Platinum Partner

Why Java? Because It's Everywhere

· Java Zone

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.

As a Java developer, this discussion sounds familiar to you. Every now and then, you have to answer this question from customers, your marketing people, fellow developers,... . My personal answer on this question is shifting a bit from the "Enterprise advantages" to the "Mobile opportunities". I see the same shift in other pieces of software, including GlassFish v3.

One of the most important advantages that Java has over e.g. scripting languages is the built-in infrastructure allowing for transactions, clustering, scaling. These are mainly the benefits of the Java EE platform, and they can not be underestimated.
One of the characteristics that I tend to value more and more, is the transaction management. I can hardly imagine not to have a rollback of a complete method. If you call a method on a session bean, and something goes wrong at the very end of the method, you often want the system to be in the state it was in before the start of the operation. Easily solved with transactions in JavaEE, but I wonder how people solve this in other languages?

The value of this enterprise capabilities is still very high, and in my opinion, it is one of the most important differentiators of Java. Once you know how to deal with it, it saves you lots of time in development and production.

In the near and mid-term future, I expect that the "write once, run anywhere" principle becomes more important. For a long time, I considered the fact that Java runs on over 2 billion devices mainly a marketing trick. However, if you think about it, this is one of the major advantages of Java.
I was recently in a discussion about which mobile device or PDA would make it. Will mobile phones evolve in the direction of PDA's, or is it the other way round? Very difficult to predict (at least for me). The thing is, I don't have to worry. They both run Java. The same language I use for enterprise software development is used on mobile devices. Of course, the external API's that are used are not always the same. But the Java syntax, mainly the java.lang package and the way of programming are the same. As Java developers, we don't have to worry about the outcome of the battles between the mobile phone companies.

Using the same programming language on high-end backend servers and resource constrained mobile devices is not trivial. Being first class in both domains, is far from trivial. But the Java language is doing a great job in both areas.
One of the major characteristics of the current GlassFish v3 software is that it starts up quickly. After less than a second on a laptop, you don't have all the functionality that you typically expect from enterprise servers. But in many cases, you don't need all this functionality. You just want the same principles to apply whether you are working on an enterprise project or on a mobile project. And that is where GlassFish v3 is heading to. The core is the same for mobile and enterprise, the programming methodology is the same. GlassFish is moving from the Enterprise to mobile (without ignoring the enterprise). OSGi , on the other hand, has been moving from mobile to the Enterprise. It is not a coincidence that GlassFish and OSGi have met each other.

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.


Published at DZone with permission of Johan Vos , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}