Live data from Hacker News

Poll: HTML 5 or Native mobile development ?

news.ycombinator.com

41–50 of 106 posts

Re: Poll: HTML 5 or Native mobile development ?

#41
I tried to make a simple calendar with swipe gestures with PhoneGap and Sencha. The performance was horrible on my iPhone 5 (!). Wouldn't use HTML5 again, except maybe as a wrapper for some static HTML5 content without much user interaction (exactly the kind of app that Apple doesn't like btw)

However, here's an idea: I recently bought the Impact.js game engine. It comes with Ejecta, which is a hardware-accelerated "browser" for iOS that supports only the canvas-element. If you can manage to implement your HTML5-app in canvas only, this might be an alternative for apps that feel almost native. However, it might be too troublesome to go down that path.

Re: Poll: HTML 5 or Native mobile development ?

#42
post #33

Html5, because easier to prototype and iterate. Clearly native once you have the right idea and funding for it.

How it is easier? At least on iOS you can prototype extremely quickly and almost without writing any code: drop your views on controllers, wire them up and there you have it.

An HTML5 app is a lot easier to make cross-platform than writing separate native apps for each platform. It depends on the type of app though; running inside a browser is definitely a step away from native APIs, even when you have pass-through access to them.

Re: Poll: HTML 5 or Native mobile development ?

#43
I think it is a question of complexity, for simple Apps HTML5 is definitely the way to go, easy to iterate, more freedom and prospect of being around (no chance of being pushed out of business for some vague policy issue -- App Store rejection or pull off -- or no risk of being forced to pay portions of subscriptions to a 3rd party). With that being said, HTML5 still can't compete with native Apps when it come to performance and stability.

tl;dr: Is your project process or data intensive ? native : html5.

Edit: Rephrasing.

Re: Poll: HTML 5 or Native mobile development ?

#44
I'm mid-way through developing a Phonegap/Cordova app that's a fairly basic turn-based game that uses the Canvas to render the game board. So far I haven't found any limitations with the needs of this app imposed by going with the wrapper. Certainly it's not the right solution for every type of app, but in the right circumstances I'm convinced this is a perfectly acceptable approach.

Re: Poll: HTML 5 or Native mobile development ?

#45
Many there comment that developing with HTML is faster. This is true only and only when you are not familiar with the native language and frameworks. Really, native SDKs have solved pretty much all the common problems. With native you implement the functionality of your app, and don't have to invent views management, list views, notifications, events management, gesture recognisers, etc.

There was a post (by sencha, iirc) where they brag how they managed to make html version of FB faster. I was reading and shaking my head: you get all that ingenuity out of the box with native. Two lines of code: register the class/nib for reuse and dequeue cell when needed. Hook in NSFetchedResultsController and there you have it: extremely fast and memory efficient solution. Good luck replicating capabilities of autolayout with flexbox (with rotation support). Good luck replicating capabilities of Core Animation with CSS/JS animations. How about localisation? How about accessibility? How about getting anything like Core Data?

Meanwhile in HTML5 land the debate goes on what is the best way to deliver responsive images.

Where does this notion, that mobile apps should be developed with web technology comes from? I don't see similar push for desktop apps. Is this all just because of all the web devs seeing the increasing usage of smartphones and proclaiming that html is the better way, because they are too lazy even to investigate what native really offers?

I know both stacks extremely well and the answer is very clear to me.

Re: Poll: HTML 5 or Native mobile development ?

#46
post #38
post #13

I've created native iOS apps, native Android apps, HTML5 apps and I've used wrappers (Titanium Mobile and PhoneGap) over the last few years and these are my findings: - Native apps take a lot of time to build, especially when you are a web-developer without in-depth knowledge of the extensive frameworks available to the native platforms. - Wrappers work, but are not nearly as great and snappy as native apps; They mig…

> HTML5 only apps are not available in the market/store where exactly does the cut off line exist? native/html5 is kinda gray.

Native/html5 sounds like a wrapper job.

Re: Poll: HTML 5 or Native mobile development ?

#47
post #13

I've created native iOS apps, native Android apps, HTML5 apps and I've used wrappers (Titanium Mobile and PhoneGap) over the last few years and these are my findings: - Native apps take a lot of time to build, especially when you are a web-developer without in-depth knowledge of the extensive frameworks available to the native platforms. - Wrappers work, but are not nearly as great and snappy as native apps; They mig…

Native apps take a lot of time to build, especially when you are a web-developer

True, just as writing in any language you're not familiar with will take longer.

For even a semi-experienced iOS/Android developer, it can be faster than writing an HTML/web app.

Re: Poll: HTML 5 or Native mobile development ?

#48

Earlier quoted context omitted.

How it is easier? At least on iOS you can prototype extremely quickly and almost without writing any code: drop your views on controllers, wire them up and there you have it.

An HTML5 app is a lot easier to make cross-platform than writing separate native apps for each platform. It depends on the type of app though; running inside a browser is definitely a step away from native APIs, even when you have pass-through access to them.

Wait, we were talking about prototyping an reiterating, not cross platform development. And even for cross-platform I wouldn't be so sure about "a lot". You may get initial version faster, but all the tweaks and ironing of the cross-platform kinks can eat a lot of time and make a lot of hairs grey.

Re: Poll: HTML 5 or Native mobile development ?

#49
tl;dr: If you can, go native all the way, but if it makes a lot of sense from biz perspective to support platforms other than iOS, HTML5 is not as bad as it seems.

I recently made an app for http://productivemag.com (for iOS and soon Android) using web tech, but I also have experience in native iOS/OSX dev. I use Cordova as a wrapper around HTML5.

My conclusions:

- HTML5 is great for custom UI and prototyping. You can do that right in your browser, no compilation needed. And Web Inspector is _awesome_. Experimenting with UI in ObjC (or Photoshop, IMO) is PITA, but Web Inspector makes it super nice and easy.

- Native is great for using native UI. I had to recreate not just the appearance, but the behavior of a lot of elements. It takes a lot of time to get right.

- I don't know about Java and Android, but ObjC is a poor language. I used CoffeeScript for the project and it was a far superior experience.

- Debugging JavaScript on Android sucks

- Debugging JS on iOS is pretty good, but it's still more painful than using Xcode's debugger. OTOH, JS is harder to _really_ break. If there's an error, _something_ won't work, but the app won't crash. Not always true with ObjC.

- interfacing with native capabilities is hard. iOS's WebView doesn't expose direct access to the JavaScript VM, so the bridge between two worlds is based on callbacks. Async is much uglier and more error-prone.

- Cordova sucks balls

- you can get pretty damn close with how fast and smooth the app works with CSS&JS, but you can never quite get there. Lots of little bugs and quirks, which are hard to fix.

- it sucks not to have control over how things are rendered. You can make wonders with `-webkit-transform: translate3d(0,0,0);`, but it's not perfect.

Re: Poll: HTML 5 or Native mobile development ?

#50
Native, using Xamarin. Native apps still give users the most optimal UI. Using Xamarin work can be reduced, because a big part of the code can be shared between platforms. Code for all platforms is written in C#. Xamarin still gives developers the option to wrap libraries written in e.g. Java or Objective-C for use in the apps.
Post reply on HN