Django REST framework (DRF) is a open source, mature and well supported Python Django library that aims at building sophisticated web APIs. It is flexible and fully-featured toolkit with modular and customizable architecture that makes possible development of both simple, turn-key API endpoints and complicated REST constructs. The only REST framework’s dependencies are Python (2.6.5+) and Django (1.30+). All other packages are optional, e.g. for filtering and OAuth support, or Markdown, PyYAML, defusedxml for Markdown, YAML, XML content types support.
Django REST framework contains wide set of out of the box features, but the core view class is very simple and framework in general is easy to use. The main idea behind the DRF is to clearly divide a model, the generalized wire representation (e.g. JSON, XML, etc.), and set of generic Class-Based-Views that can be customized to satisfy the specific API endpoint using Serializer that describes the mapping between them.
The framework is based on Python — a high-level, dynamic, and interpreted programming language, well-loved by developers.
Django’s documentation is exemplary. It was initially launched with high-quality docs, and they are still maintained at the same level, which makes it easy to use. More than that, one of Django’s main purposes is to simplify the development process: it covers the basics, so you can focus on the more unique and/or complex features of your project.
Django is not an enterprise solution like C# or Java, yet it suits most types of projects, no matter their size. For example, if you’re building a social media type web application, Django can handle the growth at any scale and capacity, be it heavy traffic or volumes of information. But if you want to make something simple, using Django for web development of a blog or a book database, for instance, is an excellent choice as well since it has everything you need to quickly assemble a working application.
Django follows the DRY (Don’t Repeat Yourself) principle, which means you can replace frequently repeated software patterns with abstractions, or use data normalization. This way, you avoid redundancy and bugs. Plus, reusing the code simplifies development so you can focus on coding unique features. KISS means “Keep It Short and Simple”, among its many variations. In Django, it means simple, easy to read, and understandable code. For example, methods shouldn’t be longer than 40-50 lines.
2024 Technoarch Softwares | Login