Download this PDF book: Beginning Django API with React: Build Django 4 Web APIs with React Full Stack Applications by Greg Lim, Daniel Correa
In this book, we take you on a fun, hands-on and pragmatic journey to learning Django API React stack development. You'll start building your first Django API React stack app within minutes.
Every chapter is written in a bite-sized manner and straight to the point as we don’t want to waste your time (and most certainly ours) on the content you don't need. In the end, you will have the skills to create a Todo app and deploy it to the Internet.
Welcome to Beginning Django API with React! This book focuses on the key tasks and concepts to get you started to learn and build a RESTful web API with Django and Django REST Framework, one of the most popular and customizable ways to build web APIs.
In the second part of the book, we then show how to create a frontend using React to connect to the API. In all, the book is designed for readers who don ’ t need all the details about Django or React at this point in the learning curve but concentrate on what you really need to know.
If you are brand new to Django, I recommend first reading my book, Beginning Django where we learn about the basics of models, URLs, views, authentication, deployment and more. Why create an API? With Django, we can already create a complete web application. So why bother to create an API with Django and then create separate frontends when we can do it all with Django? Now, say your app becomes a hit.
Users love your app so much that they want an iOS and Android version of it. So, you have to create the same functionality of your app in two more different languages (Swift and Kotlin for example). You might also hear of new frontend frameworks like React, Angular, Vue to make your app more dynamic and modern. You want to try them out.
How can we better achieve both objectives? The answer is to create a REST API. With Django REST Framework, we can create a common API to serve information to different frontends like Vue, React, Android, iOS etc. We need only to create the logic in the API and then have each of the frontends connect to it.
This makes it more scalable and reliable since we just have one code base and database to serve the information. Django Rest Framework The Django Rest Framework (DRF) library enables us to easily create Django APIs that return JSON.
DRF takes care of the heavy lifting of transforming database models into a RESTful API. For example, it provides CRUD operations, authentication modules, JSON serializers, routing, and many more. It purposefully mimics many of Django ’ s traditional conventions making it much faster to learn. With a minimal amount of code, DRF can transform any existing Django application into a web API. These will be illustrated as we build our sample application throughout this book.
In the course of this book, we will cover:
Chapter 1: Introduction
Chapter 2: Installing Python and Django
Chapter 3: Understanding the Project Structure
Chapter 4: Creating Our Backend Server
Chapter 5: Serialization
Chapter 6: URLs and Class-based Views
Chapter 7: Creating Todos via the ListCreateAPIView
Chapter 8: Permissions
Chapter 9: Other C.R.U.D. Operations
Chapter 10: Completing a Todo
Chapter 11: Authentication – Sign Up
Chapter 12: Authentication – Log In Tokens
Chapter 13: Introduction to React
Chapter 14: Create Navigation Header Bar
Chapter 15: Defining Our Routes
Chapter 16: TodoDataService - Connecting to the Backend
Chapter 17: TodoDataService - Login Component
Chapter 18: TodosList Component
Chapter 19: Adding and Editing Todos
Chapter 20: Deleting a Todo
Chapter 21: Completing a Todo
Chapter 22: Deployment
Chapter 23: Hosting and Deploying our React Frontend
The goal of this book is to teach you Django API React stack development in a manageable way without overwhelming you. We focus only on the essentials and cover the material in a hands-on practice manner for you to code along.
Working Through This Book
This book is purposely broken down into short chapters where the development process of each chapter will center on different essential topics. The book takes a practical hands on approach to learning through practice. You learn best when you code along with the examples in the book.
Requirements
No previous knowledge on Django or React development is required, but you should have basic programming knowledge. It will be a helpful advantage if you could read through my Beginning Django and React book first which will provide you will better insight and deeper knowledge into the various technologies. But even if you have not done so, you should still be able to follow along.
About the book:
Publisher : Independently published (February 13, 2022)
Language : English
Pages : 138
File : PDF, 12MB
Free Download the Book: Beginning Django API with React: Build Django 4 Web APIs with React Full Stack Applications by Greg Lim, Daniel Correa
PS: Share the link with your friends
If the Download link is not working, kindly drop a comment below, so we'll update the download link for you.
Happy downloading!