DEV Community

Happy birthday Django! 🎂

rhymes on July 20, 2020

Django is 15 years old! Simon Willison @simonw ...
Collapse
 
omarkhatib profile image
Omar

I was learning Django for while , but I notice it's not good for beginners who never work on backend before .
It's very easy to write , but it teach you nothing about how things work.
I like to hear your oppinion.

Collapse
 
rhymes profile image
rhymes

Hi Omar! I understand your point of view. Django is a full framework, which means it tends to hide details about how the underlying request/response cycle works but it's also there in plain sight in a way.

Basically a HTTP request comes in, goes through a parser (let's ignore it :D), then a bunch of middlewares which are basically classes and functions that take the request and some variables and return a modified request (authentication for example) or an error, it then lands on the URLs modules which we can interpret as a giant dictionary/hash which associates URLs with functions (Django's views), then once the response is ready it goes back to the middlewares so that you can optionally modify the response (gzipping for example) and then finally to the web server and the user's browser.

Most web frameworks work this way: read the request, do stuff, send a response. The how is how one differs from another.

Let me know if any of this makes sense or if it's not clear

Collapse
 
omarkhatib profile image
Omar • Edited

thanks you make it clear , there is a full blog or book to read more bc I like to deep dive into it more 👍👍.
I mean theory in general behind web.

Thread Thread
 
rhymes profile image
rhymes

Hi! @citizen428 suggested How the Web works on MDN.

Thread Thread
 
nickytonline profile image
Nick Taylor

Julia Evans has a great e-zine explaining HTTP, but it’s a paid resource, but the article about it links to her tweets about the same info. jvns.ca/blog/2019/09/12/new-zine-o...

Also, my co-worker @citizen428 suggested to check out MDN’s How the Web Works.

Thread Thread
 
rhymes profile image
rhymes • Edited

Just found out we have a podcast episode called "HTTP with Julia Evans":

play pause Software Engineering Daily

You can also find the transcript at the source: softwareengineeringdaily.com/2019/...

Hope all of these help!

BTW Julia Evans is really good at explaning things ;-)

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

For many more years to come!!!

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

Just started learning Django.
Coming from Laravel, only thing I miss is native Jobs/Queues for background processes.

Collapse
 
rhymes profile image
rhymes • Edited

Just started learning Django.

Nice!

Coming from Laravel, only thing I miss is native Jobs/Queues for background processes.

They are not native indeed but I suggest you look at django-rq which as far as I know are still one of the simplest ways to add a queueing system to a Django application.

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

Yeah I found it while doing my research. Thanks.

Is it only possible to enqueue functions? 🤔

Thread Thread
 
rhymes profile image
rhymes

What do you mean?

Thread Thread
 
zubairmohsin33 profile image
Zubair Mohsin

In Laravel we have Job classes which we dispatch. But in django-rq, it seems like it's only possible with functions.

Thread Thread
 
rhymes profile image
rhymes

If there's one thing I learned by using multiple programming languages in my career is not to try to bend one framework to be similar to another. Just embrace it :-)

Django is (mostly) function based, I think it's normal that django-rq is as well.

Are you having specific issues/limitations with using django-rq as is?