DJANGO INTRODUCTION

Before starting to talk about the Django Framework I Django leave you a link to the official documentation which will come back very useful later. https://docs.djangoproject.com/it/4.0/. The main purpose of this first dedicated section is to provide a good overview of the Framework, and of the main parts that make it up. This will facilitate the understanding of the role played by the individual components, which we will analyze and use in detail in the following sections.

WHAT IS DJANGO

Django is a high-level Web Framework written in Python, which enables the development of secure and scalable websites quickly. Among its famous users, Django boasts: Instagram, Disqus, Pinterest, National Geographic, BitBucket, PBS, Washington Times, Mozilla and many others. Considering its popularity, and the fact that it is an Open Source Web Framework, we can count on timely and continuous software updates, a fantastic developer community and a lot of support. The fact that it is written using Python also allows for easy integration with the language library.

LET’S ENTER THE DETAIL

  • Completeness

Following the “batteries included” philosophy, the framework provides developers with many ready-to-use components, which allows them to focus on software development “without having to reinvent the wheel”

  • Safety

Django was conceived with a strong emphasis on security, and provides many useful tricks to avoid many of the most common mistakes. Among others, it provides automatic protection for vulnerabilities such as SQL injection, cross-site Scripting and cross-site request forgery.

  • Versatility

Django can be and has been used to create any type of site, CMS and WIKI, Social Networks, e-commerce sites, News and much more. It can provide content in many formats, such as HTML, JSON, RSS, and be extended by external components, such as Django Rest Framework. In addition, it natively supports databases such as MySQL, PostgreSQL and SQLite!

  • Scalability

Due to the architecture used, it is possible to scale a site written in Django to accommodate hundreds of millions of users!

  • Maintainability

Django was written respecting the D.R.Y.
or “Don’t Repeat Yourself”. This, coupled with its modular architecture, allows us to keep our code robust and up-to-date

  • Portability

Django is written using Python and therefore inherits its portable nature, allowing us to use it without problems in all the most commonly used operating systems

ARCHITECTURE

Architecture Django
Architecture MTV
Architecture MTV
Architecture MTV

We will return to each of these components several times, going into the details of their operation, for now, what really matters is to keep in mind an idea of how the MTV pattern works.