2016.5.26 essay ———— The concept of JavaBean, POJO and EJB

Source: Internet
Author: User

Probably know what these refer to, but rather vague, so summarize:

1. Development history

Java1996 released the JavaBean 1.00-a in December of the year

The effect is that the value of the object can be set by a uniform specification (Get,set method), which is the original Java bean.

In the actual enterprise development, need to realize the transaction, the security, the distributed, then the JavaBean is not good use.

Sun began to heap its functions inside, where the JavaBean complex was EJB

So EJB English is Enterprise java bean

EJB is powerful, but it's too heavy.

At this point, Di (Dependency injection), AOP (aspect-oriented) technology

EJB can also be done with simple Java beans, where Java beans are simplified to pojo.

Spring was born.

2. Conditions that Java beans need to meet

1> All properties are private

2> provides a public default construction method (such as no parameter constructor)

3> Getter Setter Method (the only way to access the JavaBean property externally)

4> implementation of serialization is the serializable interface. (Implementation framework, tool cross-platform reflection status required)

3. The relationship of EJB POJO JavaBean

EJBs are a complication of javabean, requiring scalable performance and transactions, security mechanisms, and so on.

POJO (Plain ordinary Java Object)

Is the simplest JavaBean attribute +getset method

4. Some related noun concepts

PO (Plain Object): When used for persistence (for example, saving to a database or cache)

VO (Value Object): Used for foreground display (e.g. parsing in JSP or passing data to foreground)

DTO (data Transfer object): Used for interface invocation return, data transfer (e.g. many interface call return values or message queue contents)

5. Personal understanding

Pojo is the simplest javabean,private property and the public Get set method, which does not inherit any other class

EJB is an extension of JavaBean, JavaBean is encapsulated, EJB makes it necessary to implement more functions in JavaBean

JavaBean: A collectively referred to as the simplest need to meet those 4 conditions

2016.5.26 essay ———— The concept of JavaBean, POJO and EJB

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.