The concept of JavaBean

Source: Internet
Author: User

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

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.