Posts Tagged ‘WHATWG’

HTML5 knows where you are!

May 12, 2011

A few years back I was deemed a heretic by many of my colleagues and friends  when I suggested that HTML5 will remove the need for writing many mobile applications. I was pummelled with questions like:

  • But how will they work offline?
  • Are you saying a browser user experience can rival a platform native one like Apples?
  • You do realise that most games require “threading” how you going to do that?
  • What about storing data locally, can you do that?

I was able to fend of most of these, but the one I couldn’t at the time was about accessing the device applications like Camera and GPS. Well things have moved on and whilst I am no longer deemed a heretic there are still some corridor’s whispering doubt.

One of the big features of mobile technology used by many apps is the phones location and location based services and application have already been through a huge hype cycle.

Under the catch-all banner of HTML5, although it is a separate subspec, the W3C Geo Location working group are making location based applications a reality for web developers. It has been around a while and hence is fairly mature and stable now.

A device (even a desktop) can provide location information in a number of ways:

  • IP Address (this is typically the location of the ISP rather than your machine, but ok if you simply want to check which country the user is in)
  • Cell Phone triangulation (only fairly accurate, very dependent on the phone signal so could be problematic in the countryside or inside buildings)
  • GPS (very accurate, takes longer to get location, dependant on hardware support and can be unreliable inside buildings)

Location data can also be simply user defined: however this is dependent on the user entering accurate information.

Of course one of the key concerns will be privacy but the spec covers this with an approach that the requires a user to give permission for location information to be passed to an application. Note the application can only access location information through the browser and not directly e.g. from the GPS device. Hence the browser enforces the user permissions for access.

The Geo Location API allow for both one off request to get the users current location or for repeated updates on the user’s position, developers write simple callback routines for both approaches. The key information provided includes: latitude, longitude and accuracy. Accuracy is a %value of how close the longitude and latitude values are to the user. Depending on the device you may also get additional information such and speed, heading (direction of travel) and altitude.

As per any quality application you process errors accordingly, especially responding to a failure to get hold of location data because of signal issues or other reasons. Hence retrieving location information is fairly simple, the real hardwork is in processing that information and that requires good old fashioned quality programming ;o)

This specification presents a huge opportunity for web developers to create applications once deemed only the domain of platform specific code, and I for one am very excited !

http://dev.w3.org/geo/api/spec-source.html

Endless options mean web development does not have to hit the rails

September 26, 2008

As I have stated before, better application interaction across different devices should be the web standard we all aim for.

However, progress has been sticky – and it can be difficult for users to access applications on different devices.

Standards such as XForms and WHATWG provide a step in the right direction, but are constrained by either the need for user plug-ins or the slow development of the framework.

So, how do alternative standards – such as JavaServer Faces (JSF) and Ruby on Rails (RoR) – provide more opportunities for creating web applications?

As its name suggests, JSF is Java-based – and its component-based framework aims to ease the development of user interfaces (UIs).

The approach allows the creation and re-use of specific components, promoting the quick and flexible development of web pages.

One of the other key benefits of JSF is the ability to work with a range of internet technologies. Particularly notable is the interaction with Ajax, which can help developer’s enrich JSF designs with Ajax-based components.

Work on the JSF specification continues apace and a series of big-name vendors are helping to push the development and adoption of the standard.

RoR – which is an open source framework for creating web applications – is also receiving an increasing amount of backing.

The framework intends to push agile programming, providing standard models for web site construction and the automatic allocation of information in databases.

Apple started shipping the framework in late 2007 and other firms continue to show an interest.

Microsoft, for example, recently announced plans to increase its commitment to Ruby. The Redmond-based software giant plans to take part in the RubySpec project, an attempt to provide a complete specification for the RoR programming language.

Such progress shows how developers do not need to feel constrained as they attempt to create usable web applications.

As my previous posts have aimed to highlight, the world of front-end development for SOA is a crowded place and each framework offers a unique blend of benefits and constraints.

My advice is simple. First, don’t re-invent the wheel – there is definitely an available framework that suits your needs, without having to create a presentation platform.

Second, take tour time before sourcing a solution. Look at all your presentation requirements across online and offline experiences, analyse support for devices and variations in presentation, and also investigate the skills you may – or may not have – in your organisation.

Just remember that the options are out most definitely out there.


Digg!