Colin Eberhardt's Technology Adventures

Slides and code from my WPUG talk on PhoneGap

February 29th, 2012

Yesterday I presented a talk at the London-based Windows Phone User Group on the development of cross-platform mobile applications using PhoneGap. Here are my slides from the presentation:



And here is the twitter search application I demoed: PhoneGapTwitterSearch.zip

You can also try out Property Finder on your phone.

Thanks to Matt Lacey who organised this event, thanks to those who attended and participated in a lively Q&A session after the talk. If you want to know anything more about my experiences with PhoneGap, give me a shout.

Regards,
Colin E.

Visualising StackOverflow Tag Relationships with Silverlight

February 20th, 2012

UPDATE: I have posted the sourcecode for this control on codeproject.

Recently I have been wondering about the wealth of information that can be gleaned from the 2.5 million programming question on Stack Overflow. A few weeks back I found a tag trending tool, which can be used to measure the rise and fall in popularity of tags over time. Whilst this is a great little tool, I am sure there is much more that can be done with the freely available Stack Overflow data, for example, exploring the relationships between the many technologies people ask questions about.

On a recent trip to Copenhagen I decided to put my hours of travelling time to good use and create a Silverlight application that plots the relationships between the various tags. I created an application that downloaded the 1,000 most recent questions via the Stack Overflow API and plotted the relationships between the 20 most popular tags, as seen above.

The graph is constructed as follows:

  • The size of each segment is proportional to the number of questions relating to the tag, i.e. android and java are the most popular tags.
  • Connections between tags indicate questions that have been tagged with both technologies. The thickness of the connection indicates how many questions share these two tags, i.e. jQuery and JavaScript tags appear together quite often.
  • Each segment is coloured based on the number of connections it has, red for many connections, blue for few.

The ordering of segments can be changed using the drop-down control. Probably one of the most interesting views is the one where related tags are clustered. This is done by assigning a ‘weight’ to the current configuration of the graph by summing the length of all connections, with connections that cross the centre of the circle adding most weight. An iterative process is used to minimise the overall graph weight by moving each segment a few steps left and right, until the least ‘weighty’ configuration is found. This is the one where each tag is most closely related to its neighbours.

When clustering is applied we can see small ‘pockets’ of related technologies, with the following patterns emerging

  • The two most popular tags, Java and Android, are very closely related to each other, but have very few other relationships.
  • iOS, Objective-C and iPhone form a close-knit group. However, Objective-C questions are sometimes also tagged with C#, C and C++.
  • C#, .NET and ASP.NET are clustered, however C# has links with many other tags
  • The strongest relationship is between jQuery and JavaScript, probably due to jQuery having become the de-facto framework for JavaScript development, being used on 53% of websites.
  • There is a large cluster of connected web technologies, CSS, HTML, JavaScript, jQuery, reflecting the mix of technologies involved in creating web sites and web applications.
  • Python, whilst being a popular tag, has very few relationships, only being weakly linked to PHP.

I am planning on tidying up the code for this visualisation, making it more generic, allowing it to be used to graph other datasets. Let me know if you are interested in this!

Here is the same graph, but showing the top 30 tags, again, more interesting relationships start to emerge:

Finally, thanks to Chris P., Adrian C. and Graham O. for their ideas and input!

Regards, Colin E.

 

The Gradual Decline in Silverlight Adoption

February 13th, 2012

Around one year ago I made the prediction that Silverlight would have an overall adoption of 81% by the end of 2011. The adoption statistics are now available and indicate that my predictions were wrong by more than 10%, with Silverlight adoption reaching just 67% at the start of this year. So what went wrong?

In my previous blog post I assumed that Silverlight adoption would follow a sigmoid curve as per the Diffusion of Innovation theory. Taking the adoption statistics from StatOwl, I used Excel to fit a logistic function to the data in order to predict the future adoption, arriving at a projected adoption figure of 81% at the end of 2011. However, in my curve fitting it looks like I made one important mistake – I assumed that Silverlight adoption would eventually reach 100%!

By adjusting my Excel spreadsheet to allow a sub-100% adoption I achieved a much better curve fit and the 2011 predictions were reduced from 81% to 75%.

However, data from throughout 2011 seems to indicate that the rate of Silverlight adoption is falling (I think we all know the reason why). Including last years data shows a very good fit to the logistic function, with the rather gloomy outlook that the adoption is asymptotically tending towards 73%.

The graph below shows the adoption statistics reported via StatOwl from 2008 through to 2011, together with my (corrected) predictions based on the data up to 2010, and my predictions based on the complete set of available data.

This doesn’t compare well with flash where the adoption of each new version is faster than the last. With Silverlight adoption statistics tending towards 73% the outlook doesn’t look too great. Is this a technology we should still be investing in?

Personally, I think the answer to this question is “yes” for a couple of reasons:

Whilst the Silverlight plugin might be losing relevance, Windows 8 Metro and Silverlight for Windows Phone 7 are both XAML languages with a similar API. The skills you learn whilst developing Silverlight or WPF applications are certainly going to be relevant in the future.

Businesses have an investment in the skills of their employees, but just as importantly, they invest in the code that they write. Whilst there is some comfort in the ability of their employees to easily adopt new technologies, the cost of migrating a code-base is always going to be much greater. It is clear that Silverlight is no longer going to be the Flash-beating plugin that would be the de-facto choice for interactive content on the web (Flash, and the plugin model in general, is in trouble). However, Silverlight is now a very mature platform that is an appropriate choice for delivery of complex business functionality either within an intranet, where you can control plugin installation, or where the business value of the application being delivered ensures that the 30% without the plugin will install it in order to use your application.

Now, more than ever, is a time for developers to diversify and learn new skills.

Regards, Colin E.

WPUG Talk: Developing cross-platform mobile applications with PhoneGap for Windows Phone 7

February 9th, 2012

In a couple of weeks I will be giving a talk on using PhoneGap for cross platform mobile application development at the WPUG #NotAtMWC12 event on Tuesday, February 28, in London. Here’s a brief overview of my talk and a video:

Windows Phone 7 and the Silverlight framework are a great pairing; they allow you to create beautiful Metro applications with ease. The excellent tooling, coupled with the Nokia partnership, should make WP7 a big success.

Will we see a future dominated by WP7? I doubt it, and the analysts at Gartner seem to agree, with their 2015 predictions indicating that Andoid, WP7 and iOS will all still have a significant market share for a few years to come. If you are developing a smartphone application this means you either make a choice between one of the three, or you have to write the same application three times, once in each of C#, Java and Objective-C.

However, there is another way … all three phones have highly capable browser, in many ways more capable than their desktop counterparts where many people still use quite archaic browsers! All have good HTML5 support, which allows you to create applications that run within the browser. With this technology you can potentially write your mobile application just once using HTML5 (JavaScript / CSS) and reuse it on all three platforms.

This sounds too good to be true doesn’t it?

This talk will focus on the use of PhoneGap for the development of cross platform applications and look at the compromises you make, and the benefits you receive, by using this approach.

I’ll be talking quite a bit about Property Finder, a PhoneGap application I wrote for WP7, which I have now ported to iOS (using PhoneGap build):

Hopefully see you there!

Regards, Colin E.