Skip to main content

Python Web-Frameworks(Django)

" Python Web-Framework"        

 Frameworks make everything easier by offering a structure to it. They allow                     developers to focus on application logic and automate the implementations.

 In this blog we are going to see some Python Web Frameworks that will be useful for professional backend developer and improving your skills.

Recently Stack Overflow has released the result for their annual developer survey for 2019 which declared how Python is the fastest-growing programming language.

By this time , Django and Flask are the two most popular frameworks but python is not limited to this, it has way more than these. Each and every other framework is unique in itself and has it's own importance. These all will ultimately uplift your skill sets to a new height.


How to choose a perfect Framework for your project

when you are deciding about which framework to use , always keep few things in mind :

  1. First thing you need to see is complexity and size of your project. Choose a framework depending on your project.
  2. Second thing you need to check is weather your framework you're selecting can scale vertically and horizontally. This is really important to run the projects on different servers, handle the amount of huge traffic, support the additional features and many more.
  3. A final decision should be consider on your understanding of project. 

One of the most popular Framework in Python :


Django



 
Django is a Python-based free and open source web framework. Django primary goal is to ease the creation of complex, database-driven websites. The framework emphasizes reusablility and "pluggability" of components, less code, low coupling,rapid development, and the  principle of don't repeat yourself. Python is used throughout, even for settings, files, and data models. Django also provides on administrative create,read,update and delete interface that is generated dynamically through introspection and configured via admin models.

Components : 

Despite having its own nomenclature, such as naming the callable objects generating the HTTP responses "view", the core Django framework can be seen as an MVC architecture It consists of an object-relational mapper (ORM) that mediates between data models (defined as Python classes) and a relational database ("Model") a system for processing HTTP requests with a web templating system ("view") ,and a regular-expression-based URL disaptcher ("Controller").

Also included in the core framework are :
  1.  a lightweight and standalone web server for development and testing.
  2. a template system that utilizes the concepts of inheritance borrowed from object-oriented programming.
  3. a caching framework that can use any of several cache method
  4. a system for extending the capablities of the template engine, and,
  5. an interface to python's built-in unit test framework.

Bundled applications

The main Django distribution also bundles a number of applications in its "contrib" package , including:
  1. an extensible authentication system,
  2. the dynamic administrative interface,
  3. tools for generating RSS and Atom syndication feeds,
  4. tools for generating Google sitemaps, and,
  5. a framework for creating GIS applications.

Extensibility

Django's configuration system allows third party code to be plugged into a regular project, provided that it follows the reusable app conventions. More than 2500 packages are available to extend the framework's original behaviour , providing solutions to issues the original tool didn't tackle: registration, search, API  provision and consumption , CMS, etc.

The extensibility is, however , mitigated by internal components dependencies.While the Django philosopy implies loose coupling , the template filters and tags assume one engine implementation, and both the auth and admin bundled applications require the use of the internal ORM. None of these filters oor bundled apps are mandatory to run a Django project, but reusable appps tend to depend on them, encouraging developers to keep using the official stack in order to benefit fully from the app ecosystem.

Server arrangement 

Django runs in conjuction with Apache, Nginx using WSGI, GUNICORN, or CHEROKEE using flup( a python module. Django also includes the ability to launch a FastCGI server, enabling use behind any web server which supports FastCGI such as Lighttpd or Hiawatha. 
Django officially supports five database backends :
PostgreSQL, MySQL, MariaDB , SQLite , and Oracle. 



Other important links:

https://www.djangoproject.com/start/

https://docs.djangoproject.com/en/3.1/intro/tutorial01/

https://docs.djangoproject.com/en/3.1/intro/install/


[source: wikipedia]


                   

Comments

Post a Comment

Popular Posts