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