DEV Community

Cover image for Why Django For Backend Than PHP(Laravel)
Joseph Mania
Joseph Mania

Posted on • Originally published at techmaniac649449135.wordpress.com

Why Django For Backend Than PHP(Laravel)

The topic really interested me in Quora as developers from both groups defended their tools. Before developing a system, you must select the best tools to use. Have in mind the effects of each, both the advantages and disadvantages.

Don’t be too choosy. Each tool was created for a specific purpose. What you might accomplish with PHP might or might not happen with Django. But both are server languages. I have never touched PHP because of the negative talks from people. But from the compilation I have made, here is my reason why I would rather work with Django than PHP.

Easier Integration with AI, DS, and ML projects

Of course, we are living in the world of AI where people are developing projects using artificial intelligence. Machine learning technology is trending daily. Since the most common language used is Python, it becomes easier to integrate with that application. Django as a python framework makes the work look much simpler than you might work with PHP.

Security

Many people have abandoned the use of WordPress because they have a PHP backend. The language has leaked and is most of the time prone to hackers. Django comes with strong built-in security. This is a rare case where you will hear about a leak in the Django server application

Django is easier to Learn

Yes, both PHP and Python are easier to understand when you dedicate your maximum time to them. Python syntax is much easier to read and understand. While in a rush for server language, opt to pick python Django. If you have the basics of python, it will be much simpler.

Django is faster than PHP

Python is powerful in general. So it can be used for complex projects, with its numerous libraries. It’s faster when developing a site and also the running time. If you are new to server language, kindly work with Django. But when it comes to deployment, things turn out different. I would rather advise you to stick to what you have been doing if you ever worked with PHP. Django calls upon a specific environment in order to run.

Time management

If you want to build a web application quickly and deploy it, then Django might be your best choice. Although you might face a variety of problems, that is common to almost everyone. Are you comfortable using Django, then come solve problems as fast as possible?

Handle complex tasks

This is an attribute related to the vast community of python Django. The framework keeps growing daily as new packages are added. Python is a memory efficient language that takes up less space.

Although the comparison might sound biased, the fact remain we can’t compare Django with PHP. One is a framework while the php is programming language. However, both can build awesome backend servers. Have a tool then dig deeper to understand what it can do.

All the same, AI projects are the most popular technologies. This means Django will have space to exist in the coming years.

Top comments (32)

Collapse
 
ilvalerione profile image
Valerio • Edited

I'm sorry Joseph, this could be the worst article I've ever read.

It's hard to read a long list of pre-packaged sentences without any technical analysis or proof.

It's a sincere feedback from a reader.

These articles waste your readers time, and can also affect your authority instead to help you in this way.

A developer can understand you like Django, but this don't give you the ability to denigrate PHP (Laravel).

It's quite clear that you have no idea of what application development in Laravel means.

Python is more secure than PHP... Really? Why?

Python has a larger ecosystem... Really? I have a lot of doubts!

Python is faster than PHP... Really? Have you banchmarked their performance?

Python allows you to spend less time to develop your applications... Really? Why?

Hope this comment isn't misunderstood.

Best,
Valerio

Collapse
 
techmaniacc profile image
Joseph Mania

Hello, i understand what you guys mean, but please, i just compiled a report from Qoura. I work with django, but i dint mean to misguide or put down the PHP people. Am sorry if you got me wrong.

Collapse
 
xdragos profile image
Dragos Burciu

I'm sorry but i have created an account on this platform just to reply to this article.
This is by far the worst comparison out there, and you should take it down in my opinion.

You do not have experience with both frameworks (i'm assuming you are reffering to Laravel... otherwise you are comparing a framework with a programming language) and that shows.

I have no ideea if it is possible to vote down on this platform, but this is exactly why you haven't touched php or Laravel... "other uninformed people talking bad things about php4..5.. and have never touched 7 or 8"

Good luck with python, but don't write about things you obviously have no idea about.

Collapse
 
assunluis80 profile image
Luís Assunção • Edited

Yes. Either he or the moderation team should take this article down. Is deeply unfounded and brutally misleading!

Collapse
 
siddhartha profile image
Siddhu

PHP twice speed compared to Django

Do some research before writing article

Don't misuse the public platform

Collapse
 
mattmilesi profile image
Matteo Milesi • Edited

"I have never touched PHP because of the negative talks from people" - but you wrote an article on why choose Django instead of PHP.
I stopped there.

Collapse
 
willvincent profile image
Will Vincent

Good thing you did the rest of the nonsense would've just annoyed you further. Same old diatribe of incorrect statements based on no research and reeking of FUD.

Collapse
 
herbertamukhuma profile image
Herbert Amukhuma

Kindly provide proof for your claims. Otherwise all your claims about PHP are simply hearsay

Collapse
 
andersbjorkland profile image
Anders Björkland • Edited

Best of luck diving deeper in Python and Django. It seems you have sparce experience with PHP so if you want to improve this article you could spend some more time with it. Then you might also find a way to make the comparison more fair as you're trying to compare a framework with a language. So either make it a comparison between frameworks such as Django and Laravel, or make it a comparison between the languages Python and PHP.

I am myself not qualified to make a thorough comparison. I've only dabbled very little with Python, building a simple Web scraper, while I've much more experience with PHP and Symfony. All I can say from my personal experience is that Python makes it very easy to type, which is nice if you don't have any code completion tools in your code editor.

Keep it up. There's room for improvements and each point that you bring up is worthy of an article on their own. I'd like to see some examples and benchmarks if you plan to do so.

Collapse
 
techmaniacc profile image
Joseph Mania

I understand

Collapse
 
akashthakur05 profile image
Akash Singh

Dont Bully the Writer Unnecessarily Use your brain before implementing any technology .

Do appreciate the writter at least they are trying .

Now Considering the article

I have 10 Y Experience in Django and Laravel

Speed of Development of Python is far better than PHP (Try Django )

Django has a Great architecture

A/c to benchmark

Speed is almost same for some part python was better .

Python and PHP both have great community support

Python has large packages .

3rd Party integration and dependency management in python is better .

For Security i dont have idea

Collapse
 
techmaniacc profile image
Joseph Mania

Thanks @akash for your support.

Collapse
 
assunluis80 profile image
Luís Assunção

"Speed is almost same for some part python was better" tell that to any experienced senior engineer, and you'll be fired! Because it's a BIG LIE! PHP is in orders of magnitude faster than Python.

Collapse
 
akashthakur05 profile image
Akash Singh

The code compilation process affects the performance and speed of these two programming languages. A just-in-time compiler converts the Python development code into bytecode, each time a file is created or modified. So the Python files need not be recompiled again in future. The Python interpreter can easily access and fetch the precompiled bytecode (.pyc files). The code compilation process makes Python faster than PHP.

Collapse
 
akashthakur05 profile image
Akash Singh

Brother , Most Python library are ported from same c and c++ code so most of the time there are solutions that compile back to same assembly as c and now the python work faster than anything you know in php . For Proofs you can send me mail i will share you the benchmarks for our organization tested results.

Nobody can fire you unless you are an idiot

Thread Thread
 
assunluis80 profile image
Luís Assunção • Edited

WTF are you talking about?! I've been working with both languages for more then 10 years. Have you ever heard about PHP OpCache? php.net/manual/en/book.opcache.php
"python work faster than anything you know in php" never witnessed so blatantly lie! Are you living in some parallel universe?
hackr.io/blog/python-vs-php check the speed comparison section.

Collapse
 
assunluis80 profile image
Luís Assunção • Edited

This a bunch of misleading information and nonsense! Please, do better on a public platform.

Collapse
 
techmaniacc profile image
Joseph Mania

I respect your view

Collapse
 
mby profile image
Buğra Yıldız

PHP (surprisingly) is faster than Python btw

Collapse
 
webkoth profile image
Webkoth

With all due respect, the article is very bad. Don't mislead new developers. I will not describe the shortcomings in detail, other developers will do it, but they are all obviously not correct. Understand this topic in more detail, and do not broadcast your subjective opinion, which is far from the truth.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.