
These countless paradigms, concepts, tools, and frameworks
My worldview as a programmer was formed back in the days of console applications and text user interfaces, they were replaced by graphical window GUIs, and now I am already witnessing the third round of technologies connected with the global network. Each time, of course, I had to change not only my favorite programming language, but also the entire technological stack, with developments, prefabricated and fairly extensive libraries, which are now proudly called frameworks. I had to cut it alive, mercilessly and decisively.
Recently, the web browser has become almost a synonym for the user interface, and no one doubts that traditional window applications installed on a personal computer are already a thing of the past. Although a small percentage of the software will remain with them, it will remain forever for the console applications as well.
Watching the formation of the third, in my memory, generation of technologies and specialists, I can note that both “bicycles” and “rakes” are repeated. That is why, I could not write this article. Having a great temptation to go down to the very specifics and take a look at the cogs of several modern languages and technologies, their combinations and features of docking, but let us leave this for other articles and concentrate on the principles that remain unchanged in all incarnations of information systems. I will explain each of the principles with a few examples that are already tied to the web.
1. No need to invent tricks where it can be done simply.
1.1. For example, feel free to abandon OOP where the good old procedural programming is faster and more efficient. It makes sense to deploy classes and objects in memory in such tasks when the application instance will live for at least some long time. And when a script is launched to give a resource in a split second, branched conceptual classes are completely useless. In the end, the issuance of resources by the web server is something akin to stdout, the issued piece can no longer be changed. Although, in server tasks like daemons, batch and delayed processing, crawlers, calculations, etc., OOP is certainly needed.
1.2. Who said that for inheritance and redefinition, objects are necessary? A hierarchical file structure or hierarchical database queries are quite suitable.
1.3. If you are worried that the code doesn’t look cool, but even quite simple, but it does everything exactly, you should reconsider your ideas about programming. It is not necessary to apply all known patterns and concepts in one project.
1.4. Public obsession with templating engines is not entirely clear to me, because most scripted web languages themselves are template engines. The most striking example is PHP: it substitutes variables, there are loops and branching, and most importantly, all this does not require additional parsing of templates. When implementing accelerators, templates will be precompiled into bytecode in the same way as all other parts of the program.
1.5. Now many are guided by the principle of “download from the Internet and fasten”, but even if there is not enough time, then at least look at the downloaded code, it may lead to the idea of how to do the same thing more simply. After all, there is no guarantee that the author of the downloaded code had more experience, talent and time than you. And of course, if you are serious about the system you are writing, you should know, understand and feel every line of code in it.
2. Select and fix the toolkit for a long time, if you want variety in functionality.
This is an empirical principle, which, however, always works. Perhaps some academics will lead him out of the fundamental laws of the universe, but for now, no one is stopping us from using it on an intuitive level. I think that most of you will be able to give a lot of examples when clearer and more rigid languages and technologies become the platform for more diverse software. On a smaller scale, we can simply introduce corporate standards, internal specifications, formats, and protocols.
3. Inappropriate and inappropriate use of tools is more common than bad tools.
Each language and technology has a range of tasks for which it is ideally suited, and for other tasks there are certainly their own adequate means of solution.
4. It is impossible and not necessary to separate data, logic and representation on one layer of abstraction.
This is surprising, but even before the invention of MVC, and even more so, before its mass implementation, programmers understood that in each module there are always three parts: logic, data and mapping (or code, memory structures and interface). But lately, I have been observing an abuse of this principle, saying, "they said to share, then we will share." But sharing is not always successful. Even if you select a presentation layer (display), then there is always a place for all three parts: the display logic, display data and display templates. Therefore, you can divide forever, and the Serpent Gorynych will still be about three heads. The situation is the same with the allocation of the model and the controller, in them again it will be possible to select all three components. A stubborn struggle with this fact leads many to generate an incredible amount of code, classes, designs and lotions. I do not speak, that MVC does not work, you just do not need to use it so fanatically, universally and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. you just don’t need to use it so fanatically, everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. you just don’t need to use it so fanatically, everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. Is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. Is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. in the wording I wrote precisely “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. in the wording I wrote precisely “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task.
5. There is no perfect code, you need to be content with some degree of versatility.
As an idealist and perfectionist, it was the hardest thing for me to realize. I would be free, the program code would be improved to the point of insanity, until the program would not begin to solve all conceivable and not conceivable tasks and would be called simply “program”. Bringing to the point of absurdity can only be completed over an infinite amount of time, and code optimization should tend its length to zero. Such a program is simply obliged to solve all programming problems once and for all. But in practice, you need something completely different, namely, to solve an applied problem, which does not really require perfect code. Of course, the code should please with its beauty, but do not get carried away.
6. Any extremism is bad.
If you help someone who is mistaken, bring the error to the point of absurdity, then he himself will refuse it in favor of the rational. Simple is more reliable than complex, good is more profitable than bad, and high-quality is ultimately cheaper than poor-quality. Only pride and fears do not allow you to see simple ways, you do not need to exert extra effort to achieve goals, it is better to abandon mistakes and the desired will coincide with reality.
7. The development of the system leads to its limitations.
Any system, including information, for development requires decision-making, but each decision leads not only to the appearance of functionality, but also to the creation of restrictions. Therefore, when making assumptions and making assumptions, always think about what limitations this leads to and whether you are ready for them.
It's all. I hope someone will do it for the future.
Recently, the web browser has become almost a synonym for the user interface, and no one doubts that traditional window applications installed on a personal computer are already a thing of the past. Although a small percentage of the software will remain with them, it will remain forever for the console applications as well.
Watching the formation of the third, in my memory, generation of technologies and specialists, I can note that both “bicycles” and “rakes” are repeated. That is why, I could not write this article. Having a great temptation to go down to the very specifics and take a look at the cogs of several modern languages and technologies, their combinations and features of docking, but let us leave this for other articles and concentrate on the principles that remain unchanged in all incarnations of information systems. I will explain each of the principles with a few examples that are already tied to the web.
1. No need to invent tricks where it can be done simply.
1.1. For example, feel free to abandon OOP where the good old procedural programming is faster and more efficient. It makes sense to deploy classes and objects in memory in such tasks when the application instance will live for at least some long time. And when a script is launched to give a resource in a split second, branched conceptual classes are completely useless. In the end, the issuance of resources by the web server is something akin to stdout, the issued piece can no longer be changed. Although, in server tasks like daemons, batch and delayed processing, crawlers, calculations, etc., OOP is certainly needed.
1.2. Who said that for inheritance and redefinition, objects are necessary? A hierarchical file structure or hierarchical database queries are quite suitable.
1.3. If you are worried that the code doesn’t look cool, but even quite simple, but it does everything exactly, you should reconsider your ideas about programming. It is not necessary to apply all known patterns and concepts in one project.
1.4. Public obsession with templating engines is not entirely clear to me, because most scripted web languages themselves are template engines. The most striking example is PHP: it substitutes variables, there are loops and branching, and most importantly, all this does not require additional parsing of templates. When implementing accelerators, templates will be precompiled into bytecode in the same way as all other parts of the program.
1.5. Now many are guided by the principle of “download from the Internet and fasten”, but even if there is not enough time, then at least look at the downloaded code, it may lead to the idea of how to do the same thing more simply. After all, there is no guarantee that the author of the downloaded code had more experience, talent and time than you. And of course, if you are serious about the system you are writing, you should know, understand and feel every line of code in it.
2. Select and fix the toolkit for a long time, if you want variety in functionality.
This is an empirical principle, which, however, always works. Perhaps some academics will lead him out of the fundamental laws of the universe, but for now, no one is stopping us from using it on an intuitive level. I think that most of you will be able to give a lot of examples when clearer and more rigid languages and technologies become the platform for more diverse software. On a smaller scale, we can simply introduce corporate standards, internal specifications, formats, and protocols.
3. Inappropriate and inappropriate use of tools is more common than bad tools.
Each language and technology has a range of tasks for which it is ideally suited, and for other tasks there are certainly their own adequate means of solution.
4. It is impossible and not necessary to separate data, logic and representation on one layer of abstraction.
This is surprising, but even before the invention of MVC, and even more so, before its mass implementation, programmers understood that in each module there are always three parts: logic, data and mapping (or code, memory structures and interface). But lately, I have been observing an abuse of this principle, saying, "they said to share, then we will share." But sharing is not always successful. Even if you select a presentation layer (display), then there is always a place for all three parts: the display logic, display data and display templates. Therefore, you can divide forever, and the Serpent Gorynych will still be about three heads. The situation is the same with the allocation of the model and the controller, in them again it will be possible to select all three components. A stubborn struggle with this fact leads many to generate an incredible amount of code, classes, designs and lotions. I do not speak, that MVC does not work, you just do not need to use it so fanatically, universally and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. you just don’t need to use it so fanatically, everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. you just don’t need to use it so fanatically, everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. everywhere and energetically. Remember, the struggle with the problem can only aggravate it, is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. Is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. Is it not better to accept and even use this fact. In the end, a correct understanding of the issue gave rise to such classes of systems as DBMS, application server and GUI. Note that in the wording I wrote exactly “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. in the wording I wrote precisely “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task. in the wording I wrote precisely “on one layer of abstraction”. I will explain: the DBMS operates with data and logic and mapping at the level of relational abstraction (or other information models), the application server operates at the level of domain abstraction (or at the level of metaprogramming), the user interface operates with a completely different aspect of the same task. That is, it is not the data, the logic, and the presentation that need to be dissected (they need to be distinguished rather than divided), but abstractions or aspects of the task.
5. There is no perfect code, you need to be content with some degree of versatility.
As an idealist and perfectionist, it was the hardest thing for me to realize. I would be free, the program code would be improved to the point of insanity, until the program would not begin to solve all conceivable and not conceivable tasks and would be called simply “program”. Bringing to the point of absurdity can only be completed over an infinite amount of time, and code optimization should tend its length to zero. Such a program is simply obliged to solve all programming problems once and for all. But in practice, you need something completely different, namely, to solve an applied problem, which does not really require perfect code. Of course, the code should please with its beauty, but do not get carried away.
6. Any extremism is bad.
If you help someone who is mistaken, bring the error to the point of absurdity, then he himself will refuse it in favor of the rational. Simple is more reliable than complex, good is more profitable than bad, and high-quality is ultimately cheaper than poor-quality. Only pride and fears do not allow you to see simple ways, you do not need to exert extra effort to achieve goals, it is better to abandon mistakes and the desired will coincide with reality.
7. The development of the system leads to its limitations.
Any system, including information, for development requires decision-making, but each decision leads not only to the appearance of functionality, but also to the creation of restrictions. Therefore, when making assumptions and making assumptions, always think about what limitations this leads to and whether you are ready for them.
It's all. I hope someone will do it for the future.