theThought's thoughts

Kevin A Gray - Creative Strategy Guy

@Media WebDirections Conference : Day 1 - Sessions 3 and 4

The morning of Day 1 finished with a second presentation on JavaScript, however this one focused on the use of JavaScript on the server.  Having not learnt from my experience in the morning I thought I would attend to learn more about this concept that I had heard of but never practiced.

Tom Hughes-Croucher

This presentation had a promising start.  He was bright, breezy, humorous and excitable always a good combination in my opinion. Alas the presentation, for me, went steadily downhill.  It became more and more complex,  Tom lost his witt as he became more embroiled in the technicalities and I became steadily more and more detached from the proceedings.  I am not saying it was a bad presentation because it was not it was just not a presentation for me (I had had a shower that morning and I had not yet achieved a level of geekiness that allowed my subconscious receptors to translate what was being said).

Here is the gist of the presentation:

The big advantage Server Side JavaScript (SSJS) has over Perl, Ruby etc is that people are already familiar with the syntax and are used to writing in it.  A quick straw poll of the attendees demonstrated this when everyone said they had written JavaScript routines but only a few had experience of PHP, Perl or Ruby (no one asked about .net).  Effectively JavaScript IS the language of the web.

In addition libraries are increasingly being made available that simplify complex tasks such as jQuery, Mootools and YUI.

But SSJS has been around for quite some time so why is now the right time to push it as a viable solution.

Professionalism.  JavaScript coders are no longer seen as 2nd class citizens they are a respected part of the development community

Runtimes.  There are a number of these available, they have been placed inside browsers for a start.  They include V8, SpiderMonkey and Rhino.

Speed Placing these runtimes in browsers has resulted in a drive for fast execution. V8 (part of Chrome) is very fast.  This is because leading browser manufacturers, like Google, are trying to make speed of execution a unique selling point.

Runtimes are not Browsers, there is no Document Object Model (DOM), there is no accessibility to specialised APIs.  It is only the pure JavaScript implementation.

  • Rhino is equivalent to JavaScript v1.7
  • SpiderMonkey is equivalent to JavaScript 1.8
  • V8 is equivalent to ECMAScript 3

Brendan Eich talked about Harmony which is currently in development this will be equivalent to ECMAScript 5.

This latter statement put into context much of the presentation given by Brendan in the fact that those new facilities being placed inside Harmony but not yet available in browsers (via their JavaScript runtimes) would be available on the server as part of a SSJS implementation based on Harmony.

Here is where Tom became quite animated.  The speed and capability improvements discussed by Brendan and shown in the new runtimes means that Server Side JavaScript has real potential to deliver power and performance without the issues encountered by client side JavaScript.  When combined with libraries such as Note.js it becomes a great way to deliver browser agnostic web pages with powerful capabilities.

Unfortunately Tom’s increased animation was demonstrated by an increasing willingness to go into code level detail most of which went over my head.  It was clear that you need a linux server (no Microsoft Servers here today) and that you need a deeply technical mind to handle all the potential.  I have neither of those at my disposal so it was an interesting presentation that will result in little to no difference in the way I work.

Jonathan Stark

Jonathan’s presentation was the complete opposite.  I saw elements in this presentation that made me bubble with excitement and tremble with unequivable potential.  Jonathan is a specialist in Mobile Application development he has previously focused on iPhone development but it increasingly moving cross platform.  He is currently writing a book on Android and is hoping to look at other platforms like BlackBerry in the near future.  He started his presentation with three clear statistics

  • 4.6 Billion cellphones are identified as currently active today
  • 15% of these are smartphones
  • 56% of public wi-fi connections were made by smartphones

This, Jonathan says, means that the smartphone is here and it is a dominant methodology for viewing the Internet.  These smartphones are able to be extended through custom applications that fall into the following categories:

  • Native – Written for the specific device using languages like Java and Objective C
  • Web – Browser based applications
  • Command Line – often SMS based connectivity

Each of these types has its own challenges.  Native development is very fragmented with no one technology/language capable of developing a solution for all devices.  Web apps may be more consistent across devices but they are run in sandboxes and can not use many of the rich capabilities of the device such as camera, accelerator, compass.  Lastly command line apps suffer from discoverability issues.  How do you let people know about your service.

Although the above is the standard statement made for mobile development it does not give the entire picture.

Web development is done through standard web technologies such as HTML, CSS, JavaScript.  Apps using this technology are the cheapest to build, the technologies used are the most standardized and the solutions are the easiest and most cost effective to distribute.  If Web Apps could use the advanced technologies on the device, if they could provide a smoother user experience more in line with Native Applications they would probably be the best way to write an application.

jQuery

An extension of the jQuery initiative has been constructed by David Laneda.  It is called jQuery Touch.  Its purpose is to provide a more app orientated experience for a web based application.  It can be added to any webpage and then used to introduce smartphone like interfaces that would usually take a long time to build and test.  This includes the types of menu systems, buttons and transitions you would expect to see on a smartphone like the iPhone.  Add to this the HTML 5 capability to cache web assets on the device so that they can be used offline and you have a web application that looks like a native one it just lacks a few features

PhoneGap

The developers at PhoneGap do not really want this technology to exist.  They have built it because of the fragmentation of native app development.  Their aim is to give developers a path to cross device development.  PhoneGap gives a developer the ability to convert a web app into a native app.  It works for:

  • iPhone
  • Android
  • Symbian
  • BlackBerry

During this conversion the developer is given access to device capabilities such as the phone and vibration through relatively easy mechanisms to implement.  PhoneGap is only available on a Mac platform as the submission procedure for Apple is unchanged.  It is written so that the developer ends up creating an Objective C solution that can then be submitted.  It contains templates for each device delivery mechanism so that conversion/compiling process has to be done separately for each device type but this is still greatly reduced compared to the alternative process.

At the end of the presentation the inevitable question was asked regarding section 3.3.1 of the Apple terms and conditions.  Jonathan stated that Apple have indicated that, at present, PhoneGap is not affected by this changes made to this section.  There is no guarantee, however, that it will remain that way.

The presentation was good, there were clear examples of how to do the work, Jonathan built them on the fly showing the simplicity of the basic process.  The results looked good and apart from the seemingly difficult installation process for PhoneGap, nothing seemed particularly arduous – especially compared to learning Objective C and Java.

The Missing Session

There was a fifth session to the day called Hot Topics.  I believe it was supposed to be an open forum.  As much as I would have liked to have attended this I was unable to.

Filed under  //   #WDX   @Media   Android   Blackberry   JavaScript   ObjectiveC   PhoneGap   SSJS   Symbian   WebDirections   conference   iPhone   jQuery  

"one for all" is definitely possible - the Browsers

A couple of weeks ago I wrote an article questioning whether it would be possible to create a single template that handles the vast majority of browsers and allows Data Collection to deliver the best experience each browser can deliver (read Is “one for all” even possible).

I am pleased to announce, after a number of weeks of hard work that the answer is “YES”.

So what has happened over the last few weeks that allowed me to come to this answer?

The steps so far
I have not yet reached the end of my journey, however, I thought it might be a good idea to allow you to catch up.  I have started/completed a number of tasks including:

  • A review of different browsers on the market (or previously on the market) identifying the capabilities they provide
  • Locate and install a number of browsers and emulators into a Test environment
  • Build a small Data collection survey to allow testing
  • Start building a solution

Browsers

I started with the currently installable browsers (Internet Explorer, Firefox, Opera, Safari, Chrome)  Then I tried older versions of IE.  Lastly I obtained some emulators (Blackberry, Sony Ericsson, Nokia), finally I installed a copy of aDesigner for testing JAWS screen reader compatibility.

aDesigner an aSide
If you have not encountered aDesigner before and you are seriously interested in web accessibility you need to look at it now (aDesigner is available here).  aDesigner was built by IBM but it has been donated to the Accessibility Tools Framework (ACTF).  Not only does aDesigner provide clear information about the general level of accessibility of a website (based on its markup) it will also render the website from the perspective of “low vision“ showing how those with poor eyesight will see the site.  Furthermore, if that was not enough, in addition to testing websites it can also test ODF (Open Document Format) files, Flash content and general GUI accessibility of any application.

Image001

3 Classifications of Browsers
Having reviewed a multitude of browser capabilities I ended up with three simple classficiations.  These are based on the capabilities of the browser and will affect the way in which the template will be designed.  The basis of the categorisation is the fact that there are, currently, primarily, two platforms that have to be handled:

  • Desktop Browsers (PC, Mac and others)
  • Mobile Browsers (smartphone, basic phone, portable devices)

Against these two basic platforms there are a number of capabilities that may or may not be used:

  • HTML
  • CSS
  • HTML 5
  • CSS 3
  • JavaScript

All of the browsers support HTML although some only have limited support of CSS.  Only a few have support for HTML 5 and CSS 3 (as I wrote this Microsoft announced that this list will expand to include IE 9 – review by the Register.com).  Lastly there is JavaScript.  This is more complex as browsers that naturally support JavaScript can be “crippled” by corporations that disable its use.  The following graphic shows how these different elements interplay with each other.

Image002
 

From this I defined three classifications of Browser as follows:

Basic Browsers           OpenWare browser, Basic (old) Mobile browsers, very early versions of IE and Netscape (Full HTML coverage, limited CSS coverage, little or no JavaScript coverage)

Simple Browsers         IE, Netscape, RIM, Nokia browser (Full HTML/CSS coverage, no HTML 5/CSS 3 coverage, some JavaScript Coverage)

Rich Browsers            Chrome, Firefox, Safari, Sony Ericsson (Full HTML/CSS and HTML 5/CSS 3 coverage, Full JavaScript Coverage)

Filed under  //   ACTF   Blackberry   Browsers   CSS   CSS 3   Chrome   Emulators   Firefox   Flash   Form Field   HTML   HTML 5   IBM   IBM SPSS Data Collection   JAWS   JavaScript   Netscape   Safari   Simulators   aDesigner