Native or hybrid? Yandex specialists answer the main question of mobile development

    There are literally four days left until we finish accepting applications for participation in the second Yandex “Mobilization”. It will again unite four summer schools for beginners: the School of Management , the School of Mobile Design , the School of Interface Design and the School of Mobile Development for Android .



    Not only Yandex employees who make applications for millions of users, but also invited specialists will share their experience and knowledge with the participants. We will not do only with theory. There will be a lot of practice and teamwork on real products. As always, tuition is free, and Yandex will pay for travel and accommodation for all nonresident students. If you have not sent an application, there is little time to do it. Classes start on July 3 and end on September 23 - the day of Yandex's twentieth anniversary.

    In mobile development, some of the most heated debate is around native and hybrid development. We decided to give three of the Mobilization faculty members reasoning on this subject. It turned out a short interview, which may be interesting for both beginners in development and those who have already decided on their choice.

    Yuri Podorozhny . Head of Yandex Mobile Geographic Information Services Development Services. Works on Yandex.Maps and Yandex.Metro. Engaged in mobile development for more than eight years. The founder of the studio Any Void, which in 2014 became part of Yandex.


    Sergey veged Berezhnoy . Head of Search Interface Development, Yandex since 2005. Managed to work on Search, Mail, Blog Search, Ya.ru, Pictures, Video. In addition, he is actively engaged in the development of internal tools for creating sites.



    Lola Kristallinsky . Head of the design department, has been working with Yandex since 2008, is responsible for the hiring, management and development of designers, communications and educational programs of the department and the entire design ecosystem in the company. With Lola, a team of designers and design researchers from Yandex began. Prior to joining the company, she headed the website development department of Artemy Lebedev Studio.



    Lola Kristallinskaya:
    Let us first give a definition of what native and hybrid development are in general, and what is the difference between them?

    Yuri Podorozhny:

    In 2007, the iPhone appeared, in 2008, Apple made it possible to make applications for it, which was the starting point of the native development. It is a compiled programming language with a development environment limited to one mobile platform. Objective-C and Swift for iOS, Java for Android. Applications are created in one of these “native” languages ​​according to the laws of a particular platform.

    Lola:
    In terms of programming, was it something revolutionary new?

    Yuri:

    Of course not. The term “native” itself arose simply in contrast to the hybrid approach.

    Sergey Berezhnoy:
    By hybrid development we mean a way to write applications when it is fully or partially rendered and works using web technologies. That is, something used inside is implemented using HTML, CSS, JavaScript.

    Yuri:
    In fact, a clean web application cannot be done right now. You still need to put the web view inside an iOS or Android application, that is, in any case, you need a container that is written using Java, Swift or Objective-C. So, there will still be some percentage of the native code. Clean web applications were probably only the first year of the iPhone, when it was still impossible to create them from the outside. And Apple then promoted the theme for developers to make web applications. By the way, this function is still there. You go into Safari, click on the "home" screen, an icon is added to the desktop, in fact, this is a clean web application. Only, of course, you will not distribute it through the Store.

    Sergei:
    Now there are a number of frameworks, platforms like PhoneGap / Cordova, in which, relatively speaking, this code fragment has already been written. You simply take them as a basis and develop them, combining them with web elements at your discretion.

    Yuri: The
    hybrid approach arose, probably, from a natural desire to save time and resources when mobile development began to gain momentum. For example, there is a certain young OS, there is a whole range of technologies that have come from the web, and many are tempted to why not use them. But honestly, I don’t know why. In my opinion, not a single normal application using web technologies can be done.

    Hybrid for simple tasks, native for complex


    Lola:
    In this case, is the choice problem relevant at all? For example, I’m a manager, I have a product and I need to make a mobile version. How to decide which is better for me - hybrid development or native?

    Sergey:

    We need to proceed from the task, the necessary expressive means for its implementation and available resources. If in life they ask you to play music, and you only have colors, then it will be hard. If you need to process video from a camera in real time, make 3D animation and similar complex things, then you can not do without nuclear technologies of the native platform. And, on the contrary, if a simple black-and-white pencil is enough for your application as expressive means, then web technologies can save time and money.

    Yuri:
    I agree, it all depends on the task. But, in my opinion, the web is only relevant in a few cases. For example, if this is a completely new product and it is not yet clear whether the market will perceive it, whether someone needs it or not, then the task is to test a certain hypothesis. Or if it's just displaying the content in a small amount and it is not supposed to actively interact with the interface, transitions between screens and sections. For example, the Meduza application. We go to the news screen, this is just a web view. They have a simple layout, exactly the same as for the web, they don’t even need to prepare content, everything is immediately displayed in the mobile version.



    Sergei:
    According to the task, the sites can be completely different. Remember, at one time there was a choice between making flash sites or HTML sites. And everyone said, if you want, the text drawn in a circle, the video is inside and that everything was beautiful, then you need to do only flash. So it is here.

    Yuri:
    There are, of course, successful examples of hybrid applications. For example, Basecamp has an interesting model: part of the navigation is implemented natively so that transitions are carried out quickly and smoothly, and the content in the task list is displayed in HTML, so they have the same templates for the touch and mobile versions. But we always had a native approach in Yandex.Maps, because it is simply impossible to make an application with maps that is productive and convenient using web technologies. The only place we use the web is the conclusion of a license agreement.

    Shackled by guidelines


    Lola:
    Ideally, everything, of course, should come from the meaning, from what and why you need, what product and what is important for it. But we live in the real world, where not everyone and not always, in principle, has a choice. Someone does not have enough money to hire a whole team of developers, so you have to be inventive. What other factors play a role in choosing technology?

    Sergei:

    If I had an infinite amount of money, I would hire three developers who would make good native versions for all platforms. But I'm too greedy to allow myself such a squander. A hybrid approach allows you to save money: make one option and use it everywhere. But if in the future the task becomes more complicated, and it becomes necessary, for example, to overlay pictures on video in real time, you will still have to spend money on three developers.

    In addition, the question arises whether you want to draw three different designs for each application three times. After all, the guidelines of operating systems are very different from each other, and like a swan, cancer and pike move in different directions in small things. If you carefully read the guides of Windows Phone, Android and iOS, it turns out that you need to think carefully about how your user task will be optimally solved on each platform.

    Lola:
    If the application is not made according to the guidelines, then the check in the Store will not pass?

    Yuri:

    Yes, of course. Not all applications tested by Apple correspond to designer guidelines. No one really monitors compliance with these rules.

    Sergei:
    But we are talking about applications A + and AAA-class, about the big leagues. If you do these, then the question of native design for each platform will certainly arise.

    Lola:
    But the general design is impossible in the native development: if you just have your own buttons and controls?

    Sergey: It

    depends on which camp you belong to. Some believe that the application should be inside the platform. An alternative point of view - each brand should look the same on all platforms. If you look at Instagram or Facebook, then these are just examples of the brand’s struggle for self-identification in relation to platforms. They specifically design their applications so that they look special and the same everywhere.



    How do applications in Yandex


    Lola:
    For many, the fact that Facebook has become disillusioned with web technologies and switched to native development has become a proof of the superiority of the latter. How reasonable is this?

    Sergey:

    This is just the story that Facebook is good to be when you can hire as many programmers as you like to make the product separate for all platforms. By the way, in response to such a move, some guys, to promote their studio, made up a Facebook web application without all the disadvantages that made Facebook change their approach. That is, everything is not so clear here. Maybe your web application is slowing down not because web technologies are bad, but because your programmer did not do everything he could.

    Yuri:
    Facebook in the first version had a completely native application, then they switched to HTML, lived a couple of years with two stars in the Store, because the product really slowed down, everyone scolded them, and eventually returned to the native. Here is a lively illustration of how you want to make a good web-based interface out of good intentions, but in the end, you run into low productivity or lack of development funds anyway.

    Lola:
    But Yandex’s search application, for example, is hybrid. Why, if so many flaws in web technology?

    Sergei:

    Our services mainly solve information problems, therefore, interfaces can be simpler than in the case of entertainment gaming products. So we don’t really rest in performance. And the expressive means of web technology with skillful use are not so meager. In addition, the flexibility of the hybrid approach allows us not to completely rewrite some of the achievements made earlier on the web, of which we have a lot, and reworking them would require a lot of labor. And so we save time and money.

    But our designers have a difficult time - they need to create interfaces that will be perceived by users as the “common Yandex interface" regardless of the platform.

    Yuri:
    In addition to the UI, there is another question of user convenience. And each platform has its own UX. Users expect a good app to be comfortable and follow their habits.

    Lola:
    How do you solve the problem of the balance between user convenience and brand unity in your products?

    Yuri:

    Two years ago, this problem in Yandex was more obvious. All applications were very different in style. As a result, we developed our own interface guides common to all, choosing the most successful patterns from all mobile guidelines, and sometimes coming up with our own best ones. But the process of introducing new rules is very long, with a huge number of pitfalls and has not yet been finalized.

    Sergei:
    The main driving factors of our experiments with technologies are optimization of labor costs for development and the desire to provide users with a quality product. Initially, we made our search application natively, but, for example, we encountered another problem such as synchronization of teams and releases. Even if you initially decided to invest in different developers under three different platforms, then in the future you run the risk of encountering a management problem. How to make sure that the new UI, new features on these platforms are updated everywhere at the same time, and so that they have a truly synchronous understanding of this interface?

    As practice shows, in large companies all this turns into different clans of developers: some make the mobile version of the application, others make the touch version of the site, still others make the desktop version, someone creates the application for Android, and some for Windows Phone. And you need a level 80 manager to synchronize all these five teams with each other. And the approach of a single code, therefore, a single command, helps get rid of such confusion.

    Yuri:
    In my opinion, this is not a problem, but a problem condition. For example, when we do some kind of new thing in Yandex.Maps, we first work it out on one platform, and then, having collected all the rakes, we add them to all the others.



    What a developer needs to know to start making applications


    Lola:
    How different is the entry threshold for native and hybrid technologies? In general, what base should a programmer have to go to mobile development?

    Yuri:

    The developer of native applications must know Objective-C, or SWIFT, or Java, or C ++. But, in my opinion, in what language to write, it’s a business, the key here is basic programming knowledge. Everyone with whom I made applications in my life were students without mobile experience, but with a good background. Everything else is comprehended in practice. You will find yourself in a good team of professionals, you will grow an order of magnitude faster.

    Sergei:
    If a person has experience in developing interfaces using HTML, CSS or JavaScript, then you will have to dive deeper into the specifics of mobile browsers. If we talk about interfaces, then these are interaction patterns - more with fingers, less with a keyboard. Runtime has its own specifics of JavaScript and CSS for mobile browsers, but there have been less and less differences lately. As a rule, development for mobile is simpler than for a wide range of desktop browsers, because they, as a relatively new technology, have a more modern implementation of web standards. But now, as mobile platforms age, the same problems begin to arise as on the desktop, when there are clients with old browsers that don’t support some things.

    Lola:
    Do programmers have a division into mobile and non-mobile? For example, in the design market this is now a mandatory additional skill. Maybe you really do not deal with mobile interfaces every day, but without basic knowledge of mobile design it is almost impossible to pass an interview and selection.

    Yuri:

    Programming has such a huge field of application that a person who is developing some server components in C ++ may not know anything about mobile development, write, for example, some banking software and feel comfortable.

    Sergei:
    I agree that developing microcontrollers or user interfaces is very different, and it’s not so easy to jump from one boat to another. But if we talk about mobile development, then at Yandex we take people who typeset our sites immediately for desktop and mobile versions. That is, they must understand how our layout, our HTML, CSS and JavaScript will work in desktop browsers, and how in mobile, what are the features and nuances. It turns out, as with the designers, an additional skill of the front-end developer.

    Lola:
    And inside the mobile sphere, how tough is the division of specialists depending on the platform?

    Yuri:

    Android and iOS are two completely different stories. If you wish, of course, you can learn to do both. But among those with whom I worked, there was not one who would change the platform.

    Sergey:
    Each platform is a fairly deep ecosystem, and good practical experience is needed to work. But I think that we can easily take an intern with knowledge of android technologies and who wants to learn Apple’s team in the team that deals with iOS applications. The difference is still not as big as between the programming of microcontrollers.

    Adaptive layout - not a panacea


    Lola:
    I heard that for the poor, but cunning, there is still such a thing as adaptive layout, which is immediately for the web and for mobile.

    Sergey:

    There is a technological opportunity to make the interface on web technologies so that it behaves differently on the desktop and mobile, and so that it can adapt to them. But, unfortunately, the rubberiness of some products is not infinite, and the variability within which this adaptability can be is very limited. The main advantage of such a rubber layout is that you made up one code and use it everywhere.

    In Yandex, we do a little differently: there are common pieces that we use everywhere, but there are those that need to be different, for different sizes, we write them separately. Thus, we try to sit on two chairs: take the reuse of the code, which is in the concept of adaptability, and introduce more subtle adaptability with specific redefinitions for touch and desktop platforms.



    Lola:
    Let’s summarize how the manager, designer and developer take into account all these nuances?

    Sergei:

    I recommend not to be stubborn fanatics and make conscious choices every time, having in your head the widest possible context and taking into account all factors. Do not think like, “Since Facebook has switched from a hybrid approach to a native one, that means we need to” or “Since Yandex makes up its output in an application using web technologies, that means we need to do that.” Need to dive into the topic.

    Yuri:
    And for this you need to at least understand both. Understand how the world works, how it works, because there is no one right approach. It is quite possible to make a native application in which some interfaces and sections will be made on the web, and thereby simplify your life in places. It is necessary to disassemble each task individually, and only then make a decision. There is no magic pill here.

    Also popular now: