Tim Anderson interviews Scott Guthrie, a General Manager within Microsoft’s Developer Division. Guthrie runs the development teams that build CLR, ASP.NET, WPF, WPF/e, Windows Forms, IIS 7.0, Commerce Server, .NET Compact Framework, and the Visual Studio Web and Client Development Tools. The interview took place at the Mix07 conference in London in September 2007.
Topics include LINQ, Silverlight, the cross-platform CLR, and new features in ASP.NET.
Scott Guthrie
LINQ [Language Integegrated Query]
What are the advantages of LINQ for the developer?
SG: LINQ at a high level is about making querying of data a first class .net concept. In most applications, at least half of what we do is querying data. LINQ gives the ability to dramatically reduce the amount of data code, to more cleanly express your intent, and not be spending time managing connections and translating between objects.
A lot of people ask whether LINQ means not using stored procedures any more. The whole stored procedures vs. dynamic SQL is a great religious debate with valid reasons and arguments on both sides. The nice thing about LINQ to SQL and LINQ to Entities is that they both support the ability to retrieve data using stored procedures, as well as to update, insert, and delete data.
As a developer you design your data model first, add your business rules, and then at a later point you can decide whether your persistence is going to be done with dynamic SQL or stored procedures. If you want to use dynamic SQL you don’t have to write any code, but if you really want to go through stored procedures you can.
What are the security implications of LINQ?
SG: LINQ is a type-safe way to do data query, so when you work with a product name, you know it’s a string and when you work with the unit price you know it’s a nullable decimal and so on. There is no way to inject “DROP TABLE” or something like that into the unit price because LINQ to SQL says wait, this is a decimal. You don’t have to worry about SQL- encoding things manually, it’s all done for you.
What about the performance implications of LINQ?
SG: Rico Mariani on his blog has a pretty good series that covers LINQ to SQL performance, comparing it to a raw datareader. In his benchmarks LINQ to SQL was about 85% of a raw datareader. Typically people aren’t working with raw datareaders, they’re creating their own objects and collections and at that point it does become minimal.
In general with any abstraction the two things you want to look at are:
- Is the abstraction the right abstraction for what you are trying to do?, and
- Is the abstraction worth the performance hit you are going to take?
I’d say I think LINQ is definitely a good abstraction, and worth the performance hit even if it is going to be a 10-15% slower than the raw, most optimized code. ASP.NET and .NET are pretty darn fast as it is.
LINQ to SQL is currently SQL Server only. Is this a plot to get us all using Microsoft’s database server?
SG: No. The LINQ technology works with any data provider, so today there’s LINQ to NHibernate, which works with Oracle, DB2, MySQL and Access. Frans Bouma just announced LINQ to LLBLGen, his commercial object/relational mapper for .NET, and we’re going to be shipping LINQ to Entities next year, which has a provider model, and for which we already have a SQLite and a MySql provider. You’ll be able to use LINQ with any database out there.
Is Microsoft going to certify third party providers?
SG: I think it will be up to the database manufacturer to certify it. Frankly if Oracle or IBM bless a provider for an Oracle or IBM database, that would be better than if we did. But we’re working very closely with the manufacturers.
ASP.NET
What’s the thinking behind bringing MVC to ASP.NET?
SG: We’ve seen demand for an MVC framework on two fronts. One is for even more testability, having the ability to completely mock-up a request. We’ve also always seen with ASP.NET that some people like having the server control, postback model; some people say, “I just want absolute control.”
The MVC framework we’re coming up with is a fairly simple MVC model, it’s very clean, it’s a front controller model, and it integrates very well into ASP.NET so you can use ASP.NET forms authentication, session state, security, personalisation, caching, all the standard features, but with an alternative to the postback model where you have a more traditional controller-view separation and have complete control over your HTML.
The other thing is that for the view, you can use .aspx templates, master pages and all the Visual Studio tool features. It integrates nicely into ASP.NET and preserves everyone’s investment. You can have a single app that has both pages built with MVC and pages built with postback. People can choose.
What is in ASP.NET that integrates with Silverlight?
SG: We’re coming up with several features. You can use Silverlight with any back-end technology, but we’re going to make sure that there’s great ASP.NET integration. There are some ASP.NET server controls that help with using Silverlight inside a page. We have an ASP XAML control, and an ASP.net Media control. We also have support for web services, so you can call back to the server from a Silverlight app, and easily remote data back and forth. All the ASP.NET security and personalisation features work with Silverlight. Those are the ones to begin with, and over time we’ll have much more.
Offline web applications
Offline is a weakness in the Microsoft web application story, Google has Gears, Adobe has AIR, is Microsoft planning anything?
SG: We have a much stronger offline story than they do. One of the things that we shipped earlier this year is the SQL compact edition, which is a one megabyte database engine, free of charge.
But this is Windows only, right?
SG: Correct. But how does offline work? What does offline mean? If you close your browser, is your data saved, or not? If you’re filling out your expense report on a plane, and you clear your cache, did you lose your expense report or not? Those types of issues are ones that honestly no one has a good answer for. Certainly not Google Gears. Silverlight does give you offline data, but we’re being very careful to set expectations that this isn’t the be all and end all offline story. Developers will use our caching infrastructure and offline stuff, but we’re not going to try and do the guarantees that enterprise apps need, in order to build offline apps.
What we are doing right now is with SQL Compact Edition, a transacted database, that has very explicit policy management, and that can be easily distributed and put inside the app. It’s very explicit how synch works, and very explicit when you close an app what happens. We feel comfortable saying that is a great offline story.
But we’d need a WPF or Windows Forms app to use that?
SG: Correct, or any .NET app. It also works on mobile devices, it’s built into the new editions of Windows CE and mobile. So for enterprise apps, that’s a much better story.
So the idea of this web application where you can use it online and offline, and it’s fairly seamless and synchs up, that’s not something Microsoft feels is feasible?
SG: I think it is going to happen. But Google Gears has been pretty beaten up by the community. It’s asked, “How does Gmail work offline?” and right now there’s no answer, it doesn’t.
You can certainly use Google Gears with Silverlight. But the thing that we’re going to see with FireFox and IE is to provide more of a user model. So you could indicate, when the browser gets closed and you have some unsaved state, how do I prompt the user? You as a user can choose how much data to give a site, and when you’re going to clear it or not. You can choose who gets permission to see it. They’re not super hard problems, but those are the things browsers need. At that point you could build a great offline solution.
I’ve been talking to a lot of people who say, “Can you do offline?” Well you absolutely can. It’s just that it’s better to under-promise and over-deliver, than to over-promise and under-deliver. Google Gears sounded great and turned out to be a lot less than they thought, whereas if the same technology had been a little bit undersold, people would have been much happier with it.
What about the idea of taking Silverlight out of the browser?
SG: You can. You can run Silverlight in your own custom browser host, people are doing it. You can host Silverlight inside a dashboard or sidebar. The challenge is that when you’re saying this is a client application, people’s expectations are very high. The menu structure should look identical to the other applications on the system, the toolbar should match Windows, or match Mac. Increasingly on Windows you’re going to want a ribbon control.
We’re not going to try and claim that this is automatic with Silverlight.
If you want to have the richest desktop experience it does require significantly more than what’s going to be in AIR. We have a great solution with the full .NET framework, and with Silverlight we have a great cross-platform solution for browser-based apps.
Cross-platform Silverlight
How significant is the agreement with Novell/Mono over Silverlight/Moonlight?
SG: We’ve had a relationship with Novell for about a year. The approach that we’re taking with Silverlight is interesting in that we are actually shipping some product on Linux, which is the Silverlight media codecs. So that is a very big step. Where the Silverlight deal is also unique is that we are going to be supporting the Moonlight project on all flavours of Linux, whereas in the past it’s typically been with just a few distros.
Is there going to be a test suite to certify that Moonlight is working as expected?
SG: We’re going to be giving the Moonlight project all of our test suites that we use internally, and all of our specs. It’s not a formal certification, it’s what we use to test the product ourselves. We want to make sure we have a highly compatible implementation.
Will you ensure that it is feature by feature parallel, that there’s nothing that’s going to work on Windows that will not work on Linux?
SG: That’s the point, yes. Ultimately, with Silverlight we want to have a great web client experience and you can’t have a great web client experience that only runs on 80% of machines. One of the things we did with our Mac port is we didn’t release any features that didn’t work on the Mac. We had some early features that were working on some browsers and not others, and we said, those features will not ship in this upcoming CTP or beta, until it works the same everywhere. People see we’re pretty serious about cross-platform.
I’ve seen comments from Mac users that have used the Silverlight 1.0 release, say for the Halo 3 streaming video, to the effect that “I didn’t think video on the web worked this well, and I’m pretty shocked that when I right-clicked on the control it says Microsoft.”
As a company we need to build our credibility in that space. That’s why we’re in the Novell Moonlight project. Cross-platform is important and having a quality implementation is very important.
Cross-platform CLR
With the full .NET CLR, the Compact Framework, and now Silverlight, is the number of .NET runtimes getting hard to manage?
SG: We only have two implementations, two source trees. The desktop framework and Silverlight are the same today. We build from one source tree and compile to both.
Although you end up with two separate installations on your machine?
SG: Correct. But the architecture is 100% the same, the source tree is actually the same. That means any innovation in code generation or garbage collection we make in one CLR branch affects both.
For mobile devices there’s a separate set of issues. It’s about battery life and CPU power. You make trade-offs and decisions differently. For those types of environments, we use the compact framework because it is tuned specifically for that.
So there will be code sharing between the compact framework and Silverlight?
SG: For Silverlight on Mobile, there’ll definitely be code sharing. We also share some code between the compact framework and the desktop CLR, so it’s not like they’re completely separate.
Silverlight versus WPF [Windows Presentation Foundation]
Does Silverlight mean that XBAPs [browser-hosted WPF applications] are no longer necessary?
SG: No, I think they still are interesting. I think generally when you want to run in the browser, there’s a couple of reasons to do it. One is you want the maximum possible consumer reach. There Silverlight makes more sense, because that with the Linux deal that will run on every desktop operating system. There are other scenarios where you want the richest possible experience, but you still want to deliver it in the browser. And that’s where XBAPs do make sense. For enterprise apps, and for software as a service subscription based apps, I think XBAPs make a lot of sense.
One of the nice things is that the code you write for SIlverlight is upwards compatible with WPF. We are hearing a lot of interest from ISVs who want to able to maintain a single code base, and have the broadest possible client reach, and at the same time have a super-depth client offering that frankly 95% of the customers will buy.
Is WPF meeting Microsoft’s expectations in terms of adoption?
SG: Yes, I think we’ve had 300 or 400 ISVs actually shipping apps. There’s a long list of apps that are about to go live, and we expect to see a lot more announcements in the next 6 months.
Our Expression suite of products are built using WPF. It’s a powerful statement when you build your own tools on top of it. There are other Microsoft products that haven’t been released yet that are built with WPF.
Release dates
What’s the timescale for the release of Silverlight 1.1?
SG: We haven’t publically committed to a date. We have said it’s next year [2008], for both the runtime and the tools.
How does this relate to the release of Visual Studio 2008?
SG: Visual Studio 2008 itself will ship later this year [2007], and officially launch in February 2008.
So the Silverlight piece will be an add-on?
SG: Yes. We’ll have a separate add on to VS 2008 for Silverlight.
What are the new features in ASP.NET?
SG: They will include new ASP.NET AJAX features, ASP.NET features for Silverlight, dynamic data controls and features for making quick data access apps, the MVC framework, and REST-based data support. Those are the current set of features. It will be released next Spring.
In general we are trying to avoid giant sea changes and instead have fairly regular updates of new features, and have VS 2008 be able to do multi-targeting, so customers can choose to upgrade the tools, but keep the runtimes older. That’s a good blend where customers can move at their pace but also have some predictability and some regularity.
If you look at job postings, if you look at active site growth, .NET is now in theory the most popular server side technology for web apps, you can measure it different ways, but there’s three or for different indexes that have it number one. If you look at client development, with Windows forms and WPF, we have a great desktop story. And now with Silverlight we have a great RIA story. The combination of having the three of those with a common .NET programming model that lets you use whatever language you want, VB, C#, Python, Ruby, Javascript, a common set of APIs to work with, and then be able to use Visual Studio Expression, I think is a pretty powerful opportunity.
Microsoft versus Adobe
Do you think people will switch from other technologies to Silverlight, with the new cross platform abilities?
SG. From a pure developer perspective, there isn’t that big a developer base outside the Microsoft platform for the client today. There’s Flash from a media perspective, and from an interactive designer perspective there’s absolutely a lot of people there, but Flash is very distinct from Flex, and they’re not compatible. So Flash designer doesn’t understand Flex, and Flex developer doesn’t understand Flash. The Flex total developer population, I think Adobe’s estimated at 20,000 developers, six months ago. Our client application development base at Microsoft is in the 7, 8 million range. We certainly want those 20,000 developers to move on to Silverlight, but it isn’t essential to our success.
Those figures might be different if you just looked at web development.
SG: For web developers, we probably have 50 per cent. Flex is probably a twentieth the size of the ASP.NET developer base. I don’t mean to minimize it, but we’re going to have a really compelling offering with Silverlight that’s richer and we’ll have better tools and language support. The fact that there’s healthy competition in this space brings out the best of both.
Is creating a binary and proprietary system trying to bury 40 years of RFCs and standards a “healthy competition”…?
Excellent interview on a broad range of topics. Thanks Tim.
I find it sad to see a respectable developer embarrass himself with inaccurate and misleading claims.
I guess you’re meaning me then…?
What exactly was inaccurate and misleading…?
Personally I took it as a swipe at Guthrie; but since the comment is anonymous and does not offer any argument or evidence, or even say which claims it refers to, I suggest you do not take any account of it.
Tim
The comment doesn’t look so anonymous to me!