Why Silverlight?

I noticed this question in a comment to Rob Blackwell’s Reg article on Silverlight:

…given that MS never does anything without a commercial reason … why Silverlight? What sales will it make? What competition will it kill? As far as I can see, there’s nothing that will tie SL exclusively to a particular MS product.

Answer: it’s all about the platform stack. Microsoft does not want to cede this space to Adobe and Flash, because it is strategic. Use Flash, use Adobe’s tools rather than Visual Studio, use the Java-based LiveCycle and JEE rather than ASP.NET and Windows Server. Use Silverlight, use Visual Studio, ASP.NET, XAML, SQL Server, all the Microsoft stuff.

What about the Internet as an advertising platform? Flash/Silverlight is the client runtime.

What about the Internet as a broadcasting platform? Same story.

I speculated recently about the future of gaming.

Silverlight is partly defensive. In other words, less about “what sales it will make?” than about, “what sales will it avoid losing?” Web developers need to support cross-platform clients; if Microsoft cannot provide the tools and server-side platform to make that work, developers will look elsewhere.

I picked up a hint here at Tech-Ed that SQL Server Compact Edition may find its way into a future Silverlight. A cross-platform local database store makes a lot of sense; Adobe already has this in the form of SQLite. If Adobe’s AIR proves popular, Microsoft could relatively easily push Silverlight in that direction as well, providing a way of running Silverlight outside the browser.

Doesn’t this undermine Windows? Maybe a little, and I am sure this is a point of debate within Microsoft, but it is worth it.

Silverlight’s big problem: devices. Flash on iPhone: possible, even likely. Silverlight on iPhone, Nokia? A stretch.

Why Entity Framework when we have LINQ to SQL?

I’ve just returned from Carl Perry’s Tech Ed session on the Entity Framework, an object-relational library for ADO.NET, initially implemented for SQL Server. Perry is a Senior Program Manager Lead on the SQL Server team. The Entity Framework is the first implementation of what Microsoft calls the Entity Data Model. Generate a data model from a database, tweak the model in Visual Studio’s designer, then generate code to use in combination with LINQ (Language Integrated Query). I found this code snippet from Perry’s slides illuminating:

using (AdventureWorksModel model = new AdventureWorksModel())
{
var query = from c in model.Customer
where c.MiddleName == null
select new {
FirstName = c.FirstName,
LastName = c.LastName,
EmailAddress = c.EmailAddress }; 

foreach (var c in query)
 {
 Response.Write(String.Format("<p>{0}\t{1}\t{2}</p>",
 c.FirstName,
 c.LastName,
 c.EmailAddress));
 }
}

In the above code, AdventureWorksModel is an instance of an Entity Framework model, and as you can see makes for clean strongly-typed coding against the database.

But doesn’t Microsoft already have a shiny new object-relational layer called LINQ to SQL? Why bother with Entity Framework?

There appears to be considerable overlap, but the Entity Framework has higher ambitions. Perry said that LINQ to SQL is fine when your entities map closely to database tables, but Entity Framework is better for more complex mappings. It is not there yet, but it looks as if Microsoft will evolve the framework to enable model-first development and add features like the ability to define constraints in the model. All very familiar in the modeling world. The question may become: why bother with LINQ to SQL?

Entity Framework is not new; for example it is described in this paper from 2006. However, I had not looked at it before in any detail. You can download a beta here.

SQL Server 2008 will miss own launch party

Excellent session here at Tech-Ed from Francois Ajenstat (Director of Product Management for SQL Server) and others on new features in SQL Server 2008. It looks good: transparent data encryption; new policy-based admin; data compression that actually speeds performance; new datatypes including FILESTREAM, for queryable but unstructured data, and DATETIME2 for high-precision date/time; spatial data support so you can query by distance, for example; new entity-data framework (not the same as LINQ but works with it) for object-relational mapping; new REST-based data API code-named Astoria; richer reporting including features acquired from Dundas and removing the dependence on Internet Information Services.

It’s a significant upgrade, but when do we get it? I had previously assumed that it would be no later than February 27th 2008, the announced launch date for Windows Server 2008, Visual Studio 2008 and SQL Server 2008. Visual Studio will actually be available to developers three months earlier, at the end of November. Not so SQL Server. Ajenstat said the version available at the launch will be a CTP (Community Tech Preview), with the final version coming in the “second quarter” – in other words, perhaps as late as June 2008.

By way of compensation, an earlier CTP coming later this month should contain most of the new features, unlike the preview available now.

Ajenstat also noted that SQL Server “vNext” is set for 2010-2011. I’m betting on 2011 at the earliest.

Visual Studio 2008 release by end November, Sync Framework announced

News from Tech-Ed Developers in Barcelona: Microsoft has announced that Visual Studio 2008 will be available to MSDN subscribers “by the end of November 2007”. I’m a little disappointed not to find the RTM build here at Tech-Ed, but that’s not long to wait. Along with Visual Studio we get .NET Framework 3.5. The package includes LINQ (Language Integrated Query), and full designer support at last for WPF (Windows Presentation Framework) as well as WF (Workflow Foundation) and WCF (Windows Communication Foundation). It has taken a year since the first release of Vista to provide proper developer support for the frameworks which shipped with it.

S Somasegar, Corporate VP of the Developer Division, is also announcing the first preview of the Microsoft Sync Framework. Mary Jo Foley has a good summary. Interesting, given that  building online/offline synch into applications can be challenging. You can download it here. The description says it is “a comprehensive synchronization platform”.

He also has a few stats. He says:

  • Over 1 million professional developers use Visual Studio 2005
  • 17 million downloads of Visual Studio Express
  • 25% of Visual Studio developers are using Visual Studio Team System.

This last statistic is higher than I expected. I spoke recently to a Team System early adopter, who told me that while he was not exactly disappointed with it, nevertheless he had come across significant problems. His biggest issue was that you cannot manage work items across team projects, making it difficult for developers involved in several different projects. He also found the integration with Office poor, and the lack of a full Web UI frustrating. Nothing more than you would expect for a version 1 release.

Finally, Somasegar mentions a new release of Popfly Explorer with “an easy way to add Silverlight gadgets built in Popfly to web pages,” to quote from the brief press overview.

OpenSocial: where’s the identity story?

The media is ga-ga right now about Google’s OpenSocial story but most accounts are missing the key question here, which is about identity rather than APIs. An honourable exception is David Berlind – one of my top 10 tech journalists – who posed an interesting question at a press briefing but received an incomplete answer (a common experience). He asked how identities are mapped between containers.

I’ll explain. OpenSocial is an API for writing social widgets – JavaScript applets which hook into your relationships as expressed by people you’ve added as “friends”. Mark Andreessen has a great overview of the API, which is based on the concept of containers and apps. A container is a site such as MySpace or Orkut, which is where you’ve defined a set of relationships. An app is a widget or other JavaScript application that calls the OpenSocial APIs. The OpenSocial docs, which have just gone live, define a JavaScript API for widgets, and data APIs for People, Activities and Persistence, where Persistence covers retrieving and updating key/value pairs. All the data APIs use the GData protocol.

The big deal about OpenSocial is that many containers will support the same API, making it easier for developers to write apps. For example, music discovery site iLike, already big on FaceBook, can write one app that will more or less work in both MySpace and Orkut. And some new container site can start up, and by supporting the OpenSocial APIs be immediately attractive to developers with existing OpenSocial apps.

That’s definitely an advantage, but who are my friends? My Facebook friends? MySpace friends? Orkut friends? LinkedIn friends? If the social app concept is as big as people think it is (count me as a little sceptical), then the existence of multiple incompatible friend networks will soon become intolerable. Further, if I sign into a new container site, the big barrier to entry is that I have to recreate a friends network on this new site. Some sites workaround this problem in the crudest possible way. You have to give the new container site your username and password for some other container, and it pretends to be you and sucks out your existing contacts.

There is no simple answer to this. Even if you could do it, many people would be reluctant to merge multiple existing networks, because they represent different roles which they want to keep distinct. Social and business are the obvious ones, but that’s just the start.

There are several implications. First, the impact of OpenSocial on Facebook is probably less than some are implying. Facebook’s advantage is its bank of existing accounts and relationships. MySpace has lots of these too; but the arrival of OpenSocial has not changed that fact.

Second, the OpenSocial API is not such a big story yet. The big story will be when common identity gets added to OpenSocial. Right now, we have several containers vying to the one true identity provider for the internet, and a brave but so far unsuccessful effort by OpenID to free us from that alarming prospect. OpenSocial could evolve some federated way to unite identities. Or Google could try to make its Google Account system the center of our digital lives.

The identity wars matter more than the API wars.

Update

Others are also asking about this. Here’s a couple:

Dennis Howlett on a first Enterprise take

Bob Warfield who talks about a meta-social network

I’ll add more info as I find it, or by all means comment.

Programming Slimserver from .NET

I did a short article for Personal Computer World (Christmas 2007 issue, just published) on how to use the Slimserver API from VB.NET. This example app is the result. It is sadly incomplete but could be a starting point for an app that controls Slimserver.

Why would you want to do this? Well, Slimserver has a good web UI but programmatic control is useful as well. One possibility would be to create a smart remote using a Windows Mobile device. Operating a Squeezebox using the supplied remote is fairly arduous. I also like the idea of a really capable rich client for Slimserver, with advanced search, playlist management and so on.

Just in case you don’t know Slimserver … it’s a great way to manage your music on a network. It’s free, cross-platform, understands lots of music formats including FLAC (my favourite), and supports multi-room playback using either the free Softsqueeze, a Java player, or the Squeezebox hardware. It can also transcode to an MP3 stream, so that all sorts of devices can play what’s on your Slimserver.

Technorati tags: , ,

Kim Cameron hacked, commenters make fools of themselves

Kim Cameron has an amusing post on the aftermath of his blog being hacked and defaced over the weekend.

The reason for the hack: a security bug in WordPress. More proof of the problem posed by millions of apps out there on the internet with no update mechanism in place. Security fixes are made available, but not applied. WordPress has improved this somewhat by introducing an alert when you log-in to an out-of-date installation, but it needs to go further and provide something more automated. Personally I recommend the Subversion install, for those with command-line access; I used it for the 2.3.1 update and it worked well.

But I digress. The amusing part of Cameron’s post is his link to the comments on a news report describing the defacement. I believe in the value of comments, but some of the leading news sites are afflicted by knee-jerk commenters with time on their hands, who twist every post into another salvo in the OS wars. An news item about a Microsoft “security” expert being hacked seemed an ideal candidate (though I don’t believe identity is the same as security). “This is a shining example why you should host on Linux + Apache,” says one comment.

As Cameron observes, his site and blog is hosted by a third-party and runs on FreeBSD + Apache.

Conclusions? First, the thoughtless commenters on this kind of site are doing the community a disservice, by discouraging others with more interesting contributions.

Second, it shows what some have to put with just because of their association with a particular company.

Third, keep your WordPress patched.

Technorati tags: , ,