paint-brush
What Is a Web Framework?by@djangostars
1,111 reads
1,111 reads

What Is a Web Framework?

by Django StarsJanuary 11th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Is it good, bad or ugly? What are the cons and pros of using web frameworks? Let’s try to sort that out.

Company Mentioned

Mention Thumbnail
featured image - What Is a Web Framework?
Django Stars HackerNoon profile picture

Is it good, bad or ugly? What are the cons and pros of using web frameworks? Let’s try to sort that out.

Web framework is a set of components designed to simplify your web development process. It has basic structuring tools in it, which serve as a solid base for your project. It allows you to focus on the most important details and project’s goals instead of creating things, that you can simply pull out of the framework.

Imagine that your web application or a website should be something more than one page with your photo somewhere on the internet. Instead, it needs :

  • Login form
  • Menus
  • Photo or Video gallery
  • Dashboard
  • Social Sharing options
  • Database
  • Security (csrf protection, sql escaping, clickjacking protection, etc…)
  • Other stuff

Frameworks can cover all the things listed above. They were created by developers for developers with the understanding of the basic needs.

Let’s compare coding to a building process. If you need to build a house — you probably know that there will be some walls, windows, doors (with some possible locks), a roof and something else. Instead of building a wall brick by brick you may ask your framework: ”Hey, framework, I need a wall” and you will receive your wall immediately (you will be able to adjust and customize your wall afterwards to make it perfect, but you receive a pretty normal wall from the very beginning). Still, every framework dictates its own rules and has its own limits.

Attention!!! Chose frameworks wisely, according to your needs. Some frameworks know everything about the walls but nothing about the windows (no offense to Mr. Bill Gates and co.)

Every framework is designed to solve some group of tasks or problems. In case you can not find the framework for your programming language that fits your needs (it is rare but possible) — that’s probably a small signal to write the code from scratch.

Pros and Cons

Pros:

  • Saves time, makes development process going faster
  • Ease of maintenance
  • Security
  • Saves customer’s money (developers do not waste time to write thousands lines of code to create common things that have been already created, they can focus on making the project unique)

Cons

  • Every framework has its limits and rules

You may find the list of the most common web frameworks below:

Python:

  • Django
  • Flask
  • Tornado

Javascript:

  • Angular.js
  • React.js
  • Ember.js

Ruby:

  • Rails
  • Sinatra

Those are just few out of more than a hundred frameworks available nowadays.

The paradox of choice

Barry Schwartz said: ”It is easy to imagine the attractive features of alternatives you reject that make you less satisfied with the alternative you have chosen”. Please, try not to be lost in the huge variety of options that rather brings paralysis than freedom. Frameworks are good but not perfect. Accept it and answer few questions before choosing one :

  • What programming language are you most comfortable with?
  • Will the chosen framework meet your needs?
  • Is there a good supporting documentation?
  • Is it a popular, long living and evolving framework?

And the last but not the least. Try it. Try it and you will be able to gain your own experience, make your own conclusions and share those with the world.

Primary source