Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-on JavaScript for Python Developers

You're reading from   Hands-on JavaScript for Python Developers Leverage your Python knowledge to quickly learn JavaScript and advance your web development career

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781838648121
Length 410 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sonyl Nagale Sonyl Nagale
Author Profile Icon Sonyl Nagale
Sonyl Nagale
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Preface 1. Section 1 - What is JavaScript? What is it not?
2. The Entrance of JavaScript into Mainstream Programming FREE CHAPTER 3. Can We Use JavaScript Server-Side? Sure! 4. Nitty-Gritty Grammar 5. Data and Your Friend, JSON 6. Section 2 - Using JavaScript on the Front-End
7. Hello World! and Beyond: Your First Application 8. The Document Object Model (DOM) 9. Events, Event-Driven Design, and APIs 10. Working with Frameworks and Libraries 11. Deciphering Error Messages and Performance Leaks 12. JavaScript, Ruler of the Frontend 13. Section 3 - The Back-End: Node.js vs. Python
14. What Is Node.js? 15. Node.js versus Python 16. Using Express 17. React with Django 18. Combining Node.js with the Frontend 19. Enter Webpack 20. Section 4 - Communicating with Databases
21. Security and Keys 22. Node.js and MongoDB 23. Putting It All Together 24. Assessments 25. Other Books You May Enjoy

Summary

While our focus has mostly been on getting away from Python by choosing Node.js and Express over Python and Django, it's definitely workable to integrate them. We used one specific paradigm here: a React app sitting as a static built app inside a Django app. The Django application is routing HTTP requests either to the API bot app if it has /api in the URL, or to the React react-frontend app for everything else.

Incorporating Django with React isn't really the easiest thing in the world, and this is only one possible paradigm of how to couple this, in what I'd term tightly-coupled scaffolding. If we were to have our React and Django apps completely separate and only interacting via XHR calls with Ajax, that would arguably be a more true-to-life scenario. However, that would involve having separate setups for the two halves, and today what we constructed was a single server for our whole application.

In the next chapter, we'll be working with Express and React...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime