What is framework, web framework and Flask?

What is Framework?

  • Framework is a platform for developing software applications.
  • It may include a set of functions, predefined classes, code libraries, compiler or programs used in software development process.
  • It is a layered structure which indicates what kind of programs can/ should be built and how they would interrelate.

 

Difference between framework and API

  • Framework is similar to API but technically it includes an API.
  • Framework serves as foundation to programming.
    API provides access to elements supported by framework.

 

What is Web-Framework?

  • Web Framework is a (easier) way to build dynamic web sites, web-enabled applications and web services.
  • Basic purpose of Web-Framework:
    to hide infrastructural code related to handling HTTP requests and responses.
    How much is hidden depends on the framework.
  • All python web framework does following work:
    i) they recieve HTTP requests,
    ii) they dispach code that generates HTML,
    iii) creates an HTTP response with that content.

 

What is Flask?

  • Flask is a web framework written in python.
  • It takes the flexible python programming language and provides a simple template to build a web application.
  • This web application can be a web page, blog, wiki or a commercial website.
  • Flask is a micro framework. Microframework means that it has little to no dependency on external libraries.
  • It does not have database abstraction layer, form validation or any other components where third party libraries already exist to provide the same functionality.
  • But Flask has a good plugin support i.e. it supports extensions, which can add such functionality into an application.
What is framework, web framework and Flask?