For mobile developers, whether to build a native or web application is an important decision. The choice must be made wisely as it impacts the user’s entire application experience. Until recently, the decision was usually clear-cut: native apps are faster, better looking, and can use more device features, web apps are simpler and can run on multiple platforms. But web apps are closing the gap in the look and feel, speed, and even access to device hardware features, like GPS data. Even so, there are still some cases when a native app is the way to go.
A native application runs on the operating system for which it was developed. On the iPhone, native applications are written in Objective C and run on iOS, Apple’s mobile operating system. This means that the app, and any updates, must be installed by the user via Apple’s App Store distribution and approval process. Native applications have the advantage of access to hardware features, such as the camera, accelerometer, and compass. In addition, software development kit (SDK) frameworks give developers access to iPhone resources, including contacts, calendar events, and photos. Native applications also allow the developers to design richer user experiences.
The pitfall to native applications is that they are single platform. Such applications are designed with a single platform in mind and are not easily portable to other platforms. It can be nearly as much work to port an iPhone app to run on an Android device as it was to develop the iPhone app.
For a variety of circumstances, developing a native application is the best choice. For instance, if the application is complex in that it contains many screens or steps, such as a game or complex animation, building a native application would be wise. Native apps are also best when lots of data must be stored on the phone or when speed is a priority. Applications which require use of most hardware features, for example knowing how the device is tilted, must use native apps as such information cannot be attained through a web application.
If you considered a web app even 6 months ago, take another look at what can be achieved. New frameworks have made web app an option for apps that would have needed to be native not long ago.
There are new web app features, mostly from HTML5, that aren’t commonly known:
- Web apps can be cached on the iPhone for offline use when a wifi or 3G connection is not available.
- They can also store local data, even a client-side database on the mobile device.
- Hardware access is slowly being opened up. On the iPhone, web apps can get the user’s current location from the GPS.
- Users can install a web app, adding it to their home screen with an icon and splash screens just like a native app.
There is a third option that allows developers to write apps with web technologies but get access to device hardware, device data, and App Store distribution: Hybrid Apps.
Combining web and native applications relieves some of the drawbacks of each type of app. This is done by “wrapping” the web app with a native app to gain access to more native features, such as some hardware features and iPhone resources (GPS position change, accelerometer, camera, audio playback and capture, etc). Like native apps, these applications must be distributed throughthe App Store, making them easier to find and monetize. PhoneGap is the leading framework for hybridization, with wrappers for multiple platforms, so the same core web app can be turned into a native iPhone, Android, BlackBerry, WebOS, or Symbian app.
The strengths and weaknesses of each approach mean each one is the best choice for some applications.
Use of web applications is the simpler option and more advantageous in certain situations. When hardware features are not required, except for, perhaps, a simple GPS, and only small amounts of on-phone data is required, using a web app is best. Similarly, when speed is not crucial, but portability between platforms is, use of web applications is the better choice.
If you want to design a deep, complex user experience, possibly for a game, want to use Apple’s high-level APIs, like developing with C-style languages, or need killer performance, go with a native app. If you want to work with well documented frameworks with lots of example code, for now, native apps are the best option. You’ll have to deal with memory management, pointers, and lots of delegate pattern use, the learning curve can be steep depending on your background.
If you want to share a codebase between devices or really prefer writing web apps but want to use App Store distribution or device hardware that isn’t normally available to web apps, a hybrid app fits your needs. If you’re used to writing web apps and want to put together a pretty standard app that needs to look like native UI, a hybrid app might save you a lot of time over learning Objective C.
This question, asked on stackoverflow.com, is really interesting and covers an important area in cross-platform mobile development: performance optimization
I’m building a multiplatform tablet app wrapping it with Phonegap 1.4 using just its webview, then I work my magic with the Sencha Touch 2 framework. By multiplatform I mean iOS 5.X+ and Android 3.0+ (for now).
This app is working great so far, all its features work on both systems but… On the Android tablet (Samsung GalaxyTab) its really slow. What’s happening? Can I do something about it, or its just android’s limit?
I’ve tested many of my Sencha Touch 2 applications on Samsung GalaxyTab and the performance is really terrible. There’s a fact (which maybe a part of actual reason) that, iOS does many pre-process and calculation before rendering to make it seems smoother to user’s look and feel, while Android tends to render & process simultaneously on the go.
PS: While it’s much relevant to the OS’s limit, you can also optimize your app to make it perform better on Android devices. To my experience, the best practice is:
Do NOT use CSS3 too much.
Keep your DOM as minimal as possible.
For more details, you can refer to this topic on stackoverflow.com:
Author: Thiem Nguyen
Society always thinks IT engineers as “Mr.Know Everything” in Computer usage. But there is a funny fact that I could make sure at 100% that we are who “Googling” the web most, for our daily common tasks: how to implement something, address and fix bugs, or just simply as all the others: how to fix our computer!
Programming is something like playing online games. The more you play, the more experience you will get. Becoming a master in game is just like a guru in programming. Master often helps other, and so do gurus. Experienced programmers always tend to share their knowledge to newbie, even with no rewards (say money, for example) in turn. Stack Overflow is an ideal place to show a statement which is my eternal belief: Programmers are kindest people in the world!
The first time when I posted a question about regular expression, a guru (I guessed so because his reputation score was so scary) answered very nicely, comprehensively, and completely. It’s hard to believe that a strange people gives you a very detailed answer as if he’s your best friend, right? Since then I’ve started falling in love with this site.
After 2 months answering and being answered on this site, I feel like I’m a different person.
Let’s start learn more about it and I’m quite sure you will love it, too!
MongoDB (from “humongous”) is a scalable, high-performance, open source NoSQL database. Written in C++, MongoDB features:
- Document-oriented storage »JSON-style documents with dynamic schemas offer simplicity and power.
- Full Index Support »Index on any attribute, just like you’re used to.
- Replication & High Availability »Mirror across LANs and WANs for scale and peace of mind.
- Auto-Sharding »Scale horizontally without compromising functionality.
- Querying »Rich, document-based queries.
- Fast In-Place Updates »Atomic modifiers for contention-free performance.
- Map/Reduce »Flexible aggregation and data processing.
- GridFS »Store files of any size without complicating your stack.
- Commercial Support »Enterprise class support, training, and consulting available.