5

I have just started researching creating mobile apps and from what I understand one big advantage of using HTML5/Javascript is that you can write one application that works with both Android and iOS.

I have also read that one of the drawbacks is that there are certain things that you can't do with HTML5/Javascript that you can with a native mobile app.

Is what I stated above correct? What will I not be able to do if I decide to go the HTML5/Javascript route?

Abe Miessler
  • 82,532
  • 99
  • 305
  • 486
  • 1
    Access hardware - GPS, accelerometer, camera. My advice: stick to native apps. I've been down the HTML5 road - it's painful. – Eamorr Dec 08 '11 at 16:37
  • Possibly better as a community wiki? – Richard J. Ross III Dec 08 '11 at 16:40
  • I second that advice, @Eamorr. Browsers aren't ready yet. And most likely they will become hosts for native code anyway. Native isn't going away soon. Using HTML5 is also very risky as you depend on a poor standard if you do the cutting-edge stuff. – buddhabrot Dec 11 '11 at 11:15

5 Answers5

2

Some things for iOS:

  • Background audio/sound effects
  • Address book
  • Leverage CoreGraphics & OpenGL for advanced drawing
  • Camera access
  • Accelerometer
  • Limited Calendar Access
Richard J. Ross III
  • 55,009
  • 24
  • 135
  • 201
2

While both native and web have their own positives and negatives, the one main advantage that native apps had over web apps was "Offline Access" However that is now changing as HTML5 has support fo Offline Web Applications.

copenndthagen
  • 49,230
  • 102
  • 290
  • 442
  • 2
    I'd like to add that depending on the implementations of those HTML5 features is risky at best. You might end up in serious trouble. Remember WebSockets? – buddhabrot Dec 11 '11 at 11:16
  • Well...one can clearly look at the browser support table before making any such implementations.. – copenndthagen Dec 11 '11 at 13:22
  • 1
    Moble safari 3.0 supported Websockets. Mobile safari 3.1 did not. – buddhabrot Dec 11 '11 at 17:29
  • 1
    Welll, there might be few exceptions probably bcoz some features like Websockets might be very premature....But largely u'll be safe if u check for browser support.. – copenndthagen Dec 12 '11 at 06:47
1

I think we can separate this into two lists...

What can be done on a mobile device that is not possible in HTML5:

  • Push Notifications
  • Advanced Graphics (3d, OpenGL)
  • File Uploads (possible on Android but not iOS)
  • Connect to Address Book
  • Connect to Calendar

What can be done in HTML5 but is easier or implemented better on mobile devices:

(Please note the date this was answered on, this landscape could be quite different in 6-12 months or more.)

Community
  • 1
  • 1
Luke
  • 18,811
  • 16
  • 99
  • 115
1

It all depends on what you are going to do. If your app needs GPS, the accelerometer, or is very graphics intensive, then a native app is the only way to go.

Otherwise, I would go with something like Sencha Touch for your app for a couple reasons. First off, if you release an update with a HTML5 app, you don't need to force everyone to download it, it will update automatically. Also, as you mentioned, you only need to write one application for all mobile platforms, which expands the potential user base. Lastly, I think the internet on phones is getting fast enough to support internet applications very well, and this is only going to improve in the days to come.

Basically, it all depends on the specific needs of the application. Personally, I would go with HTML5 whenever possible, due to the mobility it gives you with platforms.

SuperTron
  • 4,203
  • 6
  • 35
  • 62
0

In theory not much, if you use titanium. http://www.appcelerator.com/products/titanium-mobile-application-development/

    Unlimited Extensibility
    Titanium’s plug-in architecture allows you code modules in Objective-C or Java to
    extend your mobile app with custom native functionality and then call those 
    modules using Javascript in Titanium.

Though i have never used Titanium and dont know how well this works. I would stick with native development anyhow ... for now.

Manuel Schmidt
  • 128
  • 1
  • 9
  • 1
    I've tried it, and my experience was not great, I couldn't get the applications to even run on the simulator. – Richard J. Ross III Dec 09 '11 at 12:35
  • I have colleagues who have used Titanium to build a few apps with no problems. I understand it is much improved since 2011. – Luke Jan 17 '14 at 17:42