Classic Java EE and lightweight Java EE

Source: Internet
Author: User
Tags object model jboss

Java EE is divided into:

Lightweight Java EE

Spring, hibernate as the core, without application server support, as long as it works well on a Web server such as Tomcat, jetty, etc.

Classic Java EE

With EJB3 as the core, need EJB container support , need to run in JBoss, WebLogic, WebSphere application Server ;

The front-end MVC framework takes precedence over JSF,JSF reference implementations: JSF RI; Another implementation of JSF: Myfaces framework

JSF (Java Server Faces)

RI (Reference Implementation)

ADD:

For classic Java EE with EJB3 as its core, JSF is more appropriate for the front-end MVC framework, with two reasons:

1, JSF's Managed-bean can easily accept dependency injection, thereby invoking the session Bean (business logic component) in a container in a loosely coupled manner;

2, the JSF specification itself is one of the Java EE specifications, with pure blood; there are two implementations of JSF: The JSF RI implementation provided by Sun and the myfaces implementation of Apache;

Common Enterprise-class servers:

Glassfish:sun official offers, open source, support Java EE 6, currently not on a large scale.

WEBSPHERE:IBM provided.

WebLogic: Originally for the development of BEA company, first to Oracle, the actual project used more.

JBoss: Open source, free.

Classic Java EE and lightweight Java EE layered Similar, advantages are similar, but the implementation of different methods;

   lightweight Java EE

Database : Providing persistent services--> Domain Object layers : encapsulating DAO layer : providing data access services; business Logic Layer : Provide business logic implementation; MVC Controller layer : show; presentation layer

Classic Java EE

database : Provide persistent service--> Entity layer ( by JPA Entity Act as ): Encapsulation-->

| EAO layer : Provide data access Service--> business Logic Layer : Provide business logic implementation |-->

MVC controller layer: Show--> presentation layer

Tips : Business Logic Layer and the EAO layer is played by the session Bean ;

Entity objects: Abstract The object model of the system, usually the state of these objects must be stored in the database, so each entity map to one or more database tables;

EAO Component: Entity Access object, also known as entity Access objects, is usually implemented using session beans;

Tips:eao is equivalent to the DAO objects in lightweight Java EE applications, providing an additional, checking, repairing, and deleting system entity (entities), corresponding to atomic operations such as CRUD (Create, Retrieve, Update, delete) of database tables.

The entity in the JPA specification itself is pojo (normal, traditional Java object), so it is thought that entity can be used directly as a DTO (data Transfer object, data transfer objects), so that the DAO component is renamed to the EAO component;

Business Logic Layer Component: Implementing the business logic of the system, usually using the session bean; In general, a business logic method corresponds to a user operation; a business logic method should be a whole, adding transactional to the business logic method, and the business logic method is only responsible for implementing the business logic, Database access should not be made, so the original hibernate and JDBC APIs should not appear in the business logic component;

Environment:

The Java EE SDK (Java Enterprise editionsoftware Development Kit) needs to be installed before the server can be installed before installing the required environment for classic Java EE applications.

JAVAEESDK is a development toolkit for enterprise-class applications that already contains many of the "components" needed to develop enterprise-class applications, providing a convenient development platform for Java EE Development, so it's directly called the Java EE SDK;

at present, there is little direct use Java EE SDK Development ;

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.