DEV Community

Bret
Bret

Posted on

PYTHON/DJANGO vs REACT/VUE which is better to focus on?

Is Django worth it to use as styling? OR, should you concentrate on React/Vue for styling?

I don’t like the templates, I like the database tho.

Latest comments (8)

Collapse
 
andrewbaisden profile image
Andrew Baisden

Why not both? Being a polyglot is popular these days aka knowing multiple programming languages and frameworks. For example I know the MERN stack and Python/Flask. Of course you should learn one of them first before learning the other.

Collapse
 
yobretyo profile image
Bret

I feel like I know React and Vue well, it’s the styling that slows me down. Like, I’ve added Framer Motion to my React project, but it’s the different VAST VARIETY OF OPTIONS is what slows me down with transitions, places, color, ect. I like Django, just not styling. I like Python, but it seems like if you want to do anything and get taken seriously.... you need colllege

Collapse
 
altneko profile image
NekoAlt

"Plain" Django can be used with templates to have a webapp without any front end framework.

However, you can use Django Rest Framework (DRF for short), to encapsulate all the backend task within Django, and use a Front end framework like React or Angular for styling and front end logic.

Vue, as a progressive front end framework, you could use it even without DRF, just adding it to your templates. But of course, a more clean approach is the one that you want.

Collapse
 
lewiskori profile image
Lewis kori

hey Bret,

Django is an MVT(Model View Template) framework, and as such, you can use it to create a full-stack app with relative ease given adequate practice. All this while relying on a few languages, primarily, python. HTML and CSS if you are working on theTemplate aspect of django.

I would advise using Django's templating system if you are a beginner.
This is due to a number of reasons:

  1. When starting out you need to grasp the internal mechanics of a framework or language. Working with the entire django feature set without a frontend framework will give you enough transferrable knowledge for when you switch to the separate frontend and backend setup. As well as enhancing your python knowledge.

  2. This is more of point 1, but still, using Vue/react at first might end up confusing you as you'll have a lot of concepts to grasp all at once. These include APIs, API Security, meaning you'll need to learn DRF, javascript, structuring your app into components as these modern Frontend frameworks encourage that setup.

Long story short, try understanding Django without fancy frontend frameworks, then move onto those later. This will also make you versatile and you won't have to rely on a frontend framework for trivial projects.

Collapse
 
mattedwards profile image
Matt Edwards

I might not be the best person to comment on this because I'm at the very beginning of my Django journey but here goes anyway.

Django has essentially nothing to do with styling. It is a framework that enables you to use Python to code the back end of your web application. It has its own templating language but that does nothing more than generate the HTML. Styling comes from the CSS that you apply to that HTML.

React, Vue (or any other flavour of Javascript) manage the way that the website/application behaves when your users interact with it.

Collapse
 
yobretyo profile image
Bret

Yes,
but it is front end with Templates?
You can change a Vue or React app to use Django for the Admin.

Collapse
 
mattedwards profile image
Matt Edwards

I have seen some posts on dev.to that cover the use of Vue with the Django REST Framework but I'm not sure how you would use Vue with standard Django. Like I said, I'm pretty new to Django, but it seems that you have to use the Django template language to get the data from your models into your views.

I must admit that a similar question has occurred to me: if your focus is web apps, is Django the way to go or is it based on an outdated methodology?

Hopefully somebody with more experience will be able to comment :-)

Thread Thread
 
yobretyo profile image
Bret

thanks, i like how it loops through things, but i don't like the way how the Jinja, but have to be inside of a div, or if you keep it within because that how it will show it different.
focusing on python, has helped a little with JS