WithVisual Studio 2008AccordingMS-RLThe protocol provides developers. NET FrameworkOfSource codeIncluding base class libraries(BCL),ASP. NET,WinformsAndWPFAnd so onCode.. NET FrameworkYes. NetThe platform's infrastructure, its open source code, provides developers with more in-depth research. NetThe technical details provide great convenience and help developers buildAn excellent software development framework provides a good reference.
BuildAn excellent software development framework will inevitably use the design model.. NET FrameworkAs an excellent software development framework, the design pattern is everywhere. By analyzing these codes, it is very helpful for us to correctly use the design pattern.
First, understand the concepts of frameworks and models.
Framework: An architecture-based reusable design in a specific field.
Mode: Methodology for solving a certain type of problem.AlexanderThe classic definition is that each mode describes a problem that is constantly emerging in our environment, and then describes the core solution of the problem. In this way, you can use existing solutions countless times without repeating the same work.
Why use the framework? As software systems have become very complex today, especially the knowledge, content, and problems of server-side software and design. Using someone else's mature framework in some ways is equivalent to letting someone else do some basic work for you. You only need to concentrate on completing the business logic design of the system. In addition, the framework is generally mature and robust. It can handle many details of the system, such as transaction processing, security, and data flow control. There are also frameworks that are generally used by many people, so the structure is very good, so the scalability is also good, and it is constantly upgraded, you can directly enjoy the benefits of other people upgrading code. The framework is generally on a low-level application platform (for exampleJ2EE,. Net) And high-level business logic.
Why use the mode? Because the mode is a kind of guidance, under a good guidance, it will help you complete the task, and help you make a good design solution to achieve twice the result with half the effort. In addition, we can find the best solution to the problem.
Relationships between frameworks and design patterns:
Design Patterns and frameworks are two different research fields in software design. The design pattern is a solution to the design problem. A pattern can be applied to different frameworks and implemented by different languages, while a framework is an application architecture, it is a mixture of one or more design patterns and code. Although they are different, they work together to make people's design reusable, And there is uniformity in their thinking, therefore, the idea of the design pattern can be applied in the framework design.
There are significant differences between frameworks and design patterns, mainly manifested in the content provided by the two and the fields dedicated to application:
1)In the application field, the Framework provides the architecture of the entire application, while the design model provides a solution to a single design problem, and this solution can be applied in different applications.ProgramOr the application in the framework.
2)In terms of content, the design mode is only a simple design, which can be implemented by different languages without any need; while the Framework is a mixture of design and code, programmers can extend the framework in various ways to form different applications.
3)The design mode is easier to transplant than the framework. Although the framework has not yet formed a complete application, the development of applications based on the framework is obviously subject to the implementation environment of the framework. The design mode is irrelevant to the language, therefore, it can be applied in a wider range of heterogeneous environments.
In short, the framework is software, and the design model is the knowledge body of the software, improving the design level of the framework.