J.Doe
J.Doe

Reputation: 89

Django vs Vue.js/Angular/React

I was hoping someone could explain the difference between Django, to which I think is a web framework vs Vue/Angular/React which are Javascript frameworks. What is the difference between a web framework and a Javascript framework?

Upvotes: 0

Views: 5962

Answers (2)

pmont
pmont

Reputation: 2129

The difference isn't "web framework" vs "Javascript framework". The difference is that Django's architecture is server-generated pages. React / Angular / View are client-generated-pages aka single-page-apps aka SPA.

SPAs generally feel snappier because there are fewer page loads from the server. They employ routers in the browser to handle page changes entirely in the app. The initial load time is typically longer because more code has to be loaded up front.

Server-generated pages are lighter weight and more secure. The big downside is that performance suffers due to network latency which affects frequent page loads. That is also an issue with user interaction since that requires round trips to the server to process the interaction and update the page.

Upvotes: 2

bbsimonbb
bbsimonbb

Reputation: 29012

All your frameworks combine template and data on the fly to produce a web page. Django, first released in 2005, does this in Python on the server. Angular (2010), React (2013) and Vue (2014) do this in javascript in the browser. Use stack trends to form your own view, but the javascript-in-the-browser approach has more or less eclipsed older server approaches (including Django) for new projects.

Upvotes: 3

Related Questions