You are visiting the site as a unregistered user. You can earn points and a new level by registering. Register free for ever!
logo Televistar Communities

Profile Picture
  • Name: Yonney Dominguez Email Verified
  • Public Username: pawnbeat
  • Bio: I am a chess lover, programmer and attorney.
  • Contact Me
Why I Chose Django vs Laravel

Time To Read: 4 minutes or less

I will not talk about advantage of the one language over the other. As you probably know, Django uses Python (The hottest programming language up to day) and Laravel uses PHP (The most used language for web development). There you go; best word for both and that is all I will say about Python and PHP.

The Laravel Experience

I started using Laravel back in version 4. At this time, Laravel was the go to framework for PHP and I love this fact. In contrast with JavaScript, which we still, need to see what framework will come at the top if any. To me the reason behind JavaScript turbulent waters is the development cycle. It is just too fast. It might be good or bad depending on the scope you use. Anyway, back to Laravel (sorry I had to troll JavaScript). Laravel was excellent for me. I was a new web developer and Laravel promised to be fast for prototyping and easy enough. Add to the point that Laravel still has an amazing IRC channel with quick response time. In fact, Laravel had everything I needed. I was not a good PHP programmer and yet I was creating fully dynamic websites. However, something was missing. I felt Laravel was good but slow. In addition, it felt bloated with too many dependencies and dependencies injections. I remember up to version 4.4 I started looking to Django. Django did not make sense for me as a new programmer. The documentation was great and love it in my heart but it had a great problem, the routing system. Laravel routing system was a breeze, it did not need regex, and this was BIG. Regex is sometime hard for seasoned programmers let alone for new programmers. So, I basically discarded Django right away.

The Jump to Django

Then Django announced version 2.0. This caught my attention and I went straight for what happened to be a deal breaker for me. You guessed it, the Routing system. It did not need regex anymore. I just promptly started reading the tutorial. It felt awesome to create that first full cycle with Template, Controller (Laravel calls it Controllers and Python calls it View) and Model. It also had something called Lazy Queries. However, what was this lazy query. It certainly does not sound nice for a new developer. It looks like something I do not want because it sounds slow. It turned out to be a great feature. It just mean that a query will not be executed until it needs to be executed. This is great! I said. A teaching lesson for core developers. Names are important. It really confused me to see Lazy query which the opposite of what implies. In addition, it had a killer feature over Laravel. The Admin Panel! It feels so great to create an application and right out of the box having control over every model in the backend. Then it also included the last nail in the coffin. The! To be fair Laravel also have a command manager tool. Nevertheless, this is not about a command manager tool because many modern frameworks already have this. It was the power of doing “python startapp YourAppName”. This is powerful stuff people. By just issuing this command, I have the power of creating a folder with my views, url, admin, model in just one line. You might be thinking now that Laravel gives you more control to organize code. I give you that but more control means more responsibility too. Especially in long big projects. Yes, you can do this manually in Laravel (Kind of, because routing is one big file in Laravel). Do I want to? Of course, No! A programmer’s time is more important than anything else is. It also makes the application feel like a nice puzzle where everything glues together nice and smooth.

Extra Note

I left Laravel back in 4.5 and started Django from 2.0. The features I mentioned here might not be an advantage anymore since then. Laravel is now at version 6. Also, take into account that I was a new web developer and Django easiness and organization was important for me back then and still is now. However, back then I understood less of what is going on under the hood with both frameworks. I would love to hear from a PHP Laravel developer if these “advantages” are no longer present or how is better for you.

Happy coding!

Blog Comments

No comments yet.

Blog Images