Jump to content

HTML, CSS and JavaScript: The other way to develop mobile apps

+ 1
  macslocum's Photo
Posted Jun 01 2010 05:12 AM

Certain companies aren't too keen on cross-platform mobile apps, and that puts developers in a bind. Should they pour time and resources into one form of development? Should they hedge their bets on a single platform?

But there's an alternative. Developers can use three open and easy-to use tools -- HTML, CSS and Javascript -- to create apps that work across devices and platforms. Hedging bets isn't necessary.

In the following Q&A, "Building iPhone Apps with HTML, CSS and Javascript" author Jonathan Stark discusses the basics of HTML/CSS/Javascript app development.


What's the upside to developing apps in HTML, CSS and Javascript?

Jonathan Stark: I'm the first to admit that not every app can be built with HTML, CSS, and Javascript. However, for the typs of apps that can be, it's a great choice. Development is easy and cheap, deployment is almost trivial, and your app will reach the largest possible audience.


How does HTML5 factor in?

Jonathan Stark: I don't think web designers and developers need to get their heads around the entire HTML5 spec in order to get started. I recommend cherry picking the features you need and getting your hands dirty.

The HTML5 features I use most are client-side data storage and the offline application cache. Together, these features allow you to create fairly full-featured mobile apps that can run completely offline without any sort of Internet connection.


Do native app development skills carry over to web apps?

Jonathan Stark: The line between web apps, traditional native apps, and native apps written with HTML, CSS, and Javascript are blurring. I think developers will begin to drop the "native" and "web" qualifiers and just start talking about "mobile apps" because the distinction is becoming irrelevant.

If you are writing native apps with HTML, CSS, and Javascript, then yes, your skills are going to carry over nicely to desktop web design and development. If you're writing native apps with Objective-C, it's theoretically possible that your skills would be useful for building things besides iPhone/iPad/Mac apps, but I don't know anyone who actually does.

The barrier to entry with web apps is pretty low. I get a lot of email from readers of my iPhone book, many of whom are completely new to mobile development. In spite of this, many have hacked together apps that are fun or useful.

I'm a firm believer in the democratization of the tools of creation. The more people building apps, the better. To me, app development is like making music -- it's a creative endeavor that everyone should be able to try if they want to. Imagine what music would be like if everyone had to pass some test or pay someone for permission to play guitar. Would we have the Beatles? Hendrix? Lady Gaga? (Just kidding.)



Some people claim native apps "feel" different than web apps. Is that the case?

Jonathan Stark: If you're talking specifically about iPhone, an app written with Objective-C will run a little bit smoother and faster than that same app written with HTML. I do think that the gap is going to decrease as the iPhone hardware gets better and HTML authoring tools and libraries get better.

I sometimes hear people -- usually pundits, not developers -- dismissing HTML apps for reasons that seem minor to me. "Scroll friction," for example. If HTML apps were crash-prone or sluggish, I'd be dismissing HTML right along with them. But that is not the case. We're talking about cosmetics here, not usability. It seems bizarre to me that someone would lock themselves into a single platform for something so inconsequential.

The bottom line for me is that if an app actually does something useful, I doubt users are going to care about minor cosmetic differences.


Will a web app marketplace open up?

Jonathan Stark: If you write native apps with HTML, CSS, and Javascript, then you can submit them to the various platform-specific app stores (e.g. iTunes, Android Market, etc.).

If you're talking about developers skipping the platform-specific app stores and distributing their apps online via URL, there are two issues commonly raised: discoverability and payment.

I think discoverability is a red herring. We're at something like 200,000 apps in iTunes. If you want your app to sell, you're going to have to market it whether it's in the App Store or not.

Regarding payment, e-commerce has been around for more than a decade. Nothing is preventing web developers from rolling their own payment systems, or integrating an existing third-party system like Chargify, Spreedly, or CheddarGetter. Sure it's more work, but you don't have to give up 30 percent of your profits, either.


Do web apps allow for cross-platform development that doesn't run afoul of Apple's licensing agreement?

Jonathan Stark: According to Apple, native apps written with Javascript executed from within a UIWebView is allowed. Of course, they could change their minds at any time and for any reason -- content, code, tools, or who knows what else. The upside of using web technology is that if you do end up getting rejected, you can still release your app online. If you write with Objective-C and get rejected, you have nothing.

This interview was condensed and edited.

Building iPhone Apps with HTML, CSS, and Javascript

Learn more about this topic from Building iPhone Apps with HTML, CSS, and Javascript.

It's a fact: if you know HTML, CSS, and Javascript, you already have what you need to develop your own iPhone apps. With Building iPhone Apps w/ HTML, CSS, and Javascript, you'll learn how to use these open source web technologies to design and build apps for both the iPhone and iPod Touch, on the platform of your choice. Device-agnostic apps are the wave of the future, especially for mobile devices, and this book shows you how to create, test, and convert one product that can be used on several platforms.

See what you'll learn


Tags:
0 Subscribe


1 Reply

 : Jun 02 2010 05:58 PM
As others have probably searched as I had for a way to develop for a mobile device *on* a mobile device, I found "gusto" in the App store for the iPad. It is a fairly simple app with an attractive interface to manage project files and edit them right on the device (a Bluetooth keyboard or the Keyboard Dock really helps here). The project files can be FTP'd back and forth to a server, although this is the one feature I haven't been able to get working. The killer feature of this app is a the local preview button, accessible right from the editor. This is the closest thing I've seen to an IDE on a mobile device. As it uses the iPad's browser core to display the local files, you get all the features of Mobile Webkit instantly. I'm more of a systems level programmer, so having an interactive platform to learn the ins and outs of HTML5 and Javascript is allowing me to come up to speed quite fast. Not unlike AppleSoft on an Apple II - if any of you remember that. However, debugging is one of the difficult problems to overcome.

So having Jonathan's book in one hand and the iPad+gusto in the other makes for a fast way to learn and prototype web based apps.

Dave...