Mix:ed feelings

One of the great bonuses of writing for a magazine like PC Pro is that you get invitations to major product launches (or is that lunches?) and the occasional conference, to see what software vendors have planned for the future and chat with like-minded people. So it was when I was invited to Mix:UK, the Brit version of a larger event held in Las Vegas early in 2007, where such luminaries as Scott Guthrie and Angus Logan from Microsoft spoke about Silverlight and the Microsoft “Live” platform. I came away with several pages of notes, many unanswered questions in my head and the feeling that it could all have been presented much better.

Mix:ed feelings

By that I mean that most attendees were programmers hoping to see the tools they’d be using over the next year: their companies were paying to get a real-world “edge”. It’s hard enough nowadays to keep up with developments and know what to invest time into learning (that’s why you read this magazine, isn’t it?). But instead of being shown something we could go away and start working with, we were shown early alphas of Silverlight 1.1, so early and so alpha that they had no controls and all you could do was draw simple shapes. As such, it had very little relevance to the real world.

We all know people who can talk for hours about the relative merits of a particular way of coding, but most of us need to churn out working code that stays working, and in a realistic timeframe. Some of you may remember playing with Ajax extensions for ASP.NET and getting them to work only after much gnashing of teeth, research and forum chat – then the next version of the extensions were released and this hard-grafted code would no longer run, requiring so many changes that rewriting from scratch was the easier option, for me at least. Sure, there were lots of good reasons for the changes, and the resulting extensions were much better, but experiences such as that leave us with little enthusiasm for anything more than a quick glance at Silverlight 1.1 – who knows what will have changed when it finally escapes?

There were some points mentioned that caught my interest, however. For example, Microsoft claims that no feature will be added to Silverlight that won’t work on all browsers, and on all platforms. This is a claim worth monitoring and holding the company to, and one that could come back to bite it very hard indeed. Interestingly, for the two days of the conference, I found no mention of the accessibility features to be incorporated into Silverlight. Admittedly, I couldn’t attend all the talks as many ran simultaneously, but accessibility issues certainly didn’t seem to top the agenda with Silverlight code. Let’s just hope Microsoft isn’t making the same mistake Macromedia did with Flash, forcing it to “bolt on” accessibility features later.

Cool LINQs?

At any programming technology previews, I always make myself a small bet that Microsoft will announce yet another new way of connecting to data sources, and I wasn’t to be disappointed this time. Finding new ways of dealing with data sets seems to be a long-standing Microsoft tradition. No longer content with SQL – a long-established data query language that most developers are now pretty proficient in – we’re being offered LINQ, which looks a little like the old FoxBase.

LINQ can be imagined as a universal language that translates queries into a native query language, dependent on the particular data source – so if, for instance, you were accessing a SQL database it would translate into MSSQL, while if you were accessing a XML data source it would translate the query into XQUERY. So we have LINQ to SQL, which was previously known as DLinq, and LINQ to XML, which was called XLinq, and the idea is that there will be connectors for Access, LDAP, web services and SharePoint, in fact to any data source. There’s also work being done on a version of LINQ to be known as PLINQ that tries to spread a query across multiple processors and so speed up its execution, but the fact remains that querying via LINQ is still going to be slower than using the database’s native query language, so why use it at all? The official rationale is that LINQ isolates the concepts programmers need to deal with from the back-end implementation.
Let’s take a look at how, in LINQ, you might implement a simple SQL query like:

SELECT CompanyName, ItemID, ItemName from Customers where CompanyName = ‘Acme’

In LINQ this would translate to:

var q = from c in db.Customers

where c.CompanyName == “Acme”

select new { c.CompanyName, c.ItemID, c.ItemName };

Now I’m sorry, but I really fail to see how this helps me; and after asking the people on the LINQ team, I’ve yet to get a proper answer. Why spend time learning yet another, lower-performing query language that has to be interpreted into the native one anyway? Why not just give us a way to use SQL to query all the data sources? Why we need yet another syntax is beyond me, but I’m assured it’s a really cool way to query XML data so I guess we might end up using it. Or maybe it will end up on that scrapheap of obscure programming tools that help us fill out our CVs, safe in the knowledge we’ll never be called on to code in them again. Perhaps I’m missing something, but I have a feeling it’s yet another example of very clever people doing very clever things that don’t supply what the real-world developer needs. If you have a view on this please email me at mnew@ecats.co.uk.

Coders and designers unite?

A demonstration that was notably absent from this event was anything that illustrates Microsoft’s new vision of programmers and designers working together on an application. Microsoft has made lots of noise about tools to enable such collaborations, but that being so, why didn’t it show them working? We were subjected to half an hour of coding just to change the colour of a textbox and to hard-code the look of a mouseover event, which is all stuff that should be left to the design tools anyway. The vision as it’s been explained to me is that the web-application functionality can be programmed up and tested, while the designers are working their magic on the web forms to turn the pages into something cool looking and user-friendly.

Please Microsoft, start showing us how this vision of yours works: we want to use code to connect to data sources and manipulate the data, but the display and user interface should be generated by the design tools, not hard-coded in VisualBasic, C#, or JavaScript. If there are no convincing demonstrations of this soon, I guess we must assume that it’s all too difficult to get working and that Microsoft prefers to spend its time giving us another new query language or office document format.

On the plus side, huge improvements have been made to Visual Studio 2008, one of the biggest being to its rendering engine. This was previously so poor as to be almost useless, and its replacement by the excellent rendering engine from the Expression Web Suite is very welcome indeed: now Design View bears a close resemblance to how the page will actually look in a browser.

Live and twitching

For some time now, Microsoft has been investing millions of dollars in the infrastructure needed to run the “Live” range of services, so it was no surprise to find that another key area of this conference was the promotion and the possible uses of this platform. At Mix:UK, these presentations were given by the very enthusiastic Angus Logan and his team, who certainly seemed to believe in what they’re doing. However, many of us weren’t so convinced that Microsoft is achieving anything startlingly new, since so many of the offerings look very similar to what Google, Yahoo and many others are doing. But with Microsoft being the largest software company in the world, it would be foolish simply to dismiss its offerings, and every so often it comes up with something that surprises us all. Currently in the “Live” environment we have Live Spaces, Live Contacts, Live Earth, Live ID, Live Expo and, the one I’ll look at first, Windows Live Silverlight Streaming (http://silverlight.live.com).
This is a video-streaming service that’s currently free and gives you 4GB of online video storage and up to one million minutes of video streaming per month. The Live service differs from YouTube and similar services by not imposing its own branding on your content, and there’s currently no advertising on the site either, although Microsoft says that ads may follow.

To display your video content using this service, you’ll need to create a Silverlight player for it, and the easiest way to do this is by using the Expression Encoder, which is available for both Windows and OS X. Simply open the Encoder application, import your video, select the type of skin you want for the player and then select “publish” – it really is that easy. Currently, the video file size is limited to 22MB, which corresponds to about four minutes of video, so uploading your unique take on War and Peace is going to involve some very heavy editing. One reason for this limit, apart from the obvious one of storage space, is that if a video runs over ten minutes then apparently there’s a licence fee to pay for the MPEG compressor.

Using Expression Encoder isn’t the only way to deliver this sort of content from the Silverlight Streaming service, as you can code it yourself or build the functionality into your web application. As a demonstration of how a YouTube-type site might be built using this technology, Microsoft has a sample website at http://codeplex.com/wlquickapps, where you can find a whole host of examples worth looking at.

Another Live service is a complete mapping technology run from http://maps.live.com, which is very like Google’s Maps – it’s been around for some time and is also constantly upgraded, with more features added all the time. Microsoft’s Virtual Earth now has a full open API, whose SDK is available from http://dev.live.com, to enable you to integrate it better into your own web application. I’ve become blasé about yet another application that puts “pushpins” onto a map corresponding to the contents of some database, and so yawn-worthy are such demonstrations by now that I’d like to plead that we stop doing the obvious with this mapping technology and come up with some novel use for all these petabytes (yes, that’s a real word for 1,000TB or 1,000,000GB) of geographical data. My first internet-based job back in 1996 was helping develop a website that put pushpins onto a map depending on the results of a user’s search against a database of hotels, so pardon me if I fail to get overexcited.

Sure the maps are better, but that’s just down to storage capacity and the performance of servers; the web applications work in better ways now but we’re still using maps in the same way, and there has to be a killer application waiting to take advantage of all this data (and no, it isn’t one that shows me where my friends are MSNing me from: either I know where they live already or I don’t care, and knowing that Mike is chatting from the same location as Bill’s wife is positively dangerous). Let’s hope that with the launch of Live tools for Visual Studio we’ll see some truly innovative use of this mapping data.

Passport to success?

I was awoken from such disgruntled musings by the announcement of Live ID user authentication. Those of you who still remember the all-encompassing vision that was Microsoft’s HailStorm may find this familiar. The only actual product to come out of that initiative was the stillborn Passport user-login service, which Microsoft hoped other websites would adopt so that users would have a single place to log into – anyone who uses the internet at all knows that didn’t happen.
Sure, Microsoft still uses Passport, but why wouldn’t it? It also hopes we’ve all forgotten the time Passport broke so badly that lots of user accounts were lost. So is this a reincarnation of the Passport concept? Microsoft, not surprisingly, doesn’t want developers to think of it as Passport version two, but rather as Live ID version one. Putting such marketing spin aside for a minute, let’s look at how it should work and what advantages implementing it in a web application could offer to the developer.

Its real benefit is seen if your website uses any of the other Live API functions – for example, you want your users to be able to access their MSN buddy lists from your website. If you don’t use Live ID your site would have to ask the user to enter their MSN login details and pass them through to the Live API – however, if your site allows users to log in directly to the Live ID site via an iFrame, then a token will be passed back from Microsoft’s Live servers to your application, which enables controlled access to their Live data (depending on their security settings). And if the user is already logged into Live ID before they get to your site, this token transfer is completely invisible.

What Live ID is not is a single place for users to log into, Passport-style. While you could use it for this purpose, your web application would then have no access to the extra user information stored on the Live ID site. For example, let’s assume the user has previously logged into site A via Live ID and has been asked for their address: later, this same user logs into site B, but if site B wants to know the address it will have to ask for it again, which I think makes for a frustrating experience. If you’ve gone to the bother of entering your full details on a site that had a Live ID login it’s infuriating to be asked for the same info again when logging in using your Live ID on another site. I can see that Microsoft is trying to build a secure mechanism for accessing Live services from other web applications, and as such it looks like a good enough way of doing things, but a second coming of HailStorm it ain’t.

Perhaps I was expecting too much from Mix:UK. I was surprised, to say the least, when only about 20% of the people attending put their hands up when asked who had any experience of developing in Ajax. Visual Studio 2008 will come with much greater support for Ajax, with 40 new tools, and Ajax 1 will be included in the .NET Framework 3.5 rather than being an add-in, so perhaps as development and debugging of Ajax applications becomes easier, more people will come onboard and start producing these killer applications that we’re all looking forward to. Unless, that is, Microsoft changes its mind all over again and starts bringing in even more cool new technologies that scare more developers away from learning about something that might become obsolete before its first service pack is released. I really hope not.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.