Forrester, Java ain’t dead – it’s still #1!

Just finished going through the slide deck from the teleconference dated January 24, 2011. It was titled “Is Java A Dead End For Enterprise Application Development?” This document has been authored by Mike Gualtiery, Senior Analyst from Forrester. If the slide deck’s title has a question mark at the end, the author’s blog simply states that Java’s a dead end.

Bashing Java is popular these days, but is it justified? I don’t believe so. Unfortunately, people who state that Java’s dead are not the people who use the latest Java technologies day in and day out. Sure enough, people are overwhelmed by the amount of news generated by iOS and Adnroid, while Java (the most popular programming language) gives a perception of a stagnating platform.

But in this presentation the author made a number of statements that show that his perception of Java platform is based on the status of the platform several years ago. The main issue is that he’s not aware of how things are done in Java EE 6, which has been released more than a year ago. All accusations that Java developers have to use a “frameworks galore” slowly but surely becomes a history. I had a chance to learn it first hand while working on my Java book published earlier this month.

While the author states that “Java innovation failed to reduce complexity” referring to JSP, JSR, and Struts (?!), in my opinion Java EE 6 is a light-weight and elegant platform. No more heavily configured EJBs. Here’s all you need to create a session EJB. Check this POJO – it’s a stateless session EJB:


@Stateless
public class HelloWorldBean {

    public String sayHello(){
        return "Hello World!";
    }
}

No need to write any XML. Just call the method sayHello() from any other Java class. Below is a Java servlet that can be used as a client for our session bean (don’t look for missing JNDI lookup – the @EJB injects the bean into a servlet):

@WebServlet("/HelloWorldServlet")
public class HelloWorldServlet extends HttpServlet {
    
  @EJB HelloWorldBean myBean;

  protected void doGet(HttpServletRequest request,
        HttpServletResponse response) throws ServletException, IOException {

       PrintWriter out = response.getWriter();
       out.println(myBean.sayHello());       
  }
}

JPA 2.0 replaced entity beans. Why do you need Hibernate if in Java EE 6 here’s all it takes to define the Employee entity mapped to a database table:

@Entity
public class Employee{
 
  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY)
 
  @NotNull  
  @Size(max=10)   
  public String firstName;

  @NotNull
  @Size(min=2, max=20)  
  public String lastName;
 
  @Column(name=”boss_name”)
  public String managerName;
 
  @OneToMany (mappedBy = “employee”)
  public List<Address> adresses = new ArrayList<Address>();   

}

I’m not going to bore you with Java code, but it’s really easy now. The statement of the Forrester’s analyst that “Java was not designed to increase productivity of business application” doesn’t bear much weight after you look at the code samples above. Java EE 6 doesn’t stand on the way of application developers. Just put your business logic in the sayHello() method with no or minimum boilerplate code to add.

The author correctly blames Java Swing for being overly complex and JavaFX for failing to present a competitive product. Today this is true. But this is just a small part of a solid platform that enterprises rely upon during the last decade.

Mr. Gualtiery suggests using “better alternatives” as he put it. Namely, Business Process Management (BPM) tools, BI, Business rules management systems. He forgot to mention though, that you’d need to rob a bank first to acquire them. And after this part is done, you’ll still need to do some scripting plus a lot of voodoo dancing around these generic packages to make sure that they perform well with YOUR business application.

He claims that “Newer programming languages are designed to make certain apps easier”. Guess what’s the name of this new language? Ruby on Rails. First, this is not a language, but a 7-year old Web-application framework. Second, during all these years it was not able to become a noticeable tool in the enterprise development field.

The author also mentions some other programming languages forgetting to mention that they run on Java Virtual Machine (JVM), which has been greatly improved over the past years.

The last couple of slides contain recommendations. The author claims, “If you are using Java successfully, there is no reason to abandon the ship right away”. Thank you very much! And then, “If you are using Java unsuccessfully, then look first at your software development life cycle… The platform you use is only as good as people and process…” I can’t agree more. If your organization is full of mediocre software developers, switching Java to any other tool or programming language won’t make a difference. Here’s yet another vague recommendation “Don’t think how you can develop Java applications faster. Instead, think how you can develop applications faster. This opens your mind to look outside Java to these alternatives.” I wonder, how much Forrester charges for this report?

Disclaimer. The next verse has been written neither by me nor by the Senior Analyst from Forrester.

Dm F G My mind is clearer now at last all to well
F G Dm I can see where we all soon will be
Dm F G If you strip away the myth from the man
F G Dm You will see where we all soon will be

Dm Em Jesus!

Yakov Fain

One thought on “Forrester, Java ain’t dead – it’s still #1!

  1. I couldn’t agree more with you. Some developers I know even came up with PHP as the better alternative to Java for Enterprise Development. What a nightmare that was! I just don’t believe that one can compare a strongly typed language like Java(with so many quality APIs) with some scripting language that seems to be having every feature as an after thought. Get a life guys. Go learn some real language…and enough with the facebook application. It’s not like it’s a Banking System or something.

Comments are closed.