WEB FRAMEWORK

 

Web Frameworks: How To Get Started

  • VIEWED:

    35772
  • SHARED:

    36
Web Frameworks: How To Get Started
alexander-ryabtsev

Alexander Ryabtsev

SOFTWARE ENGINEERING LEAD @ DJANGO STARS

Web frameworks have transformed the world of programming and become vitally important in every development process. Even the smallest unit of an application is comprised of coding, and a web framework simply automates it. You might try browsing different sites, books and articles about it, but find only general and ambiguous information – nothing but endless definitions and difficult terms that make your head spin. Well, it’s time to handle this issue and get a clear understanding of web frameworks.

Table of Contents

What Are Web Frameworks

A web framework is a software tool that provides a way to build and run web applications. As a result, you don’t need to write code on your own and waste time looking for possible miscalculations and bugs.

In the early days of web development, all applications were hand-coded, and only the developer of a certain app could change or deploy it. Web frameworks introduced a simple way out of this trap. Since 1995, all the hassle connected with changing an application’s structure has been put in order because of the appearance of a general performance. And that’s when web-specific languages appeared. Their variety is now working well for both static and dynamic web pages. You can choose one framework that covers all your needs or merge several, depending on your task.

Types of Web Frameworks

There are two main functions of frameworks: to work on the server side (backend), or on the client-side (frontend), corresponding to their type. This division is not complicated and looks like this:
web framework
Frontend frameworks deal mostly with the external part of a web application. Briefly, it’s what a user sees when they open the app. The inside stuff is the work of the backend.
Let’s take a more detailed look at all these.

Server-side frameworks. The rules and architecture of these frameworks allows you to create simple pages, landings and forms of different types. However, in order to build a web application with a well-developed interface, you should have a wider functionality. These frameworks can also form the output data and improve security in case of web attacks. All of these can definitely simplify the development process. Server-side frameworks work mostly on particular but important details without which an application can’t work properly. Here are top backend frameworks and the languages they work in:

  • Django – Python
  • Zend – PHP*
  • Express.js – Javascript
  • Ruby on Rails – Ruby

Client-side frameworks. Unlike the server side, client-side frameworks have nothing to do with business logic. Their work takes place inside the browser. Thus, one can improve and implement new user interfaces. Numerous animated features can be created with frontend frameworks as well as SPA (single-page applications). Each of the client-side frameworks differs in function and use. For comparison purposes, here they are:

  • Backbone+Marionette
  • Angular
  • Ember.js
  • Vue.js

All of the frameworks mentioned above use Javascript as their coding language.

Cross-functional frameworks. Meteor is known as a full-stack web framework. It means that it covers almost all the needs of both the client and server sides, which makes Meteor extremely popular and widely used. You don’t have to waste your time merging two frameworks using REST API; you can simply choose this one and accelerate your development process.
But this is not the main feature of Meteor. The two sides work in one language, so you can create and use the same code for both. The next thing is “real-time mode” – when a change is made to one interface, it happens to all the others, too. One example is a shareable document or a spreadsheet. When you add some comments to pages you read or edit, other users will also see them.

That is all about type division, but dimensions are important as well. The “size” of different frameworks is also different. There are some “monsters” in the framework world that provide all-in-one solutions.

But some lightweight solutions focus on a narrow specialization; these are calledmicro-frameworks. These buddies won’t provide everything you need out of the box, but sometimes it’s better to decompose the functionality across several approaches (frameworks, micro-frameworks, libraries). You can extend micro-framework functionality with third-party applications and build some small projects on top of it, or combine micro-frameworks with your main “big” framework.

For example: if your web app is based on Django and you need websockets, you can use the aiohttp micro-framework to do it.

Another example: if you app is not very big and you need only simple URL-routing and templates with an fairly uncomplicated context, you can use Flask with Jinja2 (or any other template engine) instead of Django.

Python & Django development

Your chance to enter the market faster

LEARN MORE

Web Frameworks: Features and Architecture

Despite the fact that frameworks are all different and it can be extremely hard to choose one, they all have something in common. I’m talking about their architecture and features, which are as important as functions.

Architecture

The architecture of almost all most popular web development frameworks is based on the decomposition of several separate layers (applications, modules, etc), which means that you can extend functionality according to your requirements and integrate your changes with framework code, or use third-party applications designed by external vendors. This flexibility is another key benefit of frameworks. There are a lot of open-source communities and commercial organizations that produce applications or extensions for popular frameworks e.g., Django REST Framework, ng-bootstrap, etc.).

The MVC – that is, a Model, View and Controller – are the three things each web framework is made of. It is considered to be a basic structure, but there can be several contrasts among them.
Web-Framework-Architecture

Previous Post Next Post