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  

@Media WebDirections Conference: Day 1 - Sessions 1 and 2

Following the main keynote the attendees found themselves with four sessions.  Within each session attendees were able to select from two presentations.  One presentation had a distinctively development slant while the other had a more designer slant.  Attendees were free to choose which presentation they wanted to attend.  I ended up seeing a mixture of designer and development presentations.

So what did I see?

  • Christian Crumlish – Designing for Play
  • John Resig – Testing Mobile Web Apps
  • Tom Hughes-Croucher – Introduction to server-side JavaScript
  • Jonathan Stark – Building mobile apps

And what did I not see?

  • Doug Schepers – SVG today and tomorrow
  • Rachel Andrew – Core CSS3
  • Simon Willison – Building Crowdsourcing applications
  • Mark Boulton – Designing Grid Systems

Christian Crumlish

Christian’s talk surrounded how play is important to human beings and how play concepts can be incorporated into design and development.  That the social patterns defined by play are important because they have been defined by our end users.  He indicated that there are basically four types of play:

  • Play Acting
  • Game Play
  • Musical Play
  • Mechanical Play

Play acting is often about giving signs of life, people like play acting because they can engage with others.  They find out who else is out there.  They can take an identity, that does not necessarily match their own, use a mask to hide their true self.  They can introduce an element of make believe where not everything is true.  This is the process of re-imagining and allows them to break many of their personal inhibitions.  Software can reflect this through the use of profiles, avatars, usernames.  They can use buddy lists to show who is available.

Game Play

Games often start with an invitations – “Do you want to play?”, they require explanation the first time – how do I move forward.  What makes games work? Mostly rules and Goals/Achievements.  Some goals are about competition.  Who gets there first wins.  When you get there can you stay there.  Other goals (although more rarely) are about co-operationg.  Epidemic, for example, is a game where either all the players win (the epidemic is eradicated) or they all loose (everyone dies).  Software can emulate this through clear welcome screens that introduce the first time user gently.  They can clearly state community norms and guidelines and they can give incentive through achievements, collecting and reward.

Musical Play

Learning a musical instrument is an important type of play.  If nothing else it helps us remember that the older people are the harder they find things.  Learning a musical instrument can be hard but it can give great satisfaction but in many cases adults find that the balance is wrong: too much hard work not enough reward.

There are two types of musical instrument.

  • Those that are easy to learn but give little reward
  • Those that are hard to learn but can give great reward

The middle ground is an instrument that someone can start easily but can fine tune their experience to define the level of skill they need and the level of satisfaction they gain.  Christian felt that a ukulele is a great example of this type of instrument and that Twitter is a great example of software that is easy to start, gives little reward but that allows personal adjustment to obtain the type of reward an individual is looking for.

Christian finished his talk with a commentary on the missing piece.  He stated that it is currently easy from people to gather from the internet and equially easy (and becoming easier) to contribute to it.  There is, however, little capability to curate, to assimilate all the items that have been collected into a pattern or order that makes sense to the user.  Furthermore the current explosion of small interfaces onto the internet gives more immediacy and that there could be a pattern of people making quick trips to the internet to submit or retrieve and that designers may need to look at micro-transactions which means small studs of information which can be completed on a mobile device with the ability to go back later on a larger device to blend together or to expand upon.

John Resig

John started his talk on mobile testing with the quote “Cross-Browser web development is still hard but doing it for mobile phones is just plain crazy”.  John is part of the jQuery core development team.  Their current challenge is to make jQuery support all popular platforms.  This they thought was going to be relatively easy but has turned out to be difficult to even scope.  The following questions, for example, come to mind:

  • What are the popular platforms?
  • Which can support script?
  • What Devices and simulators are available?

To answer these questions you need good data.  There are a number of sources available (as I indicated in an earlier blog:)

  • StatCounter
  • Gartner
  • AdMob

StatCounter have an on-going project to track market share via usage with charts showing both local and world-wide coverage.  Gartner currently track mobile device sales.  AdMob is now challenged as a viable source of information as it has been acquired by Google and consequently banned on Apple devices.

It is noticeable that developers have a tendency to develop for their own devices which predominantly means iPhone followed by Android but this is not a reflection of world-wide market share.  Today the most popular platform is Symbian with 44% are the market, followed by RIM with 20%.  Then Apple and Android currently have 10% each with a smattering of others trailing behind (including Windows Mobile at 7%).  This snapshot does not indicate the current rapid growth of Android devices which will soon move beyond iPhone and make moves on RIM.

Knowing what platforms people use is useful and it clearly shows that the latest developments are not reaching the vast majority of users.  What is more important, however, and is a complete unknown is what versions of these platforms they are using.  Apple currently indicate that their tight control on their phones, operating systems and the way they engage with customers means that the majority of users are on either of the two latest platforms, although the newest iOS will change that.  Android is already more fragmented with a variety of phones being owned that use different versions of the platform.  Furthermore Google have no control (and no real care for control) of these devices so they cannot force or even encourage upgrading.  In fact some of these devices simply cannot upgrade even if the user wanted to.

In addition to the issue of platforms and versions of platforms jQuery has to think about browsers.  It is known which browsers are shipped with which phones but there are also independant, cross platform browsers that users may be able to install themselves.  Notably Opera (mini and mobile) which can be run on iPhone, Nokia, Blackberry.

The jQuery team have decided that to control scope they have had to put a stick in the ground.  That stick states that they will not support any browser/platform combination that preceeds 2007.

What does this mean to the average web designer/developer

  • Firstly draw your own line in the sand
  • Obtain simulators for the platforms you are willing to support
  • Use technologies like TestSwarm to automate testing where possible
  • Build a grading matrix that clearly shows the level of support you are willing to give.  

This grid should indicate the quality of experience each browser/platform combination should experience.  The following code could be used:

  • A – top of the line
  • B – Nice to support top of the line if resources available
  • C – Degraded experience (No Javascript, No CSS)
  • F – Fail (No experience at all)

This can be presented to the customer to give them a clear understanding of what they can expect

Testing

The first question here is should testing be physical or simulated?  They is no doubt that simulators are an important part of the testing process but they are far from accurate.  There is nothing worse that building for a simulator experience only to find that installation on a real device does not give the same experience.  Furthermore simulators are unable to provide a clear measure of the true user experience especially when sensor gestures are used (like shake, compass, vibration or orientation).

If a testing kit is required for physical testing it should be something similar to the following:

  • Apple 3GS, iPad
  • Nokia n97, n96
  • Palm Pre 1.4
  • HTC Magic
  • HTC HD2
  • BlackBerry 8900, 9630
  • Droid Incredible

The cost of this is probably $5,000 which is a significant budget but necessary to achieve an adequate testing capability.

Overall this presentation was well structured and informative.  It demonstrated that the efforts I have gone to over the last few weeks to build a virtual testing environment have not been wrong or wasted and that there was not really an easier way of doing it.  John’s perspective is skewed due to the fact that he is only looking at it from a jQuery perspective.  Consequently other web-browsing devices outside of the smartphone sphere are of little interest to him (such as Kindle, i-mode, PSP, Wii, televisions).  But then again these technologies are generally very basic and investing time on trying to make a good user experience is probably not an effective use of time.

 

Filed under  //   #WDX   @Media   Design   StatCounter   WebDirections   mobile   testing  

@Media WebDirections Conference : Keynote - Day 1

Yesterday I attended day one of the @Media/WebDirections Conference at Queen Elizabeth Hall, South Bank, London.  This is my second conference in a number of weeks following the Future of Web Design (FOWD) conference in May.  I was intruiged to see how different this conference was especially as at least two speakers at FOWD were also speaking here (Remy Sharp and Aral Balkan).

The differences were quite significant.

Firstly this event was much smaller, although located in a large facility (the Queen Elizabeth probably sits about 2000 people) I think there was less that a quarter of that number.  It was the same type of gender mix, predominantly male with a smattering of females (although that smattering was even lighter here) and a similar role mix although by the looks of them there were more developers and less designers.

Secondly, as you will see from this post and the next one, the content was more technical.  I should have realised this after the workshops but just how much more technical was a big surprise.

Lastly, and unfortunately, it was a little less organised, especially around those luxuries that you come to expect at these conferences such as wi-fi connection and power sockets.  As a result I was unable to get any quality Internet access which meant that I was unable to tweet (My blackberry was on low power too and its too slow for typing tweets in a conference).

Despite this last point I enjoyed the day and learnt a lot - which in the end is what it is all about

The event started with a short introduction that explained the merging of @media conference and the webdirections conference and was followed by a keynote by Brendan Eich.

So I have to admit that I am not familiar with the big names in the scripting industry especially those that orbit the W3C.  At FOWD I saw the workshop and presentation of Molly and she gave off an air of almost angelic reverence to these people (including herself by inference).  The same reverence seemed to be in the air for Brendan.  For those other people who read my blog who are equally unfamiliar Brendan is one of the co-founders of JavaScript.  He worked for Netscape and now works for Mozilla.  He is deeply technical, I think a portion of his oxygen intake (lets say 40%) has been replaced by code.  He promised something fast and furious and that is what we got.

His talk was effectively about the future development of JavaScript.  I think that people like me think JavaScript just is and don’t think too much about its evolution.  But evolving it is.  There are a raft of new developments on the table for the next round of standardisation approvals some of which are being adopted by browsers right now and are likely to be ratified by 2013 through a project called Harmony.  This includes:

  • Const
    The ability to define constants in addition to variables that can be scoped within functions or globally
  • Destructuring
    The ability to see arrays in any order to swap the elements and rotate them to see [a,b] = [b,a]
  • Functions in Blocks
    The ability to create inline functions with the same name within a block of code without conflict
  • Let
    A better type of var that handles scope better and is less likely to leak to higher level functions
  • Default Values
    Where parameters in functions can have defaults that are adopted if no value is applied to that parameter when the function is called.
  • Arguments as Parameters
    Where a parameter of a function does not have to be a single value but could be an array of values

As you can see from the above items and descriptions.  This is a technical subject and Brendan was quite obviously in his element.  He talked rapidly (as he promised) and slides flashed before our very eyes.  His content was assured and direct.  At this point in the proceedings I felt that I was keeping up especially as many of the above conventions can be seen in more mature languages such as C.

However this is the point at which things started to change.  Having discussed those elements where most if not all members of the working group are in agreement he started to move to those more bleeding edge ideas where not everyone has agreed the way forward.

I am not going to attempt to list or describe all the topics he covered.  For two reasons:

  • There were a lot of them
  • I am not sure I understood them enough to write with confidence and not mislead

There were some elements worth noting:

Proxies
These seemed to be constructs that would allow developers to extend current functionality.  For example the Math object a fundamental construct within JavaScript can be enhanced by Proxies with developers either extending or overwriting the native functionality.  This may be useful where different providers have diversified with their implementation and developers want to be consistent (across browsers for example)

ByteArrays
A better way to manipulate complex objects, at least better than string arrays which is effectively the only option currently available

Improved Random Number Generator
Brendan did not say much about this except a clear message that the current implementation is not very good and probably should be avoided especially if it is going to be used in the construction of unique identifiers like those used in e-Mail request URLs.

Brendan finished his presentations with some predictions.

WebKit the major standard, currently, in browser construction, will fracture with Google and Apple taking the implementation in two different directions.

Harmony will be implemented in FireFox and IE first with Apple and Google to follow at a later date.  This is mostly because Apple and Google’s browser development teams are quite small compared to those of Mozilla (Firefox) and Microsoft’s (which has recently been reformed to make IE9).

Native App stores (Apple and Android) will cause a resurgence of native code initiatives (like Objective C, Flash etc) but in the long run open source initiatives like JavaScript and ECMAScript will win out.

Filed under  //   #WDX   @Media   JavaScript   WebDirections   conference