The Mobile Dev Rap Battle: Native Code vs. Web Apps

I’ve heard the back-and-forth debate about whether you should write your phone app as a native app or as a web app more times that I care to recall, but it’s never been done as well as Jason Alderman and Matthias Shapiro do it…rap battle style!

Here’s the pre-recorded version:

and in true 8 Mile style, here they are doing it live at the last Ignite Salt Lake:

By the bye, if you’re building stuff for WPF, Silverlight or Windows Phone, you really should be reading Matthias’ blog, Designer Silverlight. I’ve already bookmarked it, and so should you!

And for the truly nerdcore, here are the lyrics:

You bought three coding books for reading on your Kindle,
They never got read, the whole deal is a swindle,
Pony annual fees for app sales, then they tax it,
I’m telling you man, that app store is a racket!
You are MUCH better off with HTML–
The web page markup that I know you know well–
The latest spec lets you store data on phones
Even when offline, but the browser phones home!
Your iPhone, Android, Palm, soon Blackberry:
Local data storage! SQL! it’s no worry!

Cross platform apps are a real seduction
But you give up your form, and most of your function
And your app, it hobbles in the passing lane
Like a one-legged zombie but with far less brains
Running your crap on the web, no performance
Mine is greased lightning, you run like a tortoise
You don’t understand the mental model users are adopting
They don’t want to hit the web, they want one-stop shopping
Here’s how you make an application fun
Turn it on, do your thing, turn it off and you’re done

When the iPhone came out, sure the browser was slow,
But the new smartphones? half a gigahertz or mo’
That’s faster than the box on which your mom does her taxes
Pretty snappy–WinME!–, but now it’s like molasses
In praxis? I already write scripts, it’s easy
Better than compiling native code till my teeth bleed
Time that I saved, I put in media queries,
add UserAgent switch statement, stylesheets fear me!
Custom chrome, each phone? Modus operandi.
Willy Wonka’s schooled by my custom eye candy!

Did that school teach usability cause I think you missed it
With apps for devices the use is holistic
Gotta look act like you belong, not draw their attention
Like a steam punker crashing an Avatar convention
Use is more than just Chrome and colors, look at navigation
Modern users look for standard gestures, menus, animations,
And what about the richness of movement & location
Do you want to surf the web or record your whole vacation?
When I tilt your web app, it’s just stuck in a groove
With my purely native code I can bust a move.

But that’ll only improve–heck, web apps get location
And if the case came where I needed acceleration
I’d wrap my web app in the library Phonegap–

Excuses, excuses, You’re giving mobile a bum rap
Try adding 3D to your list of what apps do
Or write a game that’s not scrabble, chess or sudoku
And you know CSS competes with OpenGL
Like a cub scout against 10 marines with a 50 cal
Boom! 3D mushroom cloud filling the room
Now go back your text adventure version of Doom

Sure games make money, but think of their use,
They’re casual, waiting in line at Jamba Juice,
You’re making the mistake of the hardcore PSP,
When a simple DS meets the goal just as easily
Heavy duty third-dimension graphics drain the life
Of your battery, more than the scripts I’m paid to write.
But, hey, if you want 3-D page flip transitions,
Perspective transforms of element positions,
Web apps can do that, CSS has you covered,
To your Mel Gibson, C-S-S is Danny Glover!
(I’m too old for this!)

CSS animations, are you out of your gourd?
That’s a terrible sin in the eyes of the web lord.
Every time I bring up something hard
You just dance around it, pulling out your library card
Or some spec or framework only halfway done
As if javascript and CSS are rainbows and fun
Look, there’s only one way that this thing can go
Build your web apps for free or jump into the cash flow
Advertising won’t help you survive
But just one little iFart can get you set for life
No app store, no eyeballs, no business plan.
Making just enough dough to pay the rent on your trash can
I hate to play the role of Scrooge McDuck
But without a good market you’re pretty much… well, you know

Trash can? Your app waits in limbo for a month,
You’re stuck eating ramen, watching reruns of Monk.
Your funk? Only lifted if the app store approves it
And we both know the king of the process is ruthless!
The truth is, even if it does get approved
There’s a chance that your make-it-rich dream comes unglued
When a bug in your app that slipped through the process
Makes users hate it, they leave lots of comments,
And you fix it real quick, test patches and submit it
But it still takes a month, so your app gets attritted
From all the top ten lists, losing all worth,
It’s a digital coaster, like "Battlefield Earth"!
My apps sell anywhere, and update on the fly.
You can’t have your cake OR eat it, ’cause the cake is a lie.

Thanks to John Bristowe for finding this!

This article also appears in Canadian Developer Connection.