📜 ⬆️ ⬇️

The native has died. Long live the native!

1. Instead of the preface


“The king is dead. Long live the king! ”- we all heard this French phrase, which, as it were, shares the epochs of the monarchs. Everything! - it seems to us, - the old one is finished, now everything will be new, different. But is it?

In this article I will touch on the topic of native applications, or rather their extinction ... or, perhaps, just their reincarnation? To decide only you. Yes, yes, I know that the risk of looking like a retrograde, taking an unpopular point of view. Nevertheless, I would like to find at least a few like-minded people who will agree with my reasoning, and, of course, to get valid criticism.

So, native or as they are called, desktop applications are special programs that have been developed for a specific OS (operating system) and have such a feature as “compatibility”. I admit at once: yes, I am a developer of such applications. However, the specifics of my activity (developing a CMS for online stores) also requires excellent knowledge and web technologies.
')
As for me, a significant part of the programmer’s working time can be divided into the two remaining: search for a solution and search for a tool. I think many have noticed and know that the better the tool is suitable for performing a task, the less it is universal for solving a wide range of tasks. That is, there is no ideal language, technology, etc., and therefore I, like many of you, have to periodically be distracted from pressing projects; to study what new tools appeared on the market; make a strategic decision about what I will study tomorrow. For example, after all, it may be a long time ago no one uses a screwdriver to tighten the screws, but uses a screwdriver, or even switched to a new “dowel-nail” technology.


This is my personal dilemma: it seems like it's time to switch to a full-fledged HTML development, but, alas, no, I still stand firmly with one foot on the native . Indecisive? Or maybe I’m just not young enough to rush headlong into the embrasure of difficulties? Checked - with age, a person becomes more pragmatic. So I don’t care about what is just fashionable, and I don’t care about the mainstream, I never want to do anything “because they do so many”, success to them, but if they didn’t bring sensible convictions, then the quantity factor is just leveled by me.

As a programmer and entrepreneur, I want to complete my task, and I want to do it efficiently, quickly and practically. However, many companies want me to do this with their tool. This is a business, nothing personal, I myself like this: I want the sites to be made on my CMS, and you probably only want yours. Pay attention to the essence: the idea of ​​promoting your brand as a means to achieve a goal is very interesting and profitable. Such companies-developers of technology-standards get a “carte blanche” - the right to successful and unsuccessful solutions, errors no longer kill all the technology or software complex overnight, but allow you to save the development team until better times. As for the current miscalculations, they can be compensated for at the expense of their regular customers: you think, the new screwdriver is heavy, the next model will be easy!

In general, I’ll finish this thought, summing up: very few of us write on machine code, so accept it, we are all controlled, and we have been manipulated for a long time (if pride is offended, then read: they fight for us, we are attracted). This I mean that you do not have illusions like “I write in the most correct language or use the most optimal technology”. And as in any market, the usual rules apply: the one who has the best combination wins - the product's capabilities + the persuasiveness of the seller. However, unlike an ordinary consumer who buys a tablet or a car, we will suffer very significant losses in the event of making a mistake (not optimal choice) - years of life, and years of life in programming are very expensive! That is why it is critically important to separate these two factors in order to confidently follow your own course, and not to hang out, like a smart boat driven by changeable marketing winds, on mainstream waves.

2. Dilemma


So, I had a task: to make a CMS for managing an online store. I decided to soberly compile a list of all the pros and cons of native and web applications, which I submit for your consideration. The only thing that before that will be to correctly stipulate what I specifically mean by “native” and “web application”.

Native application


Web application


IndicatorNative applicationWeb application
VersatilityNot universal. Not suitable for a mass-use product that should be used on as many devices as possible operating under different operating systems.Universally (relatively). Although browsers have their own characteristics, in most cases the application will run on most devices running different operating systems.
InterfaceStandardized. Based on OS objects (button, input field, tree, table, etc.) that have been used for decades and are familiar to the user.Not standardized. There are similar objects (button, input field, etc.), but these are not OS objects, but similar browser objects and they are much smaller. Most of the objects implemented by the developer independently.
Performance (interface)Maximum. Compiled code that operates with OS objects. The application gets access to all OS resources, can use high-performance library modules developed in low-level languages.Medium or low. The application is interpreted and works in the browser - add-in in the OS, so it has access only to browser resources. The key indicator when choosing a browser is still its speed, which confirms the relevance of the issue.
Performance (data)From high to low - depends on the implementation. If the application is small and operates with a small amount of data, then the speed becomes indistinguishable from the web application. However, if the amount of data is large, then batch work with data is realized. To do this, use the resources of the OS, allowing you to organize a local database. A properly designed application more than compensates for the time spent on downloading even an excess amount of data due to more rare communication sessions with the server.Medium or low. The application is designed to work with a minimum amount of data so as not to overload browser resources. This implies the need for frequent work with data (reception / transmission). This leads to increased requirements for the communication channel: connection speed and stability. If the speed of the modern Internet is high, then the stability of the channel, plus the loss of time to connect (before sending each data packet) remain still on average, and in regions it is low.
Comfortable designHigh. The main operating systems are far from young; they have a number of powerful SDKs that allow you to program comfortably in high-level languages. Many languages ​​were written thoroughly, their OOP model was laid down from their very birth. Very important is the possibility of using a wide range of library modules that can be implemented in other languages, including low-level ones, thus providing the most practical (read less “buggy”) solution to their narrow task.Average. At the core of web applications is several languages ​​at once: HTML + CSS, JavaScript. And there are problems. The first (more or less resolved) is that server scripts for a long time were supposed to generate HTML code that browsers visualize. This turned out to be very inconvenient, so now everyone is trying to transmit only data (XML, JSON). But there is the following problem: neither HTML with its CSS, nor JavaScript was created for this. To date, there is no single recognized environment in which you can easily and easily develop a web application.


And now look how interesting it turns out: the development of server-side scripts responsible for preparing the data is essentially the same for both native applications and web applications. After all, as I mentioned in the table, the general tendency is this: take the HTML code out of the scope of scripts and transmit / receive data in XML or JSON format. Thus, the task of client applications is to accept data, visualize it, get new data and transfer it to the server. And here I would like to share my observations with you. Since I am free to develop both types of applications, I saw a certain analogy. Look carefully at the several files below:

Native application (form description file)Web application (page description file)
object Form1: TForm1 Left = 592 Top = 128 Width = 336 Height = 260 Caption = '' object BSubmit: TButton Left = 92 Top = 140 Width = 75 Height = 25 Caption = 'Submit' TabOrder = 0 end object EName: TEdit Left = 72 Top = 76 Width = 121 Height = 21 TabOrder = 1 Text = ' ' end end 
 <html> <head> <title>Hello world!</title> <style type="text/css"> H1 { font-size: 120%; font-family: Arial; color: green; } </style> </head> <body> <h1></h1> <form action="action.php" method="post"> <p> : <input type="text" name="name" /></p> <p><input type="submit" /></p> </form> </body> </html> 
Native application (program file)Web application (program file)
 procedure TForm1.BSubmitClick(Sender: TObject); begin Application.MessageBox('hello', 'Sample'); end; 
 $(document).ready(function(){ $("#submit").click(function() { alert("Hello world!"); }); }); 


Comparing them, you will see that a modern web application is nothing more than a good old native, and the web browser in this case acts as an OS. There is a well-known joke among Windows users on this topic (or maybe not a joke): “The latest version of Google Chrome browser will update to Google Chrome OS.” That is why I called the article “Nativ died. Long live the native! ”As everything turns out to be new, this is a well forgotten old. The only thing that is old is well known to me and has several advantages, so why should I unconditionally believe in the new?

3. Remaining


What follows from all this? If you are developing a mass application for mass consumption, then you, of course, better use the web application. Just do not forget to build his work in such a way that at the same time work is carried out with a fairly small portion of data. This will allow your application to work fast enough.

If you are developing a specialized application (for example, as I am a CMS for an online store), then think, perhaps the native application will be a more effective solution. First, you write a specialized product, and this means that to work with it, the user will have to adapt in any case: a productive PC, a good monitor, the necessary OS and, of course, a productive program. And he is ready to do it without problems, since he understands that he is investing in technology in order to get ahead of competitors. Secondly, the interface is still quite familiar and will speed up the process of exploring the application. Thirdly, you as a developer have more opportunities. Such operating systems as * nix, Windows, MacOS exist for a long time, and a lot of programmers have developed and perfected their software products - separate libraries.

Therefore, today, I emphasize, today, I see that you and I have much more opportunities when implementing a native application. Yes, of course, we must not forget about the future, but personally I am not ready to waste my time to promote raw technologies, or, in any case, I should pay good for it. If you (your company) have an investor, and he said that he heard a “voice from above”, and we need to work out on that and that, then yes, why should he cross it? But if you are doing a project, investing your hard-earned money and your time, in a project that should be completed as quickly as possible and aimed at maximum competitiveness, then think about it!

So I came to that moment to discuss what, in my opinion, would be fair and honest with me as a developer. Although I am writing rather harshly here about web applications, however, I do not reject them . And this is very important, I would like to focus on this. These are not just words, I use web applications in my products, combining them with native ones, but this is already a topic for a separate article. Now I want to dwell on what prevents me from confidently taking the path of web application technologies:



4. A little philosophy


There is such a law of nature, a certain “instinct of self-preservation”: while you achieve success, you are ready to break any rules, but when you succeed, you set the rules and make sure that others (losers) fulfill them. Therefore, a company that has gained market share through an innovative technology will in every way seek to monopolize it and try to make it a common standard (a law that will subordinate others). The most powerful tool in this process is marketing.

By the way, many people think that a skillful seller is a person or a company who is trying to sell you something telling about the merits of the product. Guys, this style is the last century, and the lot of the eastern market. In today's world, sellers have evolved very much, in many cases you don’t even know who the seller is, you don’t realize at all that the buying process is going on, the decision you make seems absolutely logical and consistent, and the costs associated with it are simply inevitable.

Thus, in the IT field, its own platform with native applications, which promote the platform itself, is best suited for controlling the situation. "Stop. But what about HTML? After all, everyone is trying to support and develop it! ”, You say. HTML is the "world through teeth" for large IT companies and a great business incubator for start-up companies. Compare the costs of developing web and native applications, so these are the very risks. Thus, a small company may try to implement its idea, but large companies are ready to develop a free browser supporting your web application.

But, as soon as any idea turns out to be promising, funds are immediately invested in it for developing a powerful native application. And so powerful that it just begins to associate with the OS itself, and the OS in turn with the brand. For example, geo maps developed initially for the web, and then appeared as native applications for each device based on MacOs, Windows, Android. These applications, as well as several others (email clients, instant messengers, markets) are quite important for mobile devices, being their “calling card”. Think for yourself: choosing this or that device (mobile phone, tablet, laptop, workstation), you ask yourself a question about how well this device works well with HTML, or what applications can you put on it and how well will they work?

Links


goosly.com/1/esli-html5-eto-priblijaushiysa-poezd-to
habrahabr.ru/post/155325
inet777.ru/buduschee-mobilmznyih-prilozheniy-nativnyie-ili-html/8401

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


All Articles