Avatar of Octavian Irimia

Octavian Irimia

Software Engineer
Avatar of vectorialpixel
Software Engineer ·

Both PHP and Python are free but when it comes to web development PHP wins for sure. There is no doubt that Python is a powerful language but it is not optimal for web. PHP has issues... of course; but so does any other language.

Another reason I chose PHP is for community - it has one of the most resourceful communities from the internet and for a good reason: it evolved with the language itself.

The fact that OOP evolved so much in PHP makes me keep it for good :)

READ MORE
14 upvotes·2 comments·363.3K views
Jose NG
Jose NG
·
May 27th 2020 at 12:13AM

Do you use PHP with any Framework?

·
Reply
Octavian Irimia
Octavian Irimia
·
May 29th 2020 at 10:13AM

I like Laravel now but if you want to make an application that hope to get big I recommend not using an entire framework but parts (packages) of it. - composer + packagist.org

Get whatever packages you need and create you own architecture. The main problem with the frameworks is when they update a major version, you need to change your code in order to adjust their changes. If you have a simple website this is not a big deal but for a big projects it can be painful.

·
Reply
Avatar of vectorialpixel
Software Engineer ·
Recommends
on
PHPPHP

Short answer, if it's a web project (and I guess it is) go with PHP and you can integrate NodeJs services later.

@adzaria (Ezra Fayet) gave a great answer and I'd like to emphasize the first part: As a beginner you need to understand concepts first. For me that means to understand the web, how servers and requests work, APIs and few others.

Now, I'd like to add few things so, this is the long answer:

Why PHP?

  • Everyone knows about the community - PHP is way older so you will find lots of resources and I am not only talking about learning - also lots of helpful tools and packages
  • PHP is great for OOP - not perfect, but with PHP7 got great - and if you are a beginner you want to know good OOP for your future. Let's say JavaScript's OOP is a bit strange; I will not get into details but, let's say "it's not by the book". You can still learn JavaScript for your front-end

Why not Python? Python got popular because of AI - don't use PHP for AI and don't use Python for web applications. I can elaborate a lot here but I guess you get the point.

Why not NodeJs?

  • NodeJs got popular because of sockets - and it works great, but as a service
  • Try to find a good and affordable hosting for NodeJs. How about for Python?
  • I would not ignore the security issues that it had and could appear. PHP is older and, therefore, wiser :)

Now, about a framework... is this a learning project or something that you need to do fast? My advice is to start a small project and not use any framework. However, you can use packages and inspire from a framework's architecture - Laravel is a good role model.

Why not start a big project? You will get distracted, get into details and product design stuff and get scared or border and abandon it. For your project you need an MVP - list of minimum required features that you put on paper - that you will complete. After that you can improve.

Good luck!

READ MORE
9 upvotes·3 comments·369.3K views
Apostolis Dimitriou
Apostolis Dimitriou
·
August 23rd 2020 at 8:14PM

Hi , thank you for your response. I will try your advice to build something small but I am not sure about the safety of the web application. I mean I will try to make this app without a framework but I don't need to know about safety or something more complicated if I add and user authentication on the site?

·
Reply
Octavian Irimia
Octavian Irimia
·
August 24th 2020 at 1:40PM

You will want to learn about security and using a framework that takes care of it (under the hood) is bad. Laravel's Eloquent takes care of SQL injections. However, if you need a custom query, you can "produce" an injection security breach even in Laravel. Frameworks are bad for beginners because they make you think you know - but it's just an illusion.

·
Reply
Apostolis Dimitriou
Apostolis Dimitriou
·
August 24th 2020 at 4:28PM

Oh okay, I understand. Thank you for your help!!!

·
Reply