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.

Discussion (33)

Collapse
ilvalerione profile image
Valerio • Edited on

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 Author

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 on

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 on

"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
akashthakur05 profile image
Akash Singh [h3ck4rz]

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 Author

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 [h3ck4rz]

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 [h3ck4rz]

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 on

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
andersbjorkland profile image
Anders Björkland • Edited on

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 Author

I understand

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

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

Collapse
techmaniacc profile image
Joseph Mania Author

I respect your view

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.

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

PHP (surprisingly) is faster than Python btw

Collapse
alvarohmartinez profile image
Álvaro Martinez • Edited on

Hey guys, good evening! The author just compiled a report from Quora, and have in your mind that this full article has four parts. First of all, be respectful with him, and if you don't agree, don't need to be rude, you can explain your point gently, and have a top level conversation. Second, read the other three articles before this. Peace ✌️

Collapse
techmaniacc profile image
Joseph Mania Author

Exactly, thanks for the reply

Collapse
andreidascalu profile image
Andrei Dascalu

There's a lot to criticise PHP about, but none of that is in this article.

PHP is significantly faster than Python. A common reason why Python is not considered a great backend language is because it's one of the slowest mainstream languages.

Frameworks don't make an application faster, quite the opposite. Frameworks allow you to boos development speed and possibly code quality, but they come with cost of overhead.

Django is a great framework and Laravel is pretty nice too, but within their respective ecosystems, they are the slowest choices by far (comparing Laravel to Spiral or Ubiquity and Django to Flask).

Collapse
inerkyjad profile image
Hassan Aoutof • Edited on

😂😂, you really need to delete this article, I'm not with PHP or PYTHON but i have experience in both, and your comparison was the stupidest thing I've seen this week, first you're full of lies, the first one being that a language that isn't built for the web can even compare to one that was built for the web, it just can't, sorry but each language has its domain and it would be stupid to think that python can be better in the web.

  • php has a JIT compiler, no need for any benchmarks here, it's just faster and that's the end of it, so you're a liar.
  • php is just as easy to develop as python is, don't take my word for it, just go check any codebase for yourself, if you're one of the people that hate ; then just don't use it.

We can keep going like this all day long but the point remains that on the web PHP is better cuz it was built for it, optimized for it, Django on the other hand is just a compliment to the python developers so they can still use thier knowledge in the web.

Collapse
scottparsloe profile image
Scott Parsloe

Sorry, Joseph, but your article comes across as a bit prejudiced. You can't critique a programming language or framework based on talk of others without trying it extensively first. It's similar to saying you don't like a particular food or drink based on someone else's experience or opinion, and you're just promoting a false bias and misinformation. Also, a language like PHP has matured and improved massively in recent years, especially since I started on PHP 4.0, so I think it would be churlish of you (and others) to base current day languages/frameworks on their past if you've not used them - please judge something on what it is today, not what it was. I hope you take these suggestions into account with your future publications for a more balanced view.

On the plus side, I'm glad you are liking the Django framework. I've heard good things about it, but I've got very little experience of it, unfortunately. However, it's each to their own, as the saying goes.

Good luck for the future!

Collapse
chojnicki profile image
chojnicki

I have worked with both, and can say that you do not have clue what you are talking about. Please, if you are comparing two technologies take time to learn both first, its so obvious. This article is just about nothing, zero facts, zero data, just opinions based on who knows what. I hope next article will be better, maybe focus on Django and do not compare it with Node ;) Good luck.

Collapse
_udemezue profile image
udemezue John

This is the best article, Django supersedes PHP/laravel.

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

Of course. I'm Santa. And better than everyone else.

Collapse
_udemezue profile image
udemezue John

That's the truth, Django outperforms them and he is right on the fact that Django can be used with data science and machine learning

Thread Thread
techmaniacc profile image
Joseph Mania Author

Thanks @_udemezue

Collapse
kachi2 profile image
Michael Ozoudeh

Am still wondering why this post is featured. this is actually the worse article I have seen on the internet. u have not worked on PHP Laravel yet u wrote an article on it. i don't think you are programmer bro. maybe jus a road side computer seller

Collapse
ben_middleton_be9bcd83c4c profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Ben Middleton

This article is trash.