The English word framework can be translated as frame, frame or structure. That is, such a concept means something solid, for example, when compared with the construction industry, the construction of a building. For example, today almost all high-rise buildings are built using monolithic-frame technology. The basis of such a structure is reinforced concrete structural elements. And already on them the internal content and external design of the structure are formed. Or prefabricated buildings – shopping centers, industrial and logistics complexes. Metal frames are used there, which are used as a “skeleton”. And then, at the discretion of the customer, the structure is sheathed with sandwich panels or other facing materials. As a rule, standard structural elements become the basis of such objects or they are specially made to order.
Why this excursion into the construction industry? It’s just that using such an example it’s easier to explain to a person who is far from programming what a framework is. This piece of code is intended to simplify and speed up creating websites and in general any software. In fact, the framework is a set of basic software modules (the same frame, by analogy with the construction of a building). It acts as a basis for the development of other, specific components of the program code. As a result, the developer only has to write the missing components, and the architecture of the program (for example, design, structure, its execution, code interpretation rules) is determined by the frameworks used by the developer. Let’s talk in more detail about such “frameworks” that are actively used in software development.
A framework to help you: how to make your coding job easier
So, a framework is a piece of code “borrowed” from third-party developers in order to simplify and speed up the process of creating a software product. In general, such “frameworks” are developed by entire teams of programmers working in large companies, for example, in the same ubiquitous Google.
Don’t confuse frameworks with libraries. Yes, a library is also code written by a developer, or already available in the standard functionality of programming languages. Their use contributes to a more efficient solution of typical tasks or frequently encountered problems. However, there are significant differences:
- The developer accesses the library at his own discretion. It decides for itself when it is necessary to use a certain set of functions contained in it to perform a specific task when writing code. The developer is also responsible for the order in which commands are executed.
- Frameworks take control of the development process. They connect the program code, providing a basis for the formation of specific components on it.
- It can be said that frameworks do not ask anyone for permission to do this or that action, but they themselves “decide” the degree of their participation in writing code. They take over the creation of authorization forms, tables or automatic generation of layout, they can set the location and file names.
- The framework is responsible for the formation of the program architecture, and libraries are connected to the code at the request of the developer. If we turn again to analogies with construction, then it is more correct to compare the library with a working tool, for example, a concrete mixer. The use of such tools is entirely up to the builder (in our case, the developer).
Extensibility as a way to evolve functionality
The beauty of frameworks is that they can be extended. In fact, such software modules provide a basis for creating a software product, but they can be supplemented for a specific purpose. At the same time, the code generated by frameworks, as a rule, does not change during the development process. And on it, as on a frame, the required components are added.
To give an example, the popular HTML and JavaScript framework AngularJS is used by web application developers. He is responsible for choosing the main characteristics of the software product: it marks pages for the full and mobile versions, synchronizes with server data, generates syntactic features of the template, and ensures cross-platform (when pages are displayed the same way on iPhones and smartphones with Android “on board”). To expand the functionality, you can connect a number of libraries. However, connecting Angular to another framework is unrealistic in principle, since its tasks include running code on the site.