- Learning Website Development with Django
- Ayman Hourieh
- 563字
- 2021-07-02 11:41:15
Why Django?
Since the spread of the MVC pattern into web development, Python has provided quite a few choices when it comes to web frameworks, such as Django, TurboGears and Zope. Although choosing one out of many can be confusing at first, having several competing frameworks can only be a good thing for the Python community, as it drives the development of all frameworks further and provides a rich set of options to choose from.
Django is one of the available frameworks for Python, so the question is: what sets it apart to become the topic of this book, and what makes it popular in the Python community? The next subsections will answer these questions by providing an overview of the main advantages of Django.
Tight Integration between Components
First of all, Django provides a set of tightly integrated components; all of these components have been developed by the Django team themselves. Django was originally developed as an in-house framework for managing a series of news-oriented websites. Later its code was released on the Internet and the Django team continued its development using the Open Source model. Because of its roots, Django's components were designed for integration, reusability and speed from the start.
Object-Relational Mapper
Django's database component, the Object-Relational Mapper (ORM), provides a bridge between the data model and the database engine. It supports a large set of database systems, and switching from one engine to another is a matter of changing a configuration file. This gives the developer great flexibility if a decision is made to change from one database engine to another.
Clean URL Design
The URL system in Django is very flexible and powerful; it lets you define patterns for the URLs in your application, and define Python functions to handle each pattern. This enables developers to create URLs that are both user and search engine friendly.
Automatic Administration Interface
Django comes with an administration interface that is ready to be used. This interface makes the management of your application's data a breeze. It is also highly flexible and customizable.
Advanced Development Environment
In addition, Django provides a very nice development environment. It comes with a lightweight web server for development and testing. When the debugging mode is enabled, Django provides very thorough and detailed error messages with a lot of debugging information. All of this makes isolating and fixing bugs very easy.
Multi-Lingual Support
Django supports multi-lingual websites through its built-in internationalization system. This can be very valuable for those working on websites with more than one language. The system makes translating the interface a very simple task.
The standard features expected of a web framework are all available in Django. These include the following:
- A template and text filtering engine with simple but extensible syntax.
- A form generation and validation API.
- An extensible authentication system.
- A caching system for speeding up the performance of applications.
- A feed framework for generating RSS feeds.
Even though Django does not provide a JavaScript library to simplify working with Ajax, choosing one and integrating it with Django is a straightforward matter, as we will see in later chapters.
So to conclude, Django provides a set of integrated and mature components, with excellent documentation, at http://www.djangoproject.com/documentation/, thanks to its large community of developers and users. With Django available, there has never been a better time to start learning a web development framework!
- Excel圖表與表格實戰技巧精粹
- UG NX 12.0中文版完全自學一本通
- 持續演進的Cloud Native:云原生架構下微服務最佳實踐
- Sphinx Search Beginner's Guide
- Flash CC從入門到精通
- 我為PS狂 Photoshop照片處理一分鐘秘笈
- UG NX 完全實例解析
- 邊做邊學:平面廣告設計與制作(Photoshop 2020+Illustrator 2020·第3版·微課版)
- Premiere Pro影視后期編輯:短視頻制作實戰寶典
- 中文版After Effects CC 2018 動漫、影視特效后期合成秘技
- Instant Flask Web Development
- 中文版Photoshop CS5平面設計實用教程(第2版)
- Revit技巧精選應用教程
- 中文版Photoshop 2020基礎培訓教程
- SAP Business ONE Implementation