📜 ⬆️ ⬇️

Comparison of programming languages ​​and frameworks for them

image Surely many were tormented by the question - which language and framework for it to choose for their work. I also thought about this issue and the results of my testing will be given in the article.

I have been a web developer for several years and constantly monitor developments in a web development environment.
In the course of my professional activity I was able to get acquainted with a pile of technologies, languages, libraries, frameworks and other things.

From time to time asking myself the question “so what to choose for permanent work for myself (what language, what framework)?” I began to study a comprehensive Google for this answer. And he was, however, surprised, because I did not find the information I needed. All articles roll down to the point that all languages ​​and frameworks are good, especially for individual tasks and you cannot say who the winner is. Like, you want to know the answer - try everything and decide for yourself.

I completely agree with the last statement, but I would not have had enough of a simple subjective answer, I wanted numbers. Then I thought up to take a set of tasks to compare programming languages, as well as frameworks and their usual functionality. Since I work on PHP, first of all I started by choosing frameworks for this language. Now tested: Yii2, Laravel5. They took it, because are the most popular PHP frameworks (yes, symfony, I also remember about you).
')
From other languages ​​(and frameworks) were taken JS (NodeJS + SailsJS) and Ruby (Rails), because there was also a certain level of acquaintance with them.

Immediately explain why these particular languages ​​/ frameworks were taken.

The main goal for me is the choice of technologies for developing future projects, both mine and the company where I work. Of course, you will not denote a subjective assessment by numbers, therefore only quantitative indicators will be in the resulting tables. In general, I came to the conclusion that php and ruby ​​+ frameworks mentioned above are convenient for me to about the same extent. But the development on nodejs did not seem to me so convenient, fast and cool.

So, performance tests for certain tasks for languages:



The first test is the generation of the Pi number with the number of iterations = 100000000.
Next comes the test for generating the Mandelbrot set.
After - the exponents are generated using the language itself, as well as using the additional libraries available in the language.

The results, in fact, were not very surprising - nodeJS confidently walks ahead of the rest.

I was very pleased with PHP7 - the uplift of performance in version 7 compared to 5.6 is very well felt. But why the results of tests for generating exponents with libs yielded such a result - I have not quite understood yet.

Further frameworks were tested:



The test is very simple and typical for simple sites - to get information from the database, send it to the render to the presentation and output to the buffer.

In this case, 3000 lines from Mysql are taken from 10,000 lines in the database and pagination is built.

Here SailsJS, frankly, surprised. I expected that he would quickly do all his competitors. But he didn’t lose what he did, but he also lost to Laravel.

Everything was tested without caching. When caching is enabled, the data is, of course, somewhat different, but the pictures do not change.

Conclusion


I will continue to test languages ​​and frameworks for speed and convenience. At this stage, the closest in terms of convenience / speed of development and the speed of the application, organizing the code for me is Laravel.

Comments, comments and pull-requests to my repository are welcome.

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


All Articles