About 10 years ago, I just stepped into. NET development. At that time, a single-layer architecture was also very popular, dragging controls directly on the interface, and then binding data. Database Operations use native ADO. net. Each time a database connection is created, the connection is opened, the SQL is sent, the results are obtained, and the connection is closed. Every time I need to perform database operations, I copy and paste this section for a few months.
One day, a senior engineer introduced me to the database helper class named sqlhelper. After using this class, I found that development efficiency and quality multiply. Because you do not need to copy and paste back and forth, the redundant code is reduced, and the code is much simpler. In addition, you do not need to manually close the database connection and reduce the number of bugs. Although sqlhelper does not talk about the application framework, it gives me the first time to experience the powerful encapsulation. Afterwards, I began to focus on technical accumulation and encapsulated many things into helper for calling, which really benefited a lot.
To truly experience the strength of the application framework is to enter another company. At that time, I was preparing to develop a CRM program. A few days before I went in, the project manager gave me some simple training sessions and introduced how to develop new modules on their application framework. This framework generally includes:
- A bunch of helper, the basic things used are encapsulated.
- A set of ASP. NET webform custom controls. Most of the operations are configured through the attribute Panel, such as authentication and permissions.
- Some built-in modules, such as permissions and user management.
Developing that project is much easier than before, and the quality is higher. Everyone's code style is similar and easier to maintain. This project impressed me a lot and inspired me a lot. Later, I began to get familiar with some architecture, models, and frameworks, especially after accessing the csla application framework, I began to build a framework suitable for my habits.
Application Framework practice 2: Memories of a decade ago