Web Frameworks for Beginners: A Simple Explanation. Part 1
A web framework is a framework for writing web applications. It defines the structure, sets the rules, and provides the necessary set of development tools.
Types of web frameworks
Web application frameworks can be classified on two grounds: the tasks they solve and size.
Backend frameworks
These are web development frameworks that run on the server side. Basically, they are responsible for separate, but critical parts of the application, without which it will not be able to work normally. Here are some of the most popular frameworks and the languages they work with:
Django-Python
Symfony, Laravel – PHP;
Express.js – JavaScript
Ruby on Rails
The rules and architecture of server frameworks make it impossible to develop a web application with a rich interface. They are limited in their functionality, but you can still create simple pages and different forms. They can also generate output data and be responsible for security in case of attacks.
Frontend frameworks
Frontend frameworks are responsible for the appearance of a web application. Unlike server ones, they have nothing to do with the logic of work. This type of framework runs in the browser. With their help, you can improve and implement new user interfaces, create different animations and single-page applications. Here is some of them:
Angular;
vue.js;
Svelte;
React is technically not a framework, but a library, but the value of this tool is so great that it is constantly compared with other web frameworks.
All of these tools use JavaScript.
Full stack frameworks
If the framework solves problems both on the server and on the client side, then it belongs to the full stack category. An example is Meteor. Both of its sides – server and client – work on JavaScript. Therefore, you can create and use the same code for them. The next feature is “real time mode”. When you change something in one interface, changes occur in the rest.
The full stack also includes the Next.js and Nuxt frameworks. The first one is built on top of React.js and the second one is powered by Vue.js. Such web frameworks can be difficult for beginners.
Frameworks and microframeworks
Web development frameworks vary in size. There are monstrous tools that offer solutions for everything. More lightweight options specialize in solving specific problems. Such frameworks are called microframeworks. Their functionality is extended with the help of third-party applications. You can create small projects based on them or combine a microframework with a large framework.
Web framework architecture
The architecture of almost all popular web frameworks is based on the decomposition of several separate layers (applications, modules, etc.). This means that you can expand the functionality based on your needs and use the modified version along with the framework code or add third-party applications.
There are many open-source communities and commercial organizations that create apps or extensions for popular frameworks like Django REST Framework, ng-bootstrap, etc.
MVC – Model, View and Controller (Model-View-Controller) are the three components of every web framework.
- The model contains all the data and business logic layers, its rules and functions.
- The view is responsible for the visual display of data.
- The Controller converts the input into commands for the Model and View.
- They are inseparable from each other, so it is important to understand everything properly in order to avoid errors while the application is running.