A new software journey

When the Symbian Foundation IS department asked me which type of laptop I would like to use, out of the choice of three available, I chose the model described as being suitable for software engineers.

It’s not that I’m expecting to be doing any significant amount of C++ development.  I doubt that my name is going to feature as a major new contributor to any package of Symbian Platform software.  But I am keen to get some first hand of experience of what it’s like, nowadays, to develop software for Symbian devices.  I look forward to occasions when I’m speaking at conferences, and instead of just running through a series of PowerPoint slides, I will demonstrate aspects of real-time Symbian software development.  Jousting with the “demo gods” – that should be fun!

Even though I spent several years immersed in Symbian C++ APIs, that was over a decade ago – so my knowledge is very rusty.  (And in fact, whenever I try to remember some of these APIs, I find that it’s their 16-bit precursors which pop first into my mind: I spent more years working with the 16-bit version of EPOC software than with the 32-bit version which became Symbian OS.)

But my new software journey is going to start in a different place.  Rather than C++, it’s web technologies that I intend to practice.

I’ve heard colleagues talking a great deal about the powerful applications which can be written using HTML and associated web technologies.  So I’m setting myself the task of writing some useful mobile web widgets.  I plan to report my progress in occasional postings in this blog.

My starting point is the page “Web Technologies Quick Start” from the new Symbian Developer website (currently in internal beta).  It’s full of pointers to interesting looking tutorials.  Here are the first few paragraphs of the article as it stands today:

The gap between mobile browser and desktop has narrowed to the point where it’s now feasible to deploy Web-based applications to both classes of devices. Web programming for mobile is attractive owing to the large number of developers and designers who are skilled in Web development, and many feel that ‘Web programming’ has a much shallower learning curve compared with C++.

This article discusses the type of applications that can be developed using Web technologies. It discusses the support for Web technologies on Symbian-based devices and covers widgets, mobile browser optimization and Web development tools. While it is for a technical audience, the aim is not to provide information in great detail, but instead to refer to external resources where appropriate.

The target readers for this article are software engineers or managers with some technical background, who want to explore the capabilities of Web technologies on the Symbian Foundation platform.

That’s encouraging: “…managers with some technical background, who want to explore the capabilities of Web technologies on the Symbian Foundation platform” – that sounds like me!

And from further into the article:

Widgets and the Web Runtime

Widgets offer seamless integration between Web technologies and local applications. A widget can be selected from the phone’s application menu and the HTML and JavaScript loaded locally. Not only does this improve the loading time for a Web app, but it also spares the user from having to type a URL to access the widget, which is awkward on a mobile device.

The next few sections will describe how you can create your own widgets, package them up and test them. You will also learn about tools, security and the distinction between WidSets and widgets…

If you are familiar with Web technologies then creating a widget is easy. It’s similar to creating a normal Web page, which is packaged up into a compressed file, but a widget can also access some of the device’s own APIs. These are the main steps to follow in preparing a widget…

It’s all very inviting!

But there’s one thing I’m not sure about.  Earlier, I said that “I’m setting myself the task of writing some useful mobile web widgets”.  As an output of my new software journey, I’d like to create something that at least some users would like to install and use on their phones – something that delivers a valuable service.  That will add more spice to my experimentation.

That brings me to a question I’d like to open to readers of this blog.  What suggestions do readers have, for widgets that I can try to write?

19 Comments

  1. David Durant
    Posted April 10, 2009 at 1:52 AM | Permalink

    Excellent! I had an idea for a web widget some time ago but have never had the time to put it into practice.

    It’s a calculator of the quickest from your current location (from GPS) to a specified destination using the TFL journey planner (http://www.tfl.gov.uk/).

    On the minimised (front screen) version it would just display the amount of time it would take to get to the destination On the maximised version it would show the details of the current fastest route (as well as let you create a set of locations and set the current target).

    If WRT now supports a Google Gears like storage system if would be even cooler if the system could cache a number of queries phased into the future so that it would switch to the most efficient route for the current time even if underground and unable to get a signal.

    Thoughts?

  2. Posted April 10, 2009 at 8:27 AM | Permalink

    Whatever you develop, make it a real project, rather than a demo that has no further appeal or life after that. Solve a real problem that you care about. Go after a true itch you have. this will make you come up against the real issues with the framework, the language, the tool and the platform. It is also the only way to make it fun.

    If you want to make it hard, remember that battery consumption is important and that this applet will always have to be available to the user, like all Psion apps did. Think about guarding the user’s data at any cost and making sure unexpected conditions are always catered for. then think about distribution to the rest of us.

    btw if you do it on JavaScript, read some of the code presented in SPA2007 by P. Marks and D. Harvey on ‘Serious JavaScript’ here

    good luck

  3. Posted April 10, 2009 at 11:33 AM | Permalink

    How about something based on the Last.fm API (http://www.last.fm/api)?

    There are lots of things that can be done with that API. One example;

    user.getRecommendedEvents returns events that Last.fm thinks you will like based on your listening habits. Similarly geo.getEvents will return all events close to a geo location you provide (you don’t even have to be a Last.fm user for this one). Both of these return events that have geo longitude and latitude which means you could display, perhaps on a map, a user customised set of events for tonight that are closest to their current location.

  4. Posted April 10, 2009 at 2:34 PM | Permalink

    Hmm, there are already more suggestions here than I can hope to address personally – since I’ll only have a small amount of time to work on this.

    Looking at these first suggestions, I’m inclined to experiment with GPS information and then with obtaining route information via services provided by the http://www.tfl.gov.uk/ site.

    But that shouldn’t mean the other suggestions will go to waste. I’d hope that some of my Symbian colleagues (and also people from the wider community) will join me on a journey to experiment with web programming. Different newbie developers can adopt different suggestions for applications to try to create.

    So here’s my challenge. Guys and galls – in parallel with becoming Twitter-savvy, consider becoming Widget-savvy :-)

    // David W.

  5. Joseph Asmar
    Posted April 10, 2009 at 8:46 PM | Permalink

    Hello David,
    Something beneficial quick and easy to do would be widget for widsets users bookmark accounts. Currently by visiting http://widsets.mobi/bookmarks_list.html on a mobile device to view bookmarks but no management. On the other hand in the widsets client it has a wonderfull bookmark viewing and management system which looks and feels good, but only possible to use with the widsets client open.
    I would like to see an independent widget for this function.
    Funny how it has not been done yet.
    Have fun!!!

  6. Daniel
    Posted April 11, 2009 at 5:35 AM | Permalink

    Hello David,
    I’d second Joseph’s idea about a bookmark widget. Mostly though just wanted to say well done it’s great to start with a hands-on experience and impressive you’re willing to devote the time whilst launching a new organisation.

  7. Lee Holland
    Posted April 11, 2009 at 5:49 AM | Permalink

    make a widget for http://www.symbian.org/
    make it so its tabbed feeds for each section like News, Blog, etc.
    very simple idea but it will be a great way for the symbian community to keep in touch with latest going’s on.

  8. Aron
    Posted April 12, 2009 at 6:30 PM | Permalink

    Hello,

    I really do not want to crash the party, but I have a question closely related to this topic. Quite some time ago, when the incompability of S60 v3 “FP0″with the new web browser was anounced, there were serious ruomors that a stand alone browser will be released.

    It wasn´t and if it would not be for the likes of Opera mini, Teashark and Skyfire, all those users would have been in trouble if wanted to do serious browsing.

    Now that you are putting the emphasis on web applications do You and the Management of Symbian and the phone companies using your code have the commitment to UPDATE the web browsers in the devices as the web (e.g.: new flash versions) and the browsing methods evolve?

    Because if you do not have that commitment, than I am afraid that web applications might be destined to a long agony as devices which did not pass their valid life times become unusable with new browsing technology or with new state of the art browsing methods…

    Are Symbian and its supporters ready to be open in strategy as well as in source code for constant unlimited improvement of the Symbian web browser?

  9. Posted April 13, 2009 at 9:15 PM | Permalink

    Here’s a short update on my first few steps along this journey:

    Successes so far: I adapted the “Hello World” example widget from a tutorial on the NewLC site, and managed to install this and run this on my Nokia E71. Later, I did the same for the “Horoscope” example widget from Forum Nokia.

    I did all the above without installing any SDK of any sort on my laptop. I used Notepad to edit the various text files, and I used a Bluetooth connection to beam the relevant files from my laptop to the E71.

    The only other tool I used was a zip program, as needed to put the various text files and other source files (such as a PNG file for an icon) into the required installable format.

    I’m far from being an expert in HTML or CSS or DOM or JavaScript, but I managed to make a few changes to the supplied examples. For example, I changed some of the background colours to the Symbian Foundation #4D112A shade of yellow.

    But neither of these examples are particularly taxing. What I wanted to do next was to display information taken from the GPS functionality of the phone. However, it turns out that this isn’t possible, for devices prior to S60 Fifth Edition. So it won’t be possible on my E71.

    The next sub-goal I’ve got in mind is to add some web services into a widget. For example, I’d like to be able to use services provided by some websites, in order to extract reviews of films. So far as I can tell, this should work fine on an E71.

    // David W.

  10. Stringer Bell
    Posted April 14, 2009 at 10:20 AM | Permalink

    The platform services API is only available in 5th edition (WRT1.1) and as firmware upgrades to some 3rd FP2 edition phones.
    Yes, Nokia still managed to fragment a new technology by cack handedly releasing it too early.

    WRT1.0 is almost useless for application development, but is ok for implementing simple content fetchers like dictionary lookup/weather.

    You can fetch any sort of data using ‘AJAX’, so your widget can fetch and parse XML from a web service (or more efficiently JSON format data).

    You can detect if the service API is available with code such as the following:
    var serviceObject;
    try{
    serviceObject = device.getServiceObject(“Service.Location”, “ILocation”);
    }
    catch(e){
    if( e.name == ‘ReferenceError’ )
    alert(‘device service cannot be found’);
    else
    alert(e);
    return;
    }

  11. cs
    Posted April 14, 2009 at 10:36 AM | Permalink

    David wrote:
    > “I did all the above without installing any SDK of any sort on my
    > laptop. I used Notepad to edit the various text files, and I used a
    > Bluetooth connection to beam the relevant files from my laptop to the
    > E71. The only other tool I used was a zip program, as needed to put
    > the various text files and other source files (such as a PNG file for an
    > icon) into the required installable format.”

    It would be quite interesting if one could use just the Symbian mobile device for that kind of programming. So one would not need a laptop for that at all. Ideally, power users should be able to use their high-end mobile devices instead of laptops for performing such simple activities.

    -cs

  12. Ash
    Posted April 14, 2009 at 12:14 PM | Permalink

    Try making a Spotify widget, I hear they just opened their API. http://developer.spotify.com/en/libspotify/overview/

  13. David Durant
    Posted April 14, 2009 at 12:28 PM | Permalink

    Of course perhaps the most useful thing would be a user-friendly way for *consumers* to be able to raise defects on the Foundation Bugzilla system (automatically flags up potential duplicates). Getting more end-users to submit issues is a great way for ‘many eyes’ to find bugs.

    Same goes for an interface to the RSS feeds and forums of course. A “Symbian Foundation” app if you will…

  14. cs
    Posted April 14, 2009 at 1:00 PM | Permalink

    To David Durant:
    > “Of course perhaps the most useful thing would be a user-friendly way
    > for *consumers* to be able to raise defects on the Foundation Bugzilla
    > system (automatically flags up potential duplicates). Getting more
    > end-users to submit issues is a great way for ‘many eyes’ to find
    > bugs.”

    The most useful and user-friendly way of reporting bugs for regular users is probably the invisible (or nearly invisible) way. Bug reporting should be as automated and easy as possible and special software, such as automatic crash reporters, ( http://en.wikipedia.org/wiki/Crash_reporter ) should be available for regular users who wish to easily report bugs, such as crashes, etc.

  15. David Durant
    Posted April 14, 2009 at 2:53 PM | Permalink

    *nods* – Don’t get me wrong, I’m a big fan of automated crash reporting but when you have a 100% reproducible non-crashing error, such as I found on my old E61, it would be great to have a way not only to report it but also to track the fix.

    Of course people reporting valid bugs should get t-shirts, etc…

  16. Joseph Asmar
    Posted April 15, 2009 at 2:26 AM | Permalink

    To CS,
    Correct me if i am wrong,
    It is completley possible to create a wrt1.0 on the device.
    That is what i understand.

  17. cs
    Posted April 15, 2009 at 6:50 AM | Permalink

    Joseph, that’s great – in that case I am thinking of creating a meta web-widget – a web widget for easily creating other useful web-widgets.

  18. Gavin
    Posted April 15, 2009 at 4:50 PM | Permalink

    I disagree that Nokia made a mess of the WRT releasing. It’s surely better that technology that allows the creation of widgets that interact with the web be available now for devices already out there in peoples pockets and evolve from there.

    Sure, it would have been better if everything had been ready in the first release, but that’s normal software development for you, isn’t it?

    Also, for those not internal to Symbian and unable to access the resources DW is using, there’s more than enough information and example widgets to get you started on the Forum Nokia website!

  19. Posted April 16, 2009 at 2:51 PM | Permalink

    @David Durant:
    > If WRT now supports a Google Gears like storage system…
    I REALLY hope the entire S60WebKit framework is gonna be open for good: I’ll be happy to extend A LOT the Javascript DOM to enable developers with stuff like (or better?) than Google Gears.


2 Trackbacks

  1. By Symbian on Symbian « Symbian Blog on June 5, 2009 at 5:35 PM

    [...] was one the themes of an earlier posting I made, A new software journey.  In that posting, I posed a question: What suggestions do readers have, for widgets that I can [...]

  2. [...] David Wood (who we interviewed previously) posted about WRT widgets, asking for suggestions as to what widgets you’d like to see. One answer that intrigued him was for a Symbian.org widget, which would allow Symbian users to [...]