C # benefits of code layering

Source: Internet
Author: User

1. for complex systems, the code structure is clearly layered to facilitate developers to understand and grasp the system as a whole. If the code is not hierarchical, the code that writes the logic in a method is like a document without a directory. To find out a specific section, you must view the full text once.

2. Based on the first point, it is easy for developers to maintain the code in a hierarchical manner. The basic architecture of the system can be automatically generated using tools (such as soft code generators. When the database changes, you only need to generate code again through the generator, and then modify some code in the business layer. Assume that when a system is developed using the three-tier architecture model, the developer can determine which layer needs to be changed through his own judgment.

3. once a good architecture is written, it can be used no matter how the UI Layer changes. For example, when Winform is used for development, it becomes web, but the code of the architecture does not need to be changed, only changes the interface performance (for example, the logic layer and data access layer remain unchanged when the three-tier architecture is used for development, but the UI Layer needs to be changed ). Manage the code so that the UI logic (UI) is separated from the business logic (BLL) and the data access code (DAL, in this way, the application can be migrated to the browser as needed in the future. This is also a manifestation of portability.

4. developers can save more time to focus on business implementation without having to worry too much about database connection, access, and other issues.

 

-- Note: the above individuals refer to others' post-resolution understandings. If there are any mistakes, please correct them.

Related Article

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.