java-Development Model
There are a number of Java web development scenarios, here are some classic development patterns for horizontal comparison
Jsp+javabean Development Mode:
Features: This mode separates the business logic from the page performance, and increases the debugging and maintainability of the program to some extent.
Cons: The page will be controlled and displayed in a set.
Conclusion: simple, suitable for the rapid construction and operation of small projects.
Jsp+servlet+javabean Development Mode:
Features: JSP as a view to the performance of the page, servlet as a controller, control program process and call the business processing; JavaBean encapsulates the business logic. Followed the MVC design pattern.
Cons: No unified development framework leads to long development cycles.
Struts Development Scenarios:
Features: A mature MVC development framework.
Composition: Controller: Actionservlet component: The central controller of the struts frame.
Requestprocessor components: Each submodule has a request processor.
Action component: A business agent that invokes the model for a specific business logic process.
Views: mainly composed of JSP pages
Also includes HTML documents, standard tag libraries (JSTL) and struts tag libraries;
JavaScript scripts and CSS styles;
multimedia files;
message resource files;
Actionform class.
Patterns: You typically use other model builds in structs to implement business logic.
such as: JavaBean technology, EJB Technology, hibernates design mode.
Conclusion: For some large-scale projects, the struts framework will improve the development efficiency and have great benefit to the later maintenance.
Spring Development Scenarios:
Features: Based on two advanced technologies of IOC and AOP, which simplifies the complexity of enterprise-level development,
is an ideal Web application framework.
Composition: Core module: The implementation of IOC mode, including the Beanfactory class is responsible for the configuration and management of JavaBean.
Context module: Inherits the Beanfactory class,
Added features such as event handling, internationalization, resource loading, transparent loading, and data validation.
Provides framework-style bean access and many enterprise-class features.
such as: Jndi access, support EJB, remote call, inherit template framework, e-mail and scheduled task scheduling.
AOP module: Provides an AOP framework written in the standard Java language,
Enables applications to throw away the complexity of EJBS, but with the key functionality of traditional EJBS.
DAO Module: Provides an abstraction layer of JDBC and provides support for declarative and programmatic transactions.
Web module: Built on the context module, provides the context of the servlet listener and the contexts of the Web application.
Integrates with existing web frameworks such as: JSF, Tapestry, struts, and more.
O/R Mapping module: provides support for existing ORM frameworks such as Hibernate.
Spring MVC framework: Built on the core module, tender enough to adapt to a variety of multi-view, template technology, internationalization and authentication services,
Achieve clear separation of control logic and business logic.
Struts+hibernate Development Program:
Features: Using Struts's MVC design pattern, a development program that consists of hibernate persistence objects.
Struts+spring+hibernate Development Program:
Features: Struts is responsible for the presentation layer,
Spring is responsible for the business of the logic layer,
Hibernate persistent Layer database operation, composed of development scenarios.
Java Development model