📜 ⬆️ ⬇️

Difficult choice of Python or PHP. And maybe both?

Despite the title, this article will not contain “holivarny” statements, reviews of the merits or shortcomings of languages. For the most part, this article is philosophical, purely subjective, with a small admixture of personal experience.

The choice is really really hard. Initially, we developed all the projects in PHP. But over time, dissatisfaction with this language accumulated. By and large, did not like the speed of development and the comfort of working with him. Even elementary at the level of the syntax of the language, you have to type a lot of excess. These $ before variables, -> to access a method or a member of a class, and a lot of little things that annoyed and sometimes enraged.

Formally, it is even difficult to convey what this language did not suit. For any statement or example, there will be a more competent specialist and fan of PHP who will argue: what should be done wrong, but everything will be fine, or it’s not a problem at all, but rather dignity. I’ll just say this - this language has ceased to be liked exclusively subconsciously, it’s not pleasant to write on it and that's it. Does not bring work satisfaction.

But satisfaction with satisfaction, and old projects will have to be maintained and developed in PHP, since not everyone will decide to rewrite thousands of lines of code. Yes, and there is no special meaning (unless of course some critical constructive problems are found that rest on the shortcomings of the language). And the language is not so bad, and maybe even in something good, to take up the rewriting of projects in PHP.
')
But new projects are decided to be done in Python using the Django framework. To come to this conclusion had to shovel quite a lot of forums and blogs. Information is actually little, as well as the normal adequate posts of people who are well versed in both languages. Basically, everyone praises his swamp or philosophically remarks, “What choice depends on the objectives of the project.” Although most of the tasks for the web project can be solved in both languages.

In the process of studying the question “who in the world is all the sweeter ...”, there were often thoughts about whether to even go anywhere, whether there were such great advantages in other languages, and whether they were laborious for training, searching for new specialists and so on. There are no ideal languages ​​and cannot be, therefore, most likely the new language and, accordingly, the new frameworks will have their own “pitfalls”. Therefore, in the end we came to a completely ordinary conclusion, which was given in the forums by the most sophisticated people: until we ourselves try to answer these questions, we will not get.

We decided to try to write a project on python and use the Django framework. The reason chosen is rather banal - Yandex praises the python. We also found a couple of articles about using Django in Yandex. The feedback is more positive than negative, and after several years of use, they did not follow any disappointments in this language or framework (at least we did not find such articles).

Our new project at the very beginning of the journey, briefly tell you about the impressions. Python as a language very much, everything that did not like in PHP just satisfied in python. The project development speed was almost the same as in PHP, but this is taking into account the fact that some of the specialists were retraining under Python, and time was spent searching for new specialists. That is, we, at least, have not lost time, and when the development process is fully stabilized, I think the speed will increase many times.

The project is only at the beginning, so all the pitfalls are probably ahead, at least one goal has been achieved. Work again began to bring satisfaction.

But we are not going to give up PHP at all. He has his own very decent niche in small, and maybe medium projects. But Large we plan to develop only in Python. At least in the near future.

Source: https://habr.com/ru/post/142600/


All Articles