Modern Java Frameworks for Web Development
Apache Struts Framework
The Struts framework is an open-source product for building Web applications based on the model-view-controller (MVC) design paradigm. It uses and extends the Java Servlet API and was originally created by Craig McClanahan. In May 2000, it was donated to the Apache Foundation. It features a powerful custom tag library, tiled displays, form validation, and I18N (internationalization). Also, Struts supports a variety of presentation layers, including JSP, XML/XSLT, JavaServer Faces (JSF), and Velocity, as well as a variety of model layers, including JavaBeans and EJB.
The Spring Framework is a layered Java/J2EE application framework based on code published in Expert One-on-One J2EE Design and Development. The Spring Framework provides a simple approach to development that does away with numerous properties files and helper classes that litter projects.
- Powerful JavaBeans-based configuration management, applying Inversion-of-Control (IoC) principles.
- A core bean factory, usable in any environment, from applets to J2EE containers.
- Generic abstraction layer for database transaction management, allowing for pluggable transaction managers, and making it easy to demarcate transactions without dealing with low-level issues.
- JDBC abstraction layer with a meaningful exception hierarchy.
- Integration with Hibernate, DAO implementation support, and transaction strategies.
Hibernate is an object-relational mapping (ORM) solution for the Java language. It is also open source software, as is Struts, and is distributed under the LGPL. Hibernate was developed by a team of Java software developers around the world. It provides an easy to use framework for mapping an object-oriented domain model to a traditional relational database. It not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC.
Hibernate's goal is to relieve the developer from a significant amount of common data persistence-related programming tasks. Hibernate adapts to the development process, whether it is started with a design from scratch or from a legacy database. Hibernate generates the SQL, and relieves the developer from manual result set handling and object conversion, and keeps the application portable to all SQL databases. It provides transparent persistence, the only requirement for a persistent class is a no-argument constructor.
This framework is typically used in Java Swing applications, Java Servlet-based applications, or J2EE applications using EJB session beans.
This article is a general overview of modern or most popular frameworks. There are more frameworks than I have described here, of course, both open-source and commercial, such as WebWork http://www.opensymphony.com/webwork/ or Tapestry http://jakarta.apache.org/tapestry/, and many frameworks were in-house developed by extending some other MVC frameworks. Currently, the most popular framework is Apache Struts. As the Web development arena continues to evolve its tools and programming methodologies, so will the Java application frameworks continue to grow. The future looks bright for the Java Web-development frameworks.
Spring by Example: http://www.jroller.com/page/kdonald
Will Iverson: Hibernate: A J2EETM Developer's Guide, Addison-Wesley Professional, ISBN 0-321-26819-9
Christian Bauer, Gavin King: Hibernate in Action, Manning Publications Company, ISBN 1932394-15-X
About the Author
Vlad Kofman is a Senior System Architect. He has been involved with enterprise-level projects for major Wall Street firms and the U.S. government. His main interests are object-oriented programming methodologies and design patterns.
Page 2 of 2