Frameworks - more minuses than pluses

The reason for this article was another publication on Habré. It is called "Do not learn frameworks, learn architecture" and you can read it here .



I’ll make a reservation right away that I completely agree with the author and just want to add my “three pennies”. At first I thought of doing it right in the comments under the article, but quickly realized that the “penny” is quite voluminous. And so this text was born.



First, a little about yourself



I’ve been engaged in web development for a year since the 98th. He worked for the company and freelancer. He typed teams. Both in real life and online. The first programming language was perl, which is now safely deceased, and I still regret its untimely demise. Then came php. A little later ruby ​​and the era of fireworks began.



Big promises small achievements



I met her enthusiastically. Indeed - it seems that a tool has appeared that is designed to significantly facilitate development, which can save you from a lot of routine. However, enthusiasm quickly disappeared. And that's why.



I don’t know who how, but, first of all, I was expecting to get rid of a large number of monotonous actions that I had to carry out when working on each new project. Design the "backbone" of the database, write the output of essentially the same text pages, etc., etc. Those who have written a sufficient number of sites will easily supplement this list with many, many points. And most fireworks do save a lot of routine. But at what price!



And this time ... and this two ...

Erast Fandorin
My first complaint is to RoR, Yii, Symfony, and almost all the others that I had to meet with - their monstrosity and tons of completely redundant code that invariably ends up in the project. Accustomed to over many years of work, that the code should be as clean and concise as possible, that the application should be as fast as possible, I could not agree with the garbage (excuse me, I can’t say otherwise) that I ended up in projects.



The second claim is an attempt by all, without exception, authors of fireworks to invent, something like their programming language. Let me explain what I mean. Take for example the most common js jQuery library. At the same time, I will make a reservation right away that I consider it to be almost the only useful, competent and many, many flattering epithets, among the like. I give jq as an example only because for sure everyone will understand what I mean. And so you can access the element by ID on native js like document.getElementById ("id"), and like jQuery $ ("# id"). The fact that it was written a dozen characters less is not very impressive. At the same time, jq has a bunch of other advantages for which I am ready to learn a new syntax. In addition, it is reliable and almost never conflicts with other libraries. What can not be said, and a heap of her kind, who are predicted to replace.



Once again I will make a reservation - I am in no case against learning something new. But only if this new one makes my code better cleaner and faster. If I need to learn something so that I could later rivet sites of the same type as a monkey and dare not take a step to the left, step to the right, because I just did not know how - thank you.



Yes, the worst thing is that such an approach to programming simply wears out thinking and when this new super cool framework fails, and this, believe me, happens as soon as the client asks for something from you, at least slightly beyond the scope, woe to the framework (I recently found out that there is now such a profession) falls into a stupor and begins to ask stupid questions in all the forums accessible to him. Everything is downloaded by the fact that one of the programmers (not a framework) sculpts a crutch for it, and God forbid that the customer does not audit the code.



And these are three ...

He is


All of the above applies not only to front, but also to back. As a result, the question arises - at the very beginning I recognized that during any development I have to perform many unnecessary gestures that I would like to optimize, but can this be done at such a price? And besides, there is another point, which is mostly related to Ruby development.



To implement the most basic functions of a web application, you need to connect separate gems. To feed on the database - mysql2, to send mail - mail or poni created on its basis. And so on and so forth. At first glance, there is nothing wrong with that - all gems in Ruby are usually well tested and there are no problems with them. But there are exceptions to this rule too. For example, once a whole week I had to sit with odf-report, which did not want to work correctly, and then spit and write my class. In addition, it is somewhat annoying that with the connection of each gem, the page formation time inevitably increases. On some gem-ahs very slightly. And not some .... Try to experiment on this topic with the already mentioned pony - see for yourself.



The eternal question



And what to do? On the one hand, development in a “pure” language is definitely not an option, but on the other hand, existing tools do not suit for a number of reasons? The way out is seen in creating a tool that would optimize the most frequently used functions and at the same time not hinder the programmer, and would not impose on him a programming style that the author of this tool considers to be the only correct one. In practice, this means that the tool should:



  1. contain a minimum set of standard, most optimized functions
  2. the tool should not force the programmer to learn something like a new “un-language” of programming that completely disables the brain
  3. and all this, ideally, should be made into a light library that does not try to compete in terms of the amount of code with the operating system.


Maybe I'm wrong, but so far, no one has been able to convince me otherwise. Ready to listen to any opinions.




All Articles