Hey everyone,
I am a backend developer, while working on my project. I am bit confused of what framework to pick. The backend is django, I am thinking for the frontend to be react?
What do you guys think? ReactJS for the dashboard with django? or should I check Vue and others?
Fellow backend guy.
It really depends on what you want to do with the frontend. If you want to do something super fancy then sure, go for Vue or React but these are specific tools for specific problems. Also, don't feel bad to just throw HTML at clients.
It's worth dropping a mention for HTMX.
yes I agree but throwing HTML at clients at the beginning will be quick but will be a big cost later, rather implement something simple first and improve it time to time. I am planning to do a dashboard (frontend) and backend django.
I’ve been around this loop a few times. If you render your dashboard server side using HTML templating you won’t have to learn a new framework (which will undoubtedly be obsolete in a few years no matter which one you choose).
If you choose a client side framework you will need to write a web API service, a bunch of client code (effectively rolling a JavaScript SDK for your custom web API - think network issues, retries, http status codes, open api specification perhaps, documentation). You’ll then end up with npm for your framework with a never ending tree of dependencies. Meanwhile, your competitor just rolled out their templated site 3 months ago whilst you’re still inspecting the network tab of chrome to find out why you’re getting a 400 error. Oh, and your budgie just died because you forgot to feed it - lol ok that’s just silly, but you get my point… you want to release early… later you can come back and rewrite it after you’ve got some customers. Just my two cents worth.
Thanks, make sense, to mention the backend will be django rest API. I think I will stick with ReactJS with basic features at the beginning. After that will improve slowly slowly.
Use ReactJS + NextJS
Why not VueJS?
Having learned and used both React and Vue professionally, I would choose React every time. Still glad there’s competition though
If you want super simple, then Django supports templated languages. But, I always find myself reaching for React anyway.
Thanks, I am not a frontend developer but I tried in the past to write few things in React and the only problem I found is I don't understand how can you render the templates for mobile phones or different screens. Thats the tricky bit. If you have any good tutorials or resources, can you pls share them. Thanks
Having used both in companies, I personnaly prefer VueJs. It’s easier to learn and is gaining popularity. If you want to use ReactJs you can chevk the react-admin package that helps you quickly setup dashboards and back offices !
+1 for VueJs
The best part about it is the fact that you can also include it as a script(like you would do with jQuery), if you only need it for one page, so you don't have to use everything, this is what I did for one of the pages on one of my website(https://app.xemailextractor.com)
So after including it like this:
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>And after that I use it like this:
And on the HTML side:
<input type="radio" value="FL" name="scrape_type" v-model="scrape_type" id="followers" checked>See the v-model part, you can also use v-if and other things, the only downside of using it like this is that you have to modify the delimiters either for your vuejs or for django, as both use {{ }}, I've modified them for vuejs as it's a small part of the page, using this
delimiters: ["[[", "]]"]Could I do this this with something like jQuery? Probably yes, but it would be a lot more complicated to implement and modify later.
I would like to the actual page, but you need a paid account to access it.
Also, another possibility to use with Django is by compiling the whole VueJs project into a single page(works for both dev and production), that's what I'm currently doing for a project that I'm working on, so I don't have to implement login/register separately/manage sessions and so on, but this is a bit more complicated, I was thinking to make a video showing how to do it.
As a backend dev, I like it more using it like this than having everything from the frontend using VueJs(I've done that in the past for a project too).
Let me know if you have any questions
I would look at https://github.com/vuejs/petite-vue and use just JS with it.
If you need to upgrade look into React and Django rest framework.
There are so many frameworks you can go for, but I would suggest to go with Ruby on Rails and Django
Nextjs all the way for me. Especially when paired with vercel for deployment. Writing an API is just a function away. And it's all in javascript/typescript
so no context switching required. Nothing else comes close in terms of agility and simplicity.
Both VueJS and ReactJS are good. Both frameworks can do pretty much the same. As someone who used both frameworks, I personally like to use VueJS for simplicity.
for dashboards you recommend Vuejs?