Monday, July 25, 2005

Struts, Spring & Hibernate

Some of my friends were trying to compare Struts, Spring and Hibernate. These were the points which struck me when I thought about these:

Struts:
It is merely just an implementation of MVC pattern. You can develop a web application with it.

Spring:
This framework has a whole lot of implementations apart from MVC. It enables applications to be developed with simple POJOs. Declarative transaction, data access framework, dependency injection - all for POJOs. No plumbing code, properties, or lot of XMLs, all these are taken care by dependency injection and inversion control.

The main selling point here is that one do not need to write EJB now in order to achieve the declarative transaction and security. POJO + Spring will be able to deliver that.

So, this framework is not only for the web application but can be considered for the wide range of J2EE applications when compared with Struts.

Hibernate:
Spring doesnt have any Object relational mapping implementation, rather allows a generic data access mechanism, wherein JDBC or Hibernate can be used. Normally Hibernate is the option for the developers who use Spring, that is the reason why Hibernate comes into the picture when they talk about Spring. Apart from that, there is one major relation between Spring and Hibernate is that both are POJO based. That is, Hibernate enables us to write a POJO and map it with a datastore, rather than developing an entity bean and end up writing lot of plumbing code.

Sounds, Spring + Hibernate is very easy to develop, deploy and test POJO based components, which can be transactional, secure, mapped to a datastore. So, would it take over EJB in future? May be EJB 3.0 is the answer for this!

Thursday, July 14, 2005

Is Java still a beginner's language?

When I started updating myself about the new features of Java 5, realized that how hard it has become now to understand some of the fundamental concepts of the language constructs. I am having quite long sessions with Generics particularly. Adding fuel to that, recently have read a blog by Bruce Eckel, in which, he says, his 4th Edition of Thinking in Java is delayed because it takes some time to understand these new features of Java 5, particularly Generics.

Learned somewhere that some of the hard learning concepts may even be stripped down in J2SE 7, which no one is quite sure about. So I was wondering whether Java is still a beginner's language.