Lightweight Django
Using REST, WebSockets, and Backbone
Publisher: O'Reilly Media
Release Date: November 2014
Pages: 77
Read on Safari with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
How can you take advantage of the Django framework to integrate complex client-side interactions and real-time features into your web applications? Through a series of rapid application development projects, this hands-on book shows experienced Django developers how to include REST APIs, WebSockets, and client-side MVC frameworks such as Backbone.js into new or existing projects.
Learn how to make the most of Django’s decoupled design by choosing the components you need to build the lightweight applications you want. Once you finish this book, you’ll know how to build single-page applications that respond to interactions in real time. If you’re familiar with Python and JavaScript, you’re good to go.
- Learn a lightweight approach for starting a new Django project
- Break reusable applications into smaller services that communicate with one another
- Create a static, rapid prototyping site as a scaffold for websites and applications
- Build a REST API with django-rest-framework
- Learn how to use Django with the Backbone.js MVC framework
- Create a single-page web application on top of your REST API
- Integrate real-time features with WebSockets and the Tornado networking library
- Use the book’s code-driven examples in your own projects
Table of Contents
-
Chapter 1 The World’s Smallest Django Project
-
Hello Django
-
Improvements
-
-
Chapter 2 Stateless Web Application
-
Why Stateless?
-
Reusable Apps Versus Composable Services
-
Placeholder Image Server
-
Placeholder View
-
Creating the Home Page View
-
-
Chapter 3 Building a Static Site Generator
-
Creating Static Sites with Django
-
What Is Rapid Prototyping?
-
Initial Project Layout
-
Page Rendering
-
Generating Static Content
-
Serving and Compressing Static Files
-
Generating Dynamic Content
-
-
Chapter 4 Building a REST API
-
Django and REST
-
Scrum Board Data Map
-
Designing the API
-
Testing Out the API
-
Next Steps
-
-
Chapter 5 Client-Side Django with Backbone.js
-
Brief Overview of Backbone
-
Setting Up Your Project Files
-
Connecting Backbone to Django
-
Client-Side Backbone Routing
-
Building User Authentication
-
-
Chapter 6 Single-Page Web Application
-
What Are Single-Page Web Applications?
-
Discovering the API
-
Building Our Home Page
-
Sprint Detail Page
-
CRUD Tasks
-
-
Chapter 7 Real-Time Django
-
HTML5 Real-Time APIs
-
Websockets with Tornado
-
Client Communication
-
-
Chapter 8 Communication Between Django and Tornado
-
Receiving Updates in Tornado
-
Server Improvements
-
Final Websocket Server
-