JavaBean is a key component in Java that can be cross-platform, often used in JSP
Encapsulates business logic and database Operations.
JavaBean is actually a Java class, and this class can be reused.
The JavaBean function is divided into two categories:
Encapsulating data
Packaging business
JavaBean General conditions to meet the Requirements:
is a public class and provides an Argument-free construction method.
property is Private.
has a public setter and getter Method.
Application of Javabean:
JavaBean Package Data:
is actually a field of a table in the database to encapsulate,
Each property corresponds to field one by one in the database Table.
JavaBean Package Business:
The javabean of encapsulated data typically has a wrapper for that class.
Business logic and operations correspond to it. Such as: classes in the DAO Layer.
Service tiers are used to store business logic-related Operations.
Interfaces and classes in the service layer implement encapsulation and invocation of the DAO Class's METHODS.
The concept of JavaBean