I work with PHP, JavaScript, and Python on the backend and that’s what I learned.

Dmytro Huz
4 min readSep 17, 2018

I’m a web developer, I have been working for 5 years, and during that time had to solve many different tasks and create many different solutions. I used for that 3 mainly languages: PHP, JavaScript, and Python. I used to think that need to choose only one…the best… and improve my skills in it. But as time passed and I understood that these 3 languages are really great. And no need to choose only one, because these 3 languages are great in their own field and I understood all the pros and cons of every language. And now I understand which problem each language solves the better. It is just my experience and my thoughts. I don’t think that is absolutely correct. It is just what I have found for me, and for me it works great. It is not a comparing in a classic way, it is not a talk about the performance or a language architecture, it is just a talk about what I prefer and what like when using these languages on the backend for my applications.

OOP.
When you create a big application which has a lot of components and a lot of relations between them — OPP is a great way to make it clear and easy. OOP helps to make a beautiful and very comfortable code when a simple functional approach will make an unreadable hell. When I understand that I need to create such an app I always choose PHP. There OOP base is perfect…realy. All these abstract classes, traits, protected/private properties. You can implement all Design Patterns and all possible architecture solution without any problem. OOP in PHP is very flexible and comfortable. I don’t have such feelings when I work with JS, and I don’t feel anything like that when I work with Python. They both have OOP, but it is something ‘plastic’ that.

Syntax.
Ah…here I can say that if someone asks me what the best syntax I have ever seen, I will say — Python. It is really perfect from that side. The syntax of ‘for’ loops and list comprehensions are a top of skill! Also, you can check is an element in the array just using: `if value in array:` syntax, no need to call function for that. All operation which you use very often, you can make via standard syntax feature. It is really very comfortable. To initiate variable you write: new_variable = ‘some value’. No need to use `$`, `var`, `let`, `;`…nothing. No `{}`, less `()`. So here Python is absolutely number one.

Working with OS.
Python has all possible instruments to work with Operation system functions. I think Python it is a new Bash. You can easily run a command, work with processes, environments, files, PIPEs, and everything that is possible. All OS function is available in Python. I tried to use PHP for this goals — it was horrible =D

Setting and running.
‘npm init’ + ‘npm start’ + few lines of code and there is a working server which is ready to handle all you request. Can you find anything easier? =D So in this category, I will give priority to JavaScript (Node.js). You no need to install Apache/Nginx. And it is great. Also, there is a ready module for Node.js for any existing problem. So you no need to write tones of code. Just install and use. You can assemble your application from ready modules like a puzzle. Of course, you can make the same and for PHP and Python but it is not so easy like for Node.js

3d side libraries
In Python and PHP, you can easily write everything by using just basic libraries and functions. In JS all community use this strategy: for every task — exist ready module and you should not create your own. Sometimes creating JS application looks like creating things from Lego. And you not always can manage and see everything that happens in your app…it is not very good for big projects.

Asynchrony.
If you need to build some interactive web applications which will make a few things simultaneously or will have a real-time event handler — Node.js will be very good chose for that. It allows to build asynchronous code from the box, and it works very easy. You just need only understand for `async…await`, Promises and callbacks work, and that is all. It is a great, a unique feature that distinguishes it from other languages.

Summary..or how I use them.

Each of this languages can solve any problem. But how I understand some problems with some language solved much faster and easier than with other. So here are some basic situations in which I use my favorites languages:
-System utilities, server scripts and different scripts what work with OS or outer applications — absolutely Python and only Python;
- A big web application which has many components and needs to manage communication between them — PHP, because of the great OOP system, which I love;
- API, quick not big applications or prototypes, much servers — Node.js. Very fast for development and easy to maintain.

I understand that all that said it is my subjective opinion and it is very surface, but it that what learned and what use now. And this understanding sometimes really help me in my work. Hope you find it useful as well.

--

--

Dmytro Huz

Full Stack Web Developer. I love to programming at any time and in any place, it is my work and hobby! https://www.linkedin.com/in/dmitriyhuz/