Tuesday, February 1, 2011

Javascript frameworks explosion

I can't believe how many and how fast JS frameworks are appearing. At the beginning of December I was aware of JQuery, Scriptaculous/Prototype, Dojo, Ext and YUI for mainstream web devel. JQTouch looked the go for iPhone. Sproutcore and Cappucino looked a bit esoteric and seemed to be aimed at full-blown applications in a browser window.

I became aware of the Unify framework in November and was intending to look at it closely during my extended leave over Dec. and Jan. I was also interested in uki.js as an alternative to JQuery.

But it seemed that almost every week in that period I found yet another framework being touted as the best thing since sliced bread.

First I found Coffeescript which is actually an alternative, simplified syntax for Javascript together with a compiler which outputs pure JS. Makes JS really easy to write.

Then as a result of a question on Posterous a whole swag of alternatives were mentioned:
  • Backbone.js (which in turn uses underscore.js) + jQuery or zepto
  • JavaScriptMVC
  • Knockout.js
  • Angular.js
Each of these warrants a decent looksee. Knockout seems to have a lot of fans. Angular seems incredibly simple to me.

Of course there's a few mobile frameworks that need consideration:
  • SenchaTouch (JQTouch rebadged)
  • JQueryMobile
  • Zepto.js
  • xui.js
  • ChocolateChip Mobile
I also saw mention of DHTMLX but have no comment at this stage.

So there appears to be a spectrum of frameworks. At one end are the "app in a web page" frameworks like SproutCore and Cappucino which seem to require large downloads at commencement but then respond almost exactly like a stand-alone app. (A big footprint is not automatically required. uki.js's Mail and Wave demos are very small packages.) In the middle are "a few pages" apps which seems to be the place for Backbone, Knockout and Angular. And then there is the minimalist and/or mobile device end where the framework simply ignores all the baggage web apps have to carry such as IE6 compatibility and takes full advantage of the mobile device browser's handling of HTML5 and CSS3.

The mobile device end of the spectrum is where to aim I think. Eventually all browsers will support HTML5 correctly (maybe even MS will get it right; maybe...). In the meantime there is a huge and ready market for mobile device web apps.

But how does one keep up with this deluge of frameworks? How does one decide which, if any, are a) good quality; b) easy to use; and c) will be around long enough to get some ROI for the effort expended in learning to use the framework? In my years as a developer I've seen so many IT technologies come and go and, perhaps most annoyingly, the best technically is rarely the winner.

RedEye special

I tried everything I knew to get the RedEye mini to work on my iPhone 3GS but it simply wouldn't. Eventually complained to RedEye and they asked if I could try it on another iPhone. My son's 3GS worked perfectly. Seems I have a faulty mike connection in the headphone socket. Too late to get a warranty repair dammit. Never noticed the problem because I was always using the Bluetooth headphones and mike.

Oh well, maybe my son will find the REmini useful...

Saturday, January 15, 2011

Another IR dongle for iPhone

Found the RedEye Mini dongle for iPhone. Advertised at US$49 on their website. Tried to buy it but they don't ship to Oz. Seems they've given distributor rights to some tin-pot company in Oz and they want AUD$95!!, with the exchange rate almost at parity.

So I checked Amazon and found one shop selling it for US$38 but they wanted $35 for postage! Eventually found Amazon's offer which was the same price but only $9 for postage. So it looks like I will get the dongle for the equivalent of US$49 and the Oz sellers can go complain to the govt. about how they are losing sales to the Internet because no GST makes them cheaper (yeah, almost 100% cheaper).

Not sure if this dongle will be as open to program as the L5 but they might make an exception for the VTV. The use of the audio socket...

Oh blast, the use of the audio socket means it will probably disable the microphones in the iPhone. Screwed whichever way I turn: use L5 and lose charging port or use RedEye and lose voice input. Well at least the RedEye will make a good manual TV controller.

VTV

I might have the order of the apps around the wrong way here. Maybe I ought to be hacking the OpenEars sample so that, in addition to displaying the words it recognises, it also outputs the corresponding IR codes to the IR dongle. That's actually a lot easier to implement (I think). No need to install the IR code learning section nor the GUI section.

So devel steps:
  1. Test VTV app with VTV vocab (clone OE sample app). (Especially test headset input.)
  2. Use the L5 app to learn the hex codes for DTV controller and upload them to L5 hexcodes database.
  3. Install the hex codes in VTV app.
  4. Add a "dumb" controller which toggles "on" and "off" when each time voice input is detected. Can test this with my DTV tuner controller (or maybe even Apple FrontRow controller?).
  5. Add IR output for all the vocab.

VoiceTV

A little bit later...

Have finally got around to working a bit on project. Have downloaded, compiled and run the L5 sample app on both the emulator and my iPhone. Have downloaded, compiled and run OpenEars library and sample app on both the emulator and my iPhone. OpenEars is an XCode wrapper around CMU Sphinx.

It looks like the restricted vocab for the controller will allow Sphinx to be recognise words pretty accurately. However I still need to generate and test a "TV controller" word list to replace the sample app's "mobile toy controller" list.

The L5 now uses the Phillips Pronto hex code format ("We are using a modified subset of the Pronto IR Format (http://www.remotecentral.com/features/irdisp1.htm).") This would be fine except the RemoteCentral library is seriously out of date wrt. Sharp Aquos TVs. It looks like I will have to manually load the codes from a controller .

So all I have to do now is find a way to fool the L5 sample app into thinking it's getting its input from its buttons when in fact it's really getting it's input from OpenEars recognised words.