TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why native development sucks and HTML5 rocks: Porting to Windows 8

42 pointsby gdamjanalmost 13 years ago

9 comments

chimealmost 13 years ago
I've done non-trivial projects in both HTML5 (with/without PhoneGap, with/without jQuery Mobile), Native (ObjC, WinMobile), and hybrid mix of HTML5/Native (views in HTML, model/controller in Native). I've heard all the pros and cons of both sides but most of them are either non-issues or wrong.<p>ARGUMENT: Native is ALWAYS faster than HTML5<p>MY EXPERIENCE: So what? Speed depends on what you're trying to do and how. Animating a loading icon for UITableView will not spin any faster than a loading.gif in HTML5 view. Similarly, being able to slide an entire UIView to the side at 120fps doesn't mean using CSS webkit-transform: translate3d(x,y,z) at 60fps looks any worse to the user. Speed matters when you're (a) crunching data and (b) updating graphics. If you're building HTML5 apps that need some serious data crunching, you can do that part in C and call from your code via a plugin. And unless you're making 2.5D-3D games, you don't HAVE to go native. And then you're most likely coding in C/Lua anyway. For most of the apps out there, raw processor speed isn't a necessity - responsive UI is.<p>ARGUMENT: HTML5 is ALWAYS easier/faster to code than Native<p>MY EXPERIENCE: Sometimes yes, sometimes no. It depends on your experience with all the available technologies. I can code views in HTML5 using CoffeeScript/Less/Bootstrap/Backbone relatively fast. I can code models/controllers in ObjC relatively fast. Views in ObjC get complicated and models/controllers in CoffeeScript/JS get complicated. If you have a UI-heavy app and you can code UI fast, go with HTML5. If you feel comfortable validating user data input in ObjC and have tons of forms, go with ObjC. There is no silver bullet.<p>ARGUMENT: HTML5 apps ALWAYS look bad/uncanny vs. Native ALWAYS looks boring<p>MY EXPERIENCE: Poorly designed apps look bad/uncanny/boring. I have to admit that using jQuery Mobile and similar libraries without doing any customization/tweaking pushes your HTML5 app into the uncanny valley. And unless you skin the Native UI, your app will look no different than the phone's native contacts list. My preference is to (a) Not use libraries that make fake native-looking-UI when doing HTML5 (b) Adding graphics/skin to native UI to make it standout from boring address-book UITableView lists. Ugly/boring apps are a graphic design problem, not a side-effect of platform choice.<p>ARGUMENT: HTML5 is ALWAYS easy to port, Native is not<p>MY EXPERIENCE: Far from the truth. When porting, you're not just porting to a different software subsystem but also different hardware parameters. Even the best designed HTML5 apps can't suddenly go from Android phones to iPad or iPhones to Nexus 7. Moreover, if you code the core functionality of your Native apps in C, it makes it quite portable. If you make your HTML5 views fluid/responsive, it makes it quite portable. If you're relying on special hardware functionality (camera, GPS etc.), it's a case-by-case issue of what's portable and what's not. If you have a data logging CRUD app that accepts user input on HTML5 views, posts to a remote server, and displays results, you might get away with 1-hour port like the author of this article. But more often than not, you have more issues to consider. In-App purchase? Yeah, can't port that easily. Facebook-integration? Can't port that easily unless you're using portable libraries.<p>Software development is just as complex on mobile devices as it is on servers. Your choice of platform (HTML5 vs Native) really depends on your specific app's requirements. There is no way you can make WordLens in HTML5 (today) and there is nothing wrong with going HTML5 if it saves you time and resources in the short and long-term. People need to realize that there are no absolute GOODs or BADs in software development. Pick the best option after you weigh in the cost of design &#38; architecture, development, legacy support, resources, training, deployment, and maintenance.
评论 #4367350 未加载
评论 #4367949 未加载
评论 #4369480 未加载
jefflinwoodalmost 13 years ago
The problem with HTML5 as an app interface isn't getting something to appear on the screen on any of the browsers, it's getting the user experience to match the native platform.<p>A similar post in 1999 would have been titled: "Why native development sucks and Java Swing rocks: Porting to Mac OS 9"
评论 #4366908 未加载
评论 #4367445 未加载
jawngeealmost 13 years ago
I like this title better: <i>Why Our Application Was An Excellent Use Case For Developing In HTML 5, YMMV</i>
评论 #4367210 未加载
lubosalmost 13 years ago
HTML5/Javascript/CSS is native to Windows Metro (as is C++ and .NET)... so I don't know what is this headline about
评论 #4367343 未加载
kodablahalmost 13 years ago
"And with efforts such as AppJS, the number of OSes that support mixed HTML5-native development keeps growing."<p>I must toss <a href="https://github.com/rogerwang/node-webkit/" rel="nofollow">https://github.com/rogerwang/node-webkit/</a> into the mix. I have found it incredibly easy to develop with...and even easier to distribute.
Metrop0218almost 13 years ago
Good to hear that it was easy to do. What this article describes is the vast majority of why Microsoft made HTML5/JS/CSS a development path in Windows 8.
ta12121almost 13 years ago
<a href="http://catb.org/jargon/html/W/wheel-of-reincarnation.html" rel="nofollow">http://catb.org/jargon/html/W/wheel-of-reincarnation.html</a>
strandevalmost 13 years ago
HTML/JS is a native platform for Windows 8 isn't it? This is akin to porting to IE10.
WayneDBalmost 13 years ago
This article failed to debunk any of the claims that it set out to.