Django and Nextjs are the one most used web frameworks for backend and frontend development. Django comes with a robust set of features, security, ...
For further actions, you may consider blocking this person and/or reporting abuse
I'll admit it, I skimmed most of this article, but that's only because I wanted to know why you would use both python and JavaScript instead of one or the other. Then I saw mention of node js for the frontend but I couldn't find where you used it (or how, bff?)
This seems like a good article to explore either framework, but I'm still curious:
One of the main benefits of node is you can have your backend and your frontend in a single language. Options also exist for Python. I'd like to know what made you decide to make this tradeoff.
I hope you don't mind the unsolicited feedback, but, answering the "why" of your article ahead of time gives me, the reader, assurance that the journey is one worth taking.
I will go with the reasons mentioned by @mavis_15 under your comment.
Regarding node, I was pointing out the Node version I am using on my machine for Next.js development with
npm
.Regarding the preference for Django for backend development, I will just say it can depend on the type of application that we want to develop. For example, if I am building an event-driven application I believe that asynchronous pattern should be the heart of such applications, thus going with a backend in JavaScript will be very beneficial.
Python and Django are easy to understand and the ecosystem for web development is so rich, secure, robust, scalable, and understandable that I just prefer Python for non-asynchronous backends.
Now, it is true that Python handles asynchronous code and is quite good at it, but not like Javascript.
Thanks for the feedback :)
Personally, to me, there are 2 good reasons:
So as NextJS
So as Django.
Read: How to Host Django Project on Vercel
Nice one
thanks
Seems like a fine article, but you said "In terms of styling, we’ll use Tailwind CSS" but then didn't?
Oh, a mistake. I have corrected it. thank you for pointing it out
This is a very good article. Thank you so much Kola.
I hope to see more of your contents
Thank you @israelbo17
Great explanation!
thank you!
A bit unclear, especially I don't know which directory to use in Terminal. However, I do appreciate
thanks for the feedback. it will help me make the article better
where to add this file is unclear:
`# ./routers.py
from rest_framework import routers
from menu.viewsets import MenuViewSet
router = routers.SimpleRouter()
router.register(r'menu', MenuViewSet, basename="menu")
urlpatterns = router.urls`
can you help please and make change in the article too.
also to make clear could you add the app's file structure image as a whole which include the frontedn and the backedn also after writing the bakcned not sure where to add the frontend folder so may be that can be sorted by this as well...?
./
means at the root of the project. I will modify the article to add this detail.I will also add the image. In the meantime, please refer to the repo of the project. github.com/koladev32/django-api-ne...
Both are full-stack frameworks.
I will say it is more like preference and it is also about reliability.
Backend development with Next.js is recent while backend development with Django has many years of iterations, architectural changes, and maturity.
If I am looking to build a quick fullstack application, I will go with Next.js as I can have a reactive frontend and also an easy pluggable backend.
However, if the project is much more complex and requires certain tools that I can find in my environment, I will go with Django. For example, building a workflow engine can be done with Next.js, but you will find more reliable tools in the Python ecosystem for example. And if you are a Python dev, why not go with it?
Yes, you're right. If you've a project as simple as this one, then you don't have to use both the framework.
But, when your project goes bigger - which has many api endpoints for different clients (like a web client or mobile apps) then using this tech stack (NextJs and DRF) can be very helpful.
Django is not most used. Where did you get that info?
a typo. corrected
It is a very good article. It is very helfull for me. Thank you very much