Friday, November 14, 2008

Maven, Spring, Hibernate and Eclipse - kick-ass Java development

Using Maven as a build and project management tool with automatic dependency management, building Java web applications had never been this easy. Put in Spring for separation of concerns and Hibernate for a bad-ass Object Relational Mapping, the only thing that I am concerned about is the business logic and requirements of the application.

We have been idle for at most two weeks now. Everybody is concerned of what other things to do since our project had come to an end. Well, for me I had been studying Maven with Spring and Hibernate integration. I spent one whole week just understanding Spring and Hibernate basics and another few days for Maven.

Java developers had been talking about how easy it is to develop with Maven with its automatic dependency management and a set of best practices for project architecture and management. Ok I think I should give it a try. The first day was blunt. But I persevered. Thanks to my experience with Ant I had some light following the tutorials and the documentations of Maven. And when the first time I ran Maven inside Eclipse and seeing some info logged in the console, I was amazed. It seems Maven is downloading every ounce of necessary dependencies for a given project and putting those dependencies (jars + pom) on my local repository the first time. That's cool. What's more every Maven project follows the same project architecture. I think you would never be lost if you moved from one Maven project archetype to another.

Second was Spring. Learning it, I never had a hard time to be concerned with best practices. It was a marvel idea from Rod Johnson and the Spring community. Convention over configuration or vice versa, Spring handles it without even tieing up with application itself. Sweet.

The last one is Hibernate. Suits well for new projects and projects that rely on straightforward SQL queries. I haven't investigated running under stored procedures though. Hibernate's strength lies on its ORM and database management. All I worry now is my business classes after setting up the mappings.

The good thing is, Spring supports Hibernate well and gives me a decent MVC architecture. Another best thing is that Maven handles all of them. With plugins for all of these frameworks and build tools inside Eclipse (the best IDE for me) J2EE development is easy.

Well, that's it for now. Spring, Hibernate, Maven, and Eclipse--one of the best development tools for Java Enterprise.

No comments: