Article

HTML5 or Native

It’s a fact that mobile applications these days demand support for multiple platforms. The current iOS as well as Android deliver a really solid user experience, each with it’s own advantages as well as shortcomings. Hence their userbases are quite equally distributed.

Now in essence there are only two possible ways to support both platforms. Either write two separate applications using (mostly) Java for Android and Cocoa/Objective-C for iOS or use HTML5 to share a large part of your codebase for both platforms. Mark Zuckerberg just declared the latter approach dead and claims that Facebook wasted two years trying to go the HTML5 route. On the other hand Linkedin is really happy with their gourgeous HTML5 apps and only needs 5% of native code to fulfill the needs of their userbase.

I for one, really think that Facebooks move to go all native is just plain wrong. First of all it speaks volumes, that Facebook only managed to finish a native iOS version up until now. The native Android version is still in development with no fixed release date available. Second, and more important, going all native looks, smells and tastes like premature optimization in my book. I can think of no valid argument against rapid development of plain HTML Applications, identifying the performance critical parts and only implementing those using native code. Chances are, you only need to optimize a tiny fraction of your code.

On the other hand I can think of plenty of arguments to use HTML for your applications:

  • code-reuse across platforms as well as your web app
  • Less iOS / Android knowledge needed on your development team
  • Surprisingly well standardized development environment (in essence webkit mobile)
  • stick with your existing web app workflows and toolchains

And last but not least there are tons of ressources available these days to build native HTML Apps. Some keywords for your next google search:

  • jQuery Mobile
  • Sencha Touch
  • Apache Cordova
  • Phonegap
  • Zend Studios new UI Based App Generator

Just saying

Let users experience, discover and conquer your application. Don’t try to force your way on them. Watch and learn.


Zerg Rush

Google revives old Starcraft memories HERE


Mailchimp API listSubscribe / listBatchSubscribe and Groups

Commonly, larger mailchimp lists are segmented by interest groups to allow specific targeting without handling subscriber data on different lists.

Now if you want to import large amounts of already subscribed users, using the mailchimp api is the best solution. Scanning the mailchimp api docs of the listBatchSubscribe action I was not able to find any documentation on how to import subscribers to specific interest groups – should have read the listSubscribe docs too ;-) . It turned out it is really simple. Just add an array of group information to your data rows using the key ‘GROUPINGS’ and you are good to go. Group information must contain the key ‘groups’ – a comma separated list of interests and either the group id or the name of the group you want to add your data to. ID, name and values of groups can also be listed using the listInterestGroupings method.

A simple example:

$batch = array(
   array(
      'EMAIL' => 'test@yourdomain.com',
      'FNAME' => 'Test',
      'LNAME' => 'Test',
      'GROUPINGS' => array(
          array('name' => 'MyGroup', 'groups' => 'Value1, Value3'),
          array('id' => 15, 'groups' => 'Value2'),
      )
);
$chimp->listBatchSubscribe($list_id, $batch, true, true, true);


jQuery plugin: stop cluttering your animation queue with hoverFlow

A typical Problem with jQuery hover animations is, that they build up the animation queue if the mouse is moved before the animation finished. There are quite a few solutions.

First you can use the excellent hoverIntent plugin and set it’s threshold to be above or equal to the animations duration. Another solution is to use jQuery’s stop() function and reset the elements style. Both of these tend to result in rather unnatural behaviors.

A nicer way to reset animations is implemented in the hoverFlow Plugin, that smoothly resets your animations and prevents the buildup of the animation queue. Thanks to Jürgen Genser for sharing it with me.

Implementing it is really straighforward – you simply replace jQuery’s animate() with hoverFlow(). See a quick example below:


Subversion Commandline – Recursively add new Files

a nice workaround for svn’s missing -R option to svn add

svn st | grep -e '?' | sed 's/^?[\t]*//;' | xargs svn add