'Learn to be a polyglot Java programmer'

author-image
CIOL Bureau
Updated On
New Update

BANGALORE, INDIA: Arun Gupta is the Java EE & GlassFish Guy at Oracle and has been personally involved with Java EE6 platform. He has been part of the software community for the past 13 years now, working on various distributed computing technologies, especially Java platform.

Gupta, who is in the city to attend 'Spark IT 2011', on the first day of the conference, spoke on ‘Understanding Dependency Injection in the Java Platform’. During the session he went in length explaining how to use Context and Dependency Injection (CDI) with Java EE 6 technologies such has JavaServer Faces (JSF), Enterprise JavaBeans (EJBs), Java Persistence API (JPA), Java API for XML Web Services (JAX-WS), and Java API for RESTful Web Services (JAX-RS).

On the sidelines of the event he also sat for a short interview to CIOL.
Excerpts:

CIOL: What is the scenario that you see among developer community, which made you to talk on dependency injection for Java platform?

Arun: Dependency injection has lots of benefits. Instead of me instantiating as an application developer for my own class and managing the lifecycle, if the container is managing for me without me worrying about my scope, my context, string-based identifier, that is perfect for me, because that really allows me to focus on the application building.

The most important aspect is that it is tight-faced, unlike Spring, Guice, or Seam, which have the benefits of IDE compile time check, which is very impressive.

The reason why I picked up that topic is because CDI is a complete game changer in terms of Java EE6. It literally creates a revolution in the way we write an application. Everything is so much extensible that you can add new capability very easily to the platform, while the evolution is happening in the main platform.

Advertisment

CDI bridges the gap between user interface layer and transactional layer typically served by EJBs.

CIOL: What are the other exciting things happening for the Java developers today?

Arun: Java EE6 got over an year and a half ago. The next thing we are working on, and which happened just two weeks ago, is Java EE7. The main happening there is cloud. So we are going to have support for all the specs be read and updated so that they have support for cloud-enabled environment.

Think about sessions in a Servlet. What does it mean to run in a multi tenant capability? If you have a database, a multitenant database, how would you access that using a JPA? How about accessing a non-relational database, which has only relational database support?

That is one of the big themes that we are having in Java EE7, i.e., the ability to take an application and deploying it in a cloud environment — be it hybrid, private or public. So that is going to be the super-exciting thing from a Java perspective for this year and next year.

Another big thing happening is JDK 7. The preview release was done last month and the final release is expected to be in August or so. This is going to be the first major release by Oracle after Sun acquisition.

Advertisment

Java FX 2.0 is also going to go live this year and it is also coming with a lot of capabilities as well.

GlassFish 3.1 is released with full clustering and high availability support for a Java EE 6 application. The good part is that there is commercial support available from Oracle, unlike other app servers.

CIOL: What is your advice to the Java developers out there?

Arun: It is very important for Java developers to realize that Java is a platform and is not merely the language itself. People who say Java is dead, do not realise that Java is bigger than a language.

Advertisment

JVM is one platform on which Java is one language that runs. So it is important to be a polyglot programmer. Learn Java, as this is very much prevalent in enterprise. Over and above that you need to learn other languages. When I say languages I do not mean syntax, what I mean is to understand what their design principles are, what are the other good things there and see how you can contribute to an open source project.

Run an open source project and do something useful for the community. Going forward, open source is definitely going to be the primary way. See what you can contribute out there. Work on a global theme, see some of the value adds that they can provide back to the community. So, do not think just about taking from the community, give back to the community as well!

tech-news