A framework is a set of files and guidelines that define the structure and methodology, on how to do the development of a software project. You could say that it is a guide or a scheme that helps us to program easily and quickly.
Its objective is the agile development of applications through the contribution of libraries and functionalities already developed.
Mainly, Framework allows us to focus on the problem, instead of worrying about implementing features that are commonly used in many applications.
Characteristics of Frameworks:
Almost all frameworks share the same characteristics according to their type, among which we can highlight, are:
- Authentication through login and password that allows you to restrict access and type of permission.
- Access to data in txt, xml files for example through interfaces that integrate the database.
- Abstraction of URLs and Sessions since the framework is responsible for managing them.
- Internationalization that allows the inclusion of several languages in the development.
- Controllers easily adaptable to the needs of the project that manage requests and events.
Benefits of Framework:
Structure and organization of the default code. Frameworks provide both a skeleton and a way of working. Therefore, avoid having to perform an analysis on where to place the different files of the application (resources, drivers, views, models, etc.).
Reuse of the code. Avoid code duplication. In the development of an application there are certain sections that are often repeated, such as the connection to the database, validation of forms, pages of styles, etc. With the use of a framework we will save time in developing functionalities that are already covered and we will be able to focus on the operation of the application rather than on how to carry it out.
Agility and rapidity in the development. Precisely thanks to the code reuse mentioned above, we get faster development, since we will not waste time developing new features.
Lower cost of the development. Cost is a parameter that is directly related to speed and agility. Finishing a project before implies that the dedication is less and therefore the cost of the project also decreases. Like the speed of development, this advantage benefits both the client and the developer.
Good development practices with the use of patterns. Most frameworks are based on patterns of designs, which indicate guidelines on how to solve a specific problem that have already occurred before. The most popular design pattern is MVC (Model-View-Controller), which helps us to separate the data layer from the business logic of the user interface.
Minimize errors and easier to solve them. As the framework already incorporates code implemented by other programmers, the possible errors that this may have will always be less than when developing it from scratch. Also, in case there is an error, it is likely that it has already been solved by the community.
Ease when it comes to finding a library or code that already covers functionalities of your development. It is easier to find tools (utilities, libraries) adapted to the framework than for their own development.
Facilitate collaboration with other developers. Whether they are teammates or GitHub, reading the code developed by another person can be complex. However, if you already know what structure the code will follow and how it is organized, it will be easier to understand and apply the new changes. Which brings us to the next advantage.
It facilitates the maintenance. If all the members of a team work in the same way, at the moment that the application has to be updated or to make an evolutionary one, it will take less time and the cost will be lower.