Summary of some code analysis of duwamish7
Foreword: Thanks YHCNUX (1), because I am also learning duwamish7, "understanding (1)" help me very much. The project we have to do is very large, I start school .NET, I hope to quickly grasp the .NET development framework by studying Duwamish7.
I have just learned a week, in addition to sharing my learning experience, my most important purpose is to hope that the prawn give me some guidance. I don't understand the place or not understand and understand the wrong place. I am not grateful! ! (Oh, this is the original text of (1), but it also applies here)
According to the documentation of Duwamish7, the project is divided into web layers, business appearance layers, business rules layers, data access layers, data layers (that is, database).
1. Web layer
Function: Complete the interaction, initial legality test, form a business object (that is, class in Common), call the business appearance layer.
Code Features: More User Controls, most of the features are implemented in user controls.
Code Analysis: Not high for code package, mainly used to display interface, so it is basically not using custom controls.
Code Summary: User control is relatively easy. If you only package the interface, you can use the user control instead of a custom control.
2. Business appearance layer
Function: Packaging interface, calling business rules or data access layers.
Features: Complete the association of the performance layer and the logical layer.
3. Business logic layer
Function: Implement business rules and call the data access layer.
Features: The logic analysis is determined.
4. Data Access Layer
Function: Update the recordset, call the stored procedure.
Code Features: Inherited the IDisposable interface, release the non-hosting resources.
Code summary: For unmanaged resources, it must be explicitly closed, or release it.
In addition, the shopping cart object is placed in a session state, so inherits the serialization interface, saved in memory after the target serialization, and then retrore sequentially.
Database connection, the security settings of the project are placed in the configuration file.
Not necessarily correct, please advise!