Home Common Problem What is a framework?

What is a framework?

Jul 28, 2020 am 10:16 AM
frame

What is a framework?

Framework (Framework) is a group of cooperating classes that constitute a reusable design for a specific type of software. The framework specifies the architecture of your application, defining the overall structure, the division of classes and objects, the main responsibilities of each part, how classes and objects work together, and the control flow.

The framework predefines these design parameters so that application designers or implementers can focus on the specific details of the application itself.

Why use a framework

Because the development of software systems has become very complex today, especially server-side software, involving knowledge, content, and problems too much. Using other people's mature frameworks in some aspects is equivalent to asking others to help you complete some basic work. You only need to concentrate on completing the business logic design of the system. Moreover, the framework is generally mature and robust, and it can handle many detailed issues of the system, such as transaction processing, security, data flow control and other issues. In addition, frameworks are generally used by many people, so the structure is very good, so the scalability is also very good, and it is constantly upgraded, and you can directly enjoy the benefits of other people's code upgrades.

Frameworks are generally located in the middle layer between low-level application platforms (such as J2EE) and high-level business logic.

Why should software be layered? In order to achieve "high cohesion and low coupling". Dividing problems into individual solutions makes them easy to control, easy to extend, and easy to allocate resources... In short, there are many benefits.

Framework and design pattern

The two concepts of framework and design pattern are always easy to be confused, but in fact there is still a difference between them. Components are usually code reuse, while design patterns are design reuse, and frameworks are somewhere in between, with some code reuse, some design reuse, and sometimes analysis reusable. There are three levels of reuse in software production: internal reuse, which is abstract blocks that can be used publicly in the same application; code reuse, which is combining common modules into libraries or toolsets so that they can be used in multiple applications and domains; application Reuse of frameworks, i.e. providing common or off-the-shelf infrastructure for specialized domains, to achieve the highest level of reusability.

Although frameworks and design patterns are similar, they are fundamentally different. Design patterns are descriptions of recurring problems and solutions to the problems in a certain environment. They are more abstract than frameworks; frameworks can be represented by code and can be directly executed or reused, while only instances can be used for patterns. Represented by code; design patterns are smaller elements than frameworks. A framework often contains one or more design patterns. A framework is always aimed at a specific application field, but the same pattern can be applied to various applications. It can be said that the framework is the software, and the design pattern is the knowledge of the software.

Framework development

The biggest benefit of the framework is reuse. The biggest reuse method obtained by object-oriented systems is the framework. A large application system may often be composed of multiple layers of frameworks that cooperate with each other.

Because the framework can reuse code, it becomes very easy to build applications from an existing component library, because the components all use interfaces uniformly defined by the framework, making communication between components simple.

Frameworks can reuse designs. It provides reusable abstract algorithms and high-level designs, can decompose large systems into smaller components, and can describe the internal interfaces between components. These standard interfaces make it possible to build a variety of systems through assembly based on existing components. As long as it conforms to the interface definition, new components can be inserted into the framework, and component designers can reuse the design of the framework.

The framework can also reuse analysis. If all personnel analyze matters according to the idea of ​​the framework, they can divide it into the same components and adopt similar solutions, so that analysts using the same framework can communicate with each other.

Main features

The software structure in the field is consistent; establish a more open system;

The reuse of code is greatly increased, and the software production efficiency and Quality has also been improved;

Software designers should focus on understanding the domain to make demand analysis more complete;

The experience is stored, allowing experienced personnel to design frameworks and Domain components, not necessarily limited to low-level programming;

Allows the use of rapid prototyping technology;

Conducive to multiple people working together within a project;

Strong reuse makes the average Development costs are reduced, development speed is accelerated, developers are reduced, maintenance costs are reduced, and the parameterized framework enhances adaptability and flexibility.

For more related knowledge, please visit: PHP Chinese website!

The above is the detailed content of What is a framework?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to evaluate the cost-effectiveness of commercial support for Java frameworks How to evaluate the cost-effectiveness of commercial support for Java frameworks Jun 05, 2024 pm 05:25 PM

How to evaluate the cost-effectiveness of commercial support for Java frameworks

How do the lightweight options of PHP frameworks affect application performance? How do the lightweight options of PHP frameworks affect application performance? Jun 06, 2024 am 10:53 AM

How do the lightweight options of PHP frameworks affect application performance?

Golang framework documentation best practices Golang framework documentation best practices Jun 04, 2024 pm 05:00 PM

Golang framework documentation best practices

How to choose the best golang framework for different application scenarios How to choose the best golang framework for different application scenarios Jun 05, 2024 pm 04:05 PM

How to choose the best golang framework for different application scenarios

How does the learning curve of PHP frameworks compare to other language frameworks? How does the learning curve of PHP frameworks compare to other language frameworks? Jun 06, 2024 pm 12:41 PM

How does the learning curve of PHP frameworks compare to other language frameworks?

Performance comparison of Java frameworks Performance comparison of Java frameworks Jun 04, 2024 pm 03:56 PM

Performance comparison of Java frameworks

Detailed practical explanation of golang framework development: Questions and Answers Detailed practical explanation of golang framework development: Questions and Answers Jun 06, 2024 am 10:57 AM

Detailed practical explanation of golang framework development: Questions and Answers

Golang framework performance comparison: metrics for making wise choices Golang framework performance comparison: metrics for making wise choices Jun 05, 2024 pm 10:02 PM

Golang framework performance comparison: metrics for making wise choices