Analysis of modern Java Web development architecture

Source: Internet
Author: User
Tags define object exception handling implement sql client java web
web| architecture as mainstream computer applications begin migrating to client/server architectures, programmers begin to look for ways to simplify the development of projects that use similar technologies and are similar in structure. This is the basis for the modern software development framework.

With the development of web-based application servers and the expansion of their associated application software, the development framework that supports these technologies is booming. At present, there are many software development frameworks in the field of enterprise development which are especially suitable for Java EE platform.

In this article, I will focus on the modern Java Development framework, analyzing their characteristics and their respective use advantages. In addition, I would like to compare the current popular production quality frameworks, such as struts,spring and Hibernate, and discuss their basic similarities and basic concepts in detail.

I will briefly analyze the Enterprise development environment or toolbox that is used to support these frameworks, such as Borland Jbuilder,eclipse and Bea Workbench. Keep in mind that there are many books on the market for these development frameworks; However, in any article, it is impossible to describe them in depth. However, I will try to discuss the most widely used concepts.

   1. Common Ground

Almost all modern web development frameworks follow the model-view-control (MVC) design pattern-business logic and description are separated, and a logical flow controller coordinates the requests from the client and the actions to be taken on the server. This path has become the de facto standard for web development. The intrinsic mechanism of each framework is certainly different, but the APIs used by developers to design and implement their Web application software are very similar. Differences also exist in the extensibility aspects provided by each framework, such as tag libraries, JavaServer faces, or javabean wrappers.

All frameworks use different techniques to coordinate navigation within a Web application, such as XML configuration files, Java property files, or custom attributes. All frameworks also differ significantly in the way the controller modules are implemented. For example, an EJB might instantiate a class that is required in each request or use Java reflection to dynamically invoke an appropriate action class. In addition, different frameworks also differ in their introduction concepts. For example, a framework may define a user's request and response (and error) site, while another framework may simply define a complete stream-from one request to multiple replies and subsequent requests ...

The various Java frameworks are similar in their way of organizing data flow. After the request is issued, some action is generated on the application server, and as a response, some data that may contain the set of objects is always sent to the JSP layer. Then, extract the data from those objects--simple classes, JavaBeans, value objects, or some collection objects--that might be setter and getter methods. The modern Java framework also manages to simplify developer development tasks by providing automated tracking by using simple APIs, database connection pools, and even database call packs. Some frameworks may be able to hook into additional Java-EE technologies, such as JMS (hooked) or JMX, or integrate these technologies together. Server data sustainability and logging can also be part of the framework.

   2. Enterprise Development Environment

Some frameworks have become quite popular in the Web Developer community and enterprise development areas. As these frameworks mature and start to release a stable version, the Business IDE (integrated development environment) begins to support these frameworks and incorporate them into their products. Some Ides even develop the entire product based on the framework concept, for example, the BEA WebLogic Workshop is built on the struts framework.

Borland JBuilder provides built-in support for struts and also supports JSF and JSTL.


The Eclipse platform has become a popular development tool, partly because it is plug-in based and partly because of its support for web frameworks. Now, there are numerous eclipse plug-ins, even a complete, eclipse-based IDE. Many plug-ins are designed for struts framework development, such as MyEclipse (www.myeclipse.org) or M7 (www.m7.com).


Most Ides have graphical processes and visual objects (class proxies). For example, here is a JBuilder action designer for planning the page order of a Web application.

WebLogic Workshop introduces the Java page process technology, which expands the struts framework and provides a simplified development model and additional features. Workshop uses page flows to easily separate user interfaces from navigation and business logic. Page flow consists of JSP pages that contain user interface elements and a controller file (JPF), which contains instructions on how the data provided by the user will be processed, and what next page will be returned to the user's information. Page flow provides developers with a visual general outline of the Web application that allows developers to see visually analyzing different JSP pages associated with each other and implementing the rapid creation of a Web application's overall structure.


MyEclipse provides similar features and carries more attractive price tags.


   3. Apache Struts Framework

The struts framework is an Open-source product that develops Web applications based on model-view-controller (MVC) design paradigms. It uses and expands the Java Servlet API, originally created by Craig McClanahan. In May 2000, it was donated to the Apache Foundation. The struts framework shows a powerful custom tag library, tiled display, form validation and i18n (internationalization). In addition, struts supports many descriptive layers, including jsp,xml/xslt,javaserverfaces (JSF) and velocity, and supports a number of model layers, including JavaBeans and EJBS.

   4. Spring Framework

The spring framework is a layered JAVA/J2EE application framework based on code designed and released by the expert one-on-one Java EE. The spring Framework provides a simple development technique for automating the processing of a large number of property files and assistant classes in a project.

The main features of the spring framework include:

• Robust configuration management based on JavaBeans, using the Inversion-of-control (IoC) principle.

• A core bean factory that can be used in any environment, from applets to Java-EE container programs.

• The common abstraction layer is suitable for database transaction management, allows pluggable transaction managers, and can easily divide the boundaries of transactions without dealing with low-level problems.

• A very meaningful JDBC Abstraction layer for exception handling.

• Integration with Hibernate, DAO implementation support, and transaction strategy.

   5. Hibernate Framework

Hibernate is an object-relational mapping (ORM) solution for the Java language. It is also open source software, similar to struts, and released under LGPL protection. Hibernate is developed by a group of Java software developers from around the world. It provides an easy-to-use framework for mapping an object-oriented domain model to a traditional relational database. It is responsible not only for mapping from Java classes to database tables (and SQL data types from Java data types), but also for data querying and retrieval capabilities, and for significantly reducing the development time spent on manual data processing for SQL and JDBC.

The goal of Hibernate is to ease the developer's programming tasks associated with a large number of common data persistence. Hibernate can also adapt to the development process, whether it's just starting to design or coming from a ready-made database. Hibernate can automate the generation of SQL, allowing developers to get rid of the tedious task of manually processing result sets and object conversions, and enabling applications to migrate to all SQL databases. It also provides a transparent continuity, and the only requirement for the persistence class is to implement a parameterless constructor.

This framework is typically used in javaswing applications, servlet-based Java applications, and ejbsession application software using the beans.

   6. Conclusion

This article outlines the most popular Java Web development framework in modern times. Of course, there are more frameworks that are not yet described, open source and commercial, such as WebWork (http://www.opensymphony.com/webwork/) or tapestry (http://jakarta.apache.org/ tapestry/) While many frameworks have been successfully developed internally by extending additional MVC frameworks. Currently, the most popular frame is Apache Struts. As the Web development arena continues to evolve its tools and programming methods, the Java application Framework will continue to grow. The future of the Java Web development Framework is bright!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.