Skip to content

Instantly share code, notes, and snippets.

@vijayanandrp
Last active February 1, 2017 09:29
Show Gist options
  • Save vijayanandrp/94bafb48027daa4946b15325d50948a8 to your computer and use it in GitHub Desktop.
Save vijayanandrp/94bafb48027daa4946b15325d50948a8 to your computer and use it in GitHub Desktop.
[Web Developer] Django vs [REST API Developer] Django Rest framework in Python

[Web Developer] Django vs [REST API Developer] Django Rest framework Python


A web developer is a programmer who specializes in, or is specifically engaged in, the development of World Wide Web applications, or distributed network applications that are run over HTTP from a web server to a web browser.

Even though there are no formal educational requirements, dealing with web developing projects requires those who wish to be referred to as web developers to have advanced knowledge/skills in:

  • HTML/XHTML, CSS, JavaScript
  • server/client side architecture
  • Programming/Coding/Scripting in one of the many server-side languages or frameworks (e.g., Perl, Python, Ruby, PHP, Go, CFML - * ColdFusion, Java, ASP, ASP.NET)
  • Ability to utilize a database
  • Creating single-page application with use of front-end tools such as ReactJS[3] or AngularJS[4]

alt text


A REST API developer applications using simple HTTP methods, in either XML or JSON formats, making this an ideal API for developing mobile applications or external clients.

alt text

REST - REpresentaional State Transfer (Resource based Representations/multiple URIs pointed to the same resource)

HTTP Verb CRUD Entire Collection (e.g. /customers) Specific Item (e.g. /customers/{id})

HTTP Verb Means
POST Create
GET Read
PUT Update/Replace
PATCH Update/Modify
DELETE Delete

Django

This is web application developement framework in python. It is easy to maintain the apps and project under one tree.

  • Models (Acts as controller and model)
  • Views (view)

Some commands

  • startproject
  • startapp
  • makemigrations
  • migrate
  • createsuperuser

Django - REST API

  • Models (Logics + Data Holders)
  • Serializer (Tranfers the data from Models to JSON or XML, Once the request from view is received and it gets the data from Models and sends the response)
  • Views (get the need/query from clients and asks from Serializer.)

Some commands

  • startproject
  • startapp
  • makemigrations
  • migrate
  • createsuperuser
  • serilaizers.py

Explanations:

  1. http://agiliq.com/blog/2014/12/building-a-restful-api-with-django-rest-framework/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment