My co-worker Bob Moore (@remoorejr
) pointed out an essay written by iOS developer Drew Crawford titled "Why mobile apps are slow
The applications you are coding are often ones that lend themselves to what a browser is good for: Presenting information.
The browser development community has been laser-focused on speed of many common operations. Those browser developers have also been pushed by web developers to expand the visual flexibility of what a browser can render directly. So, from the first, browsers did simple rich text rending, with simple but useful dynamic layout capabilities. Even the really early browsers had basic text editing built-in. (See "Video of Bob Frankston's tour of the WWW in 1994
".) Today's browsers, with CSS3, have amazing capabilities, including animation and transforms accelerated by GPU hardware, and flexible font control. These are things that are really hard to program yourself, especially if you want them to render quickly. Really hard. (I helped lead a company in the 1990's where we had to implement our own complete text layout engine in C++. That is not something to do lightly or in "just a few months".) For many applications, advanced text layout is a requirement, so using a browser component to do that part speeds development and, because development time is a real factor in almost all projects, can result in a better product. How many iOS apps don't use rich text or complex dynamic layouts because it has been so hard to do those things in native code?
So, one argument in favor of web apps is that many of the common, tough-to-program operations are carefully coded by top programmers who are devoting their careers to fine-tuning that operation
. Browsers are constantly being upgraded more and more of this important functionality built-in, including rich-text editing and 3D graphics rendering. If your application's performance is gated by those operations, a web app you could figure out how to write yourself may outperform what you could write yourself in native code.