Hierarchical development of software systems and hierarchical development of software systems
1. First, you need to know what layer is?
A: process data. The business logic interface is displayed in different projects. Multiple projects need to be coordinated and scheduled to develop a function module. This is the core of hierarchical development.
2. hierarchical implementation:
① DAL: data access layer and data interaction, processing data (cannot be executed separately)
② BLL
③ UI: Presentation Layer: displays data
3. Layered steps
① Create a DAL layer and Class Library Project
② Create a UI Layer, Windows Forms
③ On the reference node of the UI Layer, right-click the first item and add a reference. A form is displayed. Select solution, check DAL, and click OK.
④ On the UI Layer, the scheduling class can be implemented through using MySchool. DAL;
4. Main advantages of layered architecture:
① Code reuse
② Separated developers' concerns
③ Lossless replacement
④ Reduce dependencies between systems
5. common Exception Handling statements include try-catch, try-finally, and try-catch-finally. The catch Block can appear multiple times, but the catch Block exception type is sorted as a subclass exception.
6. throws statements are used to throw an exception. In a layered architecture, the lower layer is often used to throw the exception to the upper layer.
☆7. Precautions (Common Errors)
① UI depends on DAL
② Set the UI Layer as a startup project
③ Do not create a form in the class library.
④ Add reference in two steps: Physical reference (right-click to add) ++ add using in the code
⑤ During the initial stage of building a layered project, you must standardize the name and do not manually change the name.
8.
.