+ 3

PHP or Python, which one would you rather prefer for backend programming?

PHP or Python?? Reason

13th Apr 2020, 12:45 AM
Fortunate
Fortunate - avatar
26 odpowiedzi
+ 20
Neither. For backend website, I would either focus on ASP.NET WebAPI using C# on .NET Core or NodeJS. Another option is Ruby on Rails. If you absolutely need to choose between PHP and Python, I would choose PHP. While there are frameworks for Python in the backend, it's just not being used beyond script utilities and devops as many people seem to believe. I don't know many professional software engineers who would choose Python for any large projects. While it's true that a few high profile companies are heavily using Python, they are the exception, not the norm. I also suspect there are a lot of regrets within those companies as they are experiencing tremendous challenges with the limitations of Python. Here's a link I find to be much more reflective of reality than TIOBE Index. https://www.similartech.com/categories/framework
13th Apr 2020, 1:57 AM
David Carroll
David Carroll - avatar
+ 8
I would prefer python.
13th Apr 2020, 1:13 AM
Manual
Manual - avatar
+ 6
XXX I agree... it makes sense to lean toward a framework based on a language you are familiar with. However, I strongly recommend learning new languages and their frameworks to eventually see how they are all similar and, moreover, how they can be very different. The things you listed as your top 3 features in Django happen to be standard across all MVC frameworks. In fact, they are brilliantly implemented in ASP.NET MVC, which is strongly influenced by Ruby on Rails. The model system you referred to is known as Code First in ASP.NET MVC and Active Record in Rails. The template engine in ASP.NET MVC, known as Razor, would be my preference of choice if I was still using server side generated HTML. However, I work exclusively with SPAs now, so ReactJS is my client side view library of choice. Scaffolding tools and common file structure exist in most MVC frameworks I've worked with. These are pretty much the standard for MVC regardless of framework.
13th Apr 2020, 5:16 PM
David Carroll
David Carroll - avatar
+ 5
{ Pluto^_^ } I didn't mention Golang because it's not on my own radar of languages known to be in active use for backend web development. It's also not been trending among my network of software development professionals. Are you building web backend in Golang? Has your company committed its enterprise application development strategy to using Golang? Do you have many colleagues in other companies building web applications in Golang? Is there a huge demand for building web backend using Golang in your job market? If not, what are you basing the following statements on: "...Golang is now the on demand language for web backend. Many companies are switching into golang these days."
13th Apr 2020, 7:27 AM
David Carroll
David Carroll - avatar
+ 3
I completely agree with David Carroll I made my employer move away from PHP and rebuilt our entire service with C# and .Net Core. We use python very rarely for simple utilities on the server; most of which are merely cron related that dont need to be tied into our web app. For anything more complex I generally just build everything in C# PHP might have been around for a while and though it has improved, it's still a poorly written, horrendous mess that fosters poor coding practices. I mean, anyone can code a good product if they know a language well enough, but I firmly believe PHP should not be used beyond simple websites or blogs.
13th Apr 2020, 3:12 AM
Mike
Mike - avatar
+ 3
I totally agree with David Carroll. But still I am a Django (in Python)fan, and I would love to mention its features. There are 3 things I love about Django. Note: I don't know if the other frameworks have these features. Firstly, the models system of Django is very good. Models are actually classes which are later going to be converted to tables in a database. Secondly, there are templates in Django. Using them you can write Django code in your HTML file. For example, use a for loop, if statements, and access context variables and class attributes. Third and the best thing is the organized structure of a Django app. You have different files for literally everything, which makes it a heaven when it comes to management. For example, there is a urls.py file just for handling urls. Just have to specify the url, and the function to be called. In conclusion, i'd say that you have to see the language first. If you know Python, there is no point in learning C# or Ruby just for web dev and same for the opposite.
13th Apr 2020, 7:10 AM
XXX
XXX - avatar
+ 3
Golang is mostly being used for large scale applications. David Carroll Here is the link: https://www.gowitek.com/golang/blog/companies-using-golang Yeah I cant say that its the on demand technology for backend, but its ideal for large scale applications which handles a lot of data every second. Actually I had misread the article.
13th Apr 2020, 12:34 PM
Ishmam
Ishmam - avatar
+ 3
Mike It’s my main laguage lol, I was just putting this for people who thought that PHP was always bad (and I’ve seen way too many). Haven’t really tried using it for web, although I know many big websites like Instagram, YouTube, etc use it. For me, data science and machine learning is where the money’s at.
13th Apr 2020, 5:55 PM
Michael David
Michael David - avatar
+ 2
Pluto{^_^} there are good and bad articles everywhere. Sounds like you simply found one that spoke to you. And personally if I wanted to replace Javascript I'd invest some time in learning more about Blazor; partially because I'm proficient in C#.
13th Apr 2020, 11:08 AM
Mike
Mike - avatar
+ 2
People that are ignorant would pick Python over PHP, because they think it’s still stuck in the 90s when it was “bad”
13th Apr 2020, 2:56 PM
Michael David
Michael David - avatar
+ 1
David Carroll Golang is becoming more familiar in this field, which you didnt mention. I think Golang is now the on demand language for web backend. Many companies are switching into golang these days.
13th Apr 2020, 6:16 AM
Ishmam
Ishmam - avatar
+ 1
Michael David that statement itself is pretty ignorant. Python is a great language for many things. Not my preferred language of course, but it has its uses. Perhaps you just haven't found a purpose for it.
13th Apr 2020, 3:38 PM
Mike
Mike - avatar
+ 1
python and php both are preferable for backend programming.. At first read a short review of both.. Then set your mind which will give you interest for doing programs.
14th Apr 2020, 5:18 AM
Aazad Waf 🌀
Aazad Waf 🌀 - avatar
13th Apr 2020, 2:16 AM
Masud Rana
Masud Rana - avatar
0
psp but python is lob❤
13th Apr 2020, 10:52 AM
Vivek Singh Rawat
Vivek Singh Rawat - avatar
0
David Carroll ouch! That hurts really. I was literally amazed when I first laid my hands on Django and I thought like this is so unique (mainly because I had only worked with NodeJs before and it did not offer that much). But jokes aside, I totally agree with the fact that you should learn new languages and their frameworks. Because every language has frameworks which are better than the others.
13th Apr 2020, 8:14 PM
XXX
XXX - avatar
0
Yeah Ik both of that I hate php and it will dead in Asia it is living btw . I don't care ...
14th Apr 2020, 7:20 AM
Muhammad Hassaan
Muhammad Hassaan - avatar
0
Php
14th Apr 2020, 11:12 AM
Zairo AngeloTirador
Zairo AngeloTirador - avatar
0
PHP
14th Apr 2020, 4:12 PM
Mohammad Sohayb
Mohammad Sohayb - avatar
0
Python would better choice. With django used in backend can support fast backend technology
14th Apr 2020, 7:16 PM
Jaisal Shah
Jaisal Shah - avatar