Welcome to MSDN Blogs Sign in | Join | Help

Get it from http://silverlight.net/GetStarted, along with the developer tools, documentation and the June update to Blend 2.5.

image Lots of new goodies – as ever, Scott Guthrie’s blog has a comprehensive guide. I’m not going to try and compete with him today: my family tell me it’s time for the weekend to start!

If you’re looking for something to try out, there’s an updated version of Hard Rock’s Memorabilia site, but the really cool new site out there is a graphical adventure called Buddy Knavery, written in the style of old-school games like Zak McKracken and Maniac Mansion. I’ve already wasted far too much time playing with it instead of updating this blog post! There’s some amazing work here – hard to believe that it was all written by one guy in his spare time…

PDC2008: Microsoft Professional Developers Conference If you're into any of the technologies that this blog covers, you'll be mad if you miss the Professional Developers Conference this year. It's actually been three years since our last PDC, so we're overdue! I'm really excited about all the things we're going to be covering at the PDC this year: those of you who have attended the conference in the past will know that we only run a PDC when there is major news to share, and we've got some killer content this year. Registration opened yesterday, so now is a good time to get ahead of the crowd.

We keep most of the session titles under wraps until the event starts - this is a future-orientated conference, after all. But even from the session abstracts we've posted so far, you'll see sessions that cover the Live Mesh, Internet Explorer 8, Windows 7 (including details on how to program for the multi-touch feature we showed off this week at Walt Mossberg's D conference), as well as really hardcore deep-dive sessions on topics like the internals of the Silverlight rendering pipeline and our internal usage of Team Foundation Server.

But there's one other thing that has me salivating about the PDC as a WPF developer. Jaime Rodriguez (content owner for the pre-conference) has secured none other than Charles Petzold to deliver a one-day session on WPF. Charles Petzold! If you've been living on Mars for the last twenty years, Charles is a titan of the Windows programming world, having written several seminal titles, including no less than two books on WPF. Indeed, Jeff Atwood describes him as "the guy who put the h in hWnd". Charles is a hero of mine - he writes concisely, precisely, knowledgeably and articulately. I remember bringing a stack of copies of his first WPF book to a team meeting; the product architects were as eager to read his verdict on their platform as a Broadway theater director is to see the early papers after opening night.

Charles isn't one of those speakers who seems to be permanently on the conference circuit - in fact it's pretty rare that you get the chance to see him "live" at all, even though he delivers some amazing lectures when he does present. This is a unique opportunity that you just don't want to miss if you're building your mastery of WPF. Here's what Charles wrote for the pre-conference abstract:

This session will go deep into WPF and explain the infrastructure and services that WPF introduces. Begin with a solid foundation in dependency properties. Advance to the retained-mode graphics system and visuals. Explore the layout model, routed input events, and data binding. Discover control customization with styling and templates. Finish the day with an array of powerful graphics facilities, including animation and 3D. After attending this code-heavy, few-slides session you will have all the great insights needed to develop responsive and dynamic WPF applications that are easy to build and maintain.

One day of Charles talking about WPF - that's worth the conference admission price alone!

I haven't seen these training videos receive nearly the coverage they deserve, so I wanted to try and "bump" them onto the radar.

Silverlight 2 Screencasts My erstwhile UK colleagues Mike Taulty and Mike Ormond have been hard at work over the last few weeks recording an amazing series of Silverlight 2 training screencasts. All free for the taking, these fifty videos provide a comprehensive guide to all matters Silverlight: from basic topics such as layout, controls, data binding, and styling to advanced topics like sockets, cross-domain requests, multi-threading and HTML interop. If even that's not enough, there are some great tips and tricks that go beyond the documentation: loading assemblies dynamically, embedding fonts and creating custom splash screens.

Many screencasts are too long or too ponderous - they don't suit the rapid-fire medium of the Internet. These are all short - mostly just a couple of minutes in length, and they're well edited to remove anything extraneous. Highly recommended - please produce some more, Mike and Mike!

Check them out here: http://www.silverlightscreencasts.com. Oh, and of course, you'll need Silverlight 2 Beta 1 to watch them!

WPF_Logo Today I'm excited to announce the public beta availability of a major new release of WPF. Since we shipped .NET Framework 3.5 late last year, the team has been hard at work at a new release that adds many supplemental features, fixes a good number of bugs, offers many performance optimizations, and includes a new streamlined installer for a subset profile of the .NET Framework optimized for client scenarios. This new release will ship as part of .NET Framework 3.5 Service Pack 1 later this summer; the beta release is an early preview of these enhancements. In this blog post, I want to provide a broad overview of the new features in this release, focusing on WPF.

 Download links:

Deployment
It's been interesting over the last year or two to see the balance between business and consumer applications developed using WPF. Our early expectation was that WPF would be used primarily for consumer software: the assumption was that animation, rich media, flow documents, 2D and 3D graphics etc. would be primarily of interest to those kinds of applications. In fact, it's been surprising how many enterprise applications have taken advantage of it: architectural patterns such as the data templating and binding model and the separation of UI from code have turned out to be even more compelling reasons to adopt WPF in many cases.

Although Windows Vista includes WPF out of the box, we recognize the need to provide a lightweight way to deploy the platform to desktops running Windows XP. If you're distributing a consumer application over the Internet, it's key to have a setup package that downloads and installs quickly, while providing the user good feedback on its progress. We've put the .NET Framework on a diet, and we've now got a solution for those kinds of applications. As well as the full .NET Framework, we now have a Client Profile that weighs in at about 25MB (roughly the same size as Acrobat Reader), installs in a couple of minutes, and provides a customizable install experience.

How did we reduce the size of the .NET Framework? We removed many assemblies that aren't typically used in client application scenarios (it would be an esoteric client application that needed ASP.NET to execute locally, for instance). The file list was selected over the past year through profiling of numerous client applications; at a high level, it includes the core CLR and base class libraries, WPF, Windows Forms and WCF. We also took advantage of some new compression technology to shrink the package considerably. You can still target the full .NET Framework, of course - this is just an additional option. And it's important to note that the actual shipping assemblies are identical in both the Client Profile and the .NET Framework as a whole.

In Visual Studio 2008 SP1 (also in beta today), you can target the Client Profile through a checkbox in the setup project template. You'll of course get a warning during the build process if you have this option set and your project has a dependency on assemblies missing from the Client Profile. When you compile the application, you will have the option to package the Client Profile installer and your application together into a seamless, unified installer for the best possible experience. We provide a tiny (~200KB) bootstrapper package that keeps to an absolute minimum the time between an end-user clicking the installer and seeing results. We even do a full ngen on the .NET Framework files asynchronously during the install process, so that nothing competing with the startup of your application when it runs for the first time. Despite all this, you should expect to see the full setup complete in a matter of just a few minutes.

How does an application know if it has enough of the .NET Framework to execute? I'm glad you asked that question! Only applications that have been compiled to target the Client Profile will contain the special manifest that indicates that they are supported on machines with just the subset. If you try and execute an application that isn't appropriately marked, the Client Profile will pop up a dialog that will help the end-user update to the full framework. It's also important to note that the Client Profile is fully compatible with ClickOnce.

For end-users who have opted into Windows Update, the .NET Framework Client Profile will be upgraded to the full .NET Framework through a background drizzle process so that applications that target the full framework will be able to take advantage of the increased number of people with WPF installed on their machines.

Lastly, shortly after Visual Studio 2008 SP1 ships, we'll be releasing an add-in that will provide developers with the ability to completely customize the look and feel Client Profile installer - changing background graphics, etc. We're also working with third-party installers such as InstallShield to build Client Profile support into their setup packaging technologies.

One other deployment feature unrelated to the Client Profile - we've slightly loosened up the policy for managed executables run from a network share to allow them to run with full trust. This is a popularly requested change, as Brad Abrams' informal poll testified.

Graphics
The shipping .NET Framework 3.5 included a few powerful enhancements to the WPF graphics engine; in particular, the UIElement3D and Viewport2DVisual3D classes that provide support for fully interactive 2D elements on 3D surfaces. We also made substantial performance improvements to layered windows and fixed occasional animation stuttering issues. But we've gone way further with this release, adding a number of heavily-requested graphics features.

clip_image001As demonstrated at MIX08, 3.5 SP1 adds support for HLSL shaders with the ShaderEffect class (see image to the right), allowing an almost unlimited range of visual effects to be applied to WPF content. Shaders are implemented entirely on the GPU (if you have Pixel Shader 2.0 support in hardware), or otherwise with an efficient software implementation - this means you can add wild effects like flares, lensing, distortions or blurs without adding a significant burden to the CPU.

You can target the properties of a shader effect with data binding or animation, allowing for even richer effects, and because WPF is a fully-integrated platform, any controls on which a shader effect is applied remain fully interactive.

If that wasn't sufficient, by the final release of .NET 3.5 SP1, we'll have support for even deeper DirectX integration. Essentially, any Direct3D surface can be used as a brush for WPF content through the new D3DImage class, enabling you to overlay or blend Direct3D content interchangeably with WPF content. You can use multiple D3DImage classes simultaneously, and because they are still rendered by DirectX, there is no major performance impact. You can even alpha-blend Direct3D content. If that wasn't enough, you can even take a Direct3D surface and apply it as a texture within a WPF 3D scene - mind-blowing! More information on these features is available at Greg Schechter's blog.

We've got a vastly improved WriteableBitmap class that enables efficient image manipulation. WriteableBitmap provides a bitmap image that is mapped to system memory, allowing you to change the contents and have it automatically render to the screen (taking advantage of the retained mode model in WPF). The original implementation of this class allocated a new bitmap with every frame update, making it pretty slow for most scenarios. The new replacement is fast, synchronized with UI changes and has constant memory usage, enabling tons of new scenarios in WPF - for instance, paint programs, fractal renderers, and software webcam output.

We've made some minor granularity improvements to the tiering APIs, for instance, enabling you to verify whether pixel shaders are supported in hardware. We've added nearest neighbor image sampling as a bitmap scaling mode. Last, but not least, we've finally fixed the most common bitmap effects in WPF - no longer are blur and drop shadow software-rendered: if you use the new blur and drop shadow API introduced in SP1, they'll be fully accelerated using the GPU. The legacy blur and drop shadow APIs have also been hardware-accelerated, providing immediate, huge improvements to performance for applications which make use of those capabilities.

Performance
As Ian Ellison-Taylor, the General Manager for WPF, is fond of saying, we're never done with performance. As with any high-end graphics platform, there are always optimizations that can be made. In this release, we've made major strides forward with performance and memory usage of WPF applications across the board. You'll notice these improvements regardless of whether you're targeting WPF 3.5 SP1 or an older version.

"Cold" startup of an application is one area where people are particularly sensitive to performance. There's a lot to be done at this point in time: assemblies need to be read in from disk, their manifests need to be checked for strong name verification, and any dependencies need to be loaded and checked also. As an application author, you can have a substantial impact on the startup of your application by being sensitive to this: you should load only what you need to display the initial screen and delay the load of other assemblies until they're needed. If you need Windows Forms to display a couple of forms buried within your application, don't put a dependency in the executable that's first loaded - it'll add a couple of seconds to your application startup. We've gone through the WPF assemblies and done a lot of optimization work to ensure that we get your first pixels on-screen as quickly as possible: by RTM, we think cold startup will be improved by up to 45% depending on application size and scenario. In general, the bigger the application, the more gain you'll see.

image For XBAPs, we've switched to HTML for the initial loading screen, so that you immediately see progress when you click on an XBAP rather than being greeted with a rather confusing blank browser page for the first couple of seconds. There are also some additional cold-start improvements on top of those mentioned above for XBAP scenarios which give an additional 10% boost.

By RTM, we'll also have a "splash screen" support in Visual Studio 2008 SP1 to minimize the work in building applications that display an initial screen immediately, having a big impact on the perception of an application's responsiveness and reducing the risk of an end-user accidentally firing up two instances. You can either designate an image as a splash screen by marking a bitmap resource with a build action of SplashScreen, or supply your own fully customizable class based on our template that is loaded prior to the Application object during startup.

It's not just cold-start scenarios where we've been hard at work optimizing WPF. We now have container recycling for controls based on the VirtualizingStackPanel class (such as ListBox, ListView and TreeView). This is an opt-in feature (you have to set the VirtualizationMode attached property to enable it) due to some subtle semantic changes to these controls' behavior, but it can provide up to a 40% scroll performance improvement by reusing the UI elements that go out of view during scrolling wherever possible. We also now offer deferred scrolling as an option (similar to the way the Outlook inbox scrollbar works).

There are lots of other control virtualization optimizations too: TreeView now offers virtualization (perfect for an Explorer-like scenario), and columns can now be virtualized, making it much easier to build an efficient DataGrid control. And we've identified and fixed a few other performance "cliffs": improving some text rendering and frequent z-order manipulation issues.

New Controls
It's been a long time in coming, but we're finally adding the much-requested DataGrid control to WPF. This will ship out-of-band at first, just after we release 3.5 SP1; it will take advantage of the various virtualizing optimizations mentioned above so it should be relatively efficient, and of course, like all WPF controls, it will be possible to completely change the look and feel of the control through templates. We made a number of API enhancements to better support the DataGrid scenario: multi-selectors, null value auto-conversion, transactional item editing, alternating row support, item-level validation - and of course, all these are available to third-parties to improve their own high-end data grid controls.

Another oft-requested control is the Office Ribbon, and I'm sure you'll be pleased to know that we're also shipping an implementation of that control, also out-of-band, before the end of the year. The ribbon will be fully implemented in WPF, will be compliant with the UI design guidelines and have an intuitive collection-based API.

The third control does ship in-box with .NET Framework 3.5 SP1, and is a richly-functional WebBrowser control. Since the initial release, WPF has enabled web content to be displayed via the Frame element, but that had a number of limitations: you couldn't interact with the content of the frame programmatically, HTML content could only be hosted from a URL (not from an in-memory stream or string), you couldn't navigate programmatically through the history, and you couldn't interact with any JavaScript on the page. The WebBrowser control offers all those capabilities, enabling much more seamless interoperability between WPF and HTML content. It also provides a great way for WPF to host Silverlight content - just point it at the HTML file that hosts the Silverlight .XAP file. One other nice touch: it supports partial-trust mode for use within XBAPs, enabling an XBAP to include an inline frame of HTML content that can be interacted with. 

Other Enhancements
There's a number of other small but useful enhancements in this release that don't really fit under any of the above categories. We now support string formatting for data-bound text: this saves you having to write a class that implements IValueConverter just to do something as simple as formatting a number. We've done some work to both simplify and deepen support for LINQ to XML and LINQ to DataSet for data bound members. Lastly, we've extended our Firefox browser support beyond the XBAP capability in 3.5 by adding native support for ClickOnce (.application files).

The WPF designer in Visual Studio 2008 SP1 has also undergone a major overhaul. It's faster, for starters, and we've done a lot of work to support some of the more esoteric XAML edge cases that previously caused the editor problems. There's now an event tab in the properties tool-window, which delivers parity with Windows Forms for creating and viewing event handlers from the designer. One feature that I know will be particularly appreciated by a few folk who've harangued me over the past few months in our labs is support for XAML refactoring - something that was previously a rather painstaking and menial task. Finally, there's support for BAML runtime debugging, enabling you to catch errors that would otherwise be hard to pin down.

Conclusion
It may be a slightly awkward name, but .NET Framework 3.5 SP1 represents a major new revision of WPF that brings it squarely into the prime-time. I genuinely believe we've nailed all the most common criticisms of WPF as a desktop platform with this release: a much better deployment story, some amazing new graphics capabilities, across-the-board performance improvements, the three most commonly-requested controls, and an improved editor experience. When you add all this up together, you can see why this servicing release is such a significant step forward for WPF - it opens up new territory and shows the growing maturity of our strategic next-generation UI platform for Windows.

Right now, SP1 is a beta release; we plan to ship the final version later this summer. As with any beta release, there are always a bunch of caveats relating to quality, and I really want to emphasize those a little more strongly this time round. I do not recommend installing this beta release on your main development machine. Due to some complex build timing issues, this release is incompatible with Silverlight 2 Beta 1; it will, however be compatible with Beta 2 when it ships in a few weeks' time. There's also a glitch we discovered in late testing that can cause Blend to crash; a hotfix is available to the 2.5 preview release that fixes this, and we'll of course have a full solution in place prior to the final release of SP1. Lastly, if you're running Windows Vista, you should install Vista Service Pack 1 prior to installing Visual Studio 2008 SP1 Beta. Hey - if this was done, we'd ship it - that's why we call it a "beta"!

One last thing - although I've majored on the improvements to WPF itself, this service pack also contains enhancements to ASP.NET, ADO.NET, WCF and Team Foundation Server. For more details on these broader changes, Scott Guthrie's blog provides the best overview.

wpfweek So where can you go to find out more about this release? If this blog post isn't enough, you should check out the "week of WPF" that starts today on Channel 9. For seven days in a row, we'll post a series of interviews with the core WPF team, talking and demonstrating the new enhancements in this release. Adam Kinney and I had a lot of fun filming these, and I think you'll enjoy them. In the first interview, I sit down for a chat with Ian Ellison-Taylor and Kevin Gjerstad about the philosophy behind this release and the long-term direction for WPF. Check it out!

Congratulations to Martin Grayson and team for building one of the smartest Silverlight 2 demonstrations I've seen to date. I saw parts of this demo a month ago when I was in the UK, and I'm delighted it's now released.

image image

Whether or not you're involved in the healthcare sector, this demo does a great job of showing how Silverlight 2 can transform web-based application development. We're already starting to see many real-world applications using Silverlight 2, even in its beta 1 stage; I'll post a list of the best ones I've collected before the end of the week. With a beta 2 release not far away, momentum is continuing to grow. And keep an eye on this blog first thing Friday morning for a separate exciting announcement (he said elusively)...

I've posted a few times about issues relating to enterprise distribution of Silverlight, and I thought I'd mention one additional topic that came up during a customer tour that I've been on for the last ten days.

Computer Management If you're a systems administrator, one of the aspects of Silverlight that concerns you is probably controlling the distribution of updates. In general, enterprises like to control their desktop and laptop environments to ensure no sudden surprises are caused (for example, by a runtime update that breaks a commonly used application). So some people may wish to dial down the update settings that are optimized for end-users when Silverlight is running in a corporate environment.

Silverlight supports enterprise rollout via WSUS and we provide guidance on how to roll it out across an enterprise via other means such as Group Policy (using the EXE-based installer). Silverlight is installed via a normal MSI plus an MSP-based patch which can be chained through a variety of means. Updating Silverlight to the latest revision can be done automatically or manually (by pushing out the latest MSP).

There are two different knobs an enterprise administrator can turn to control how updates are applied to the runtime:

  • Firstly, if the enterprise sets the UpdateMode DWORD registry value under the HKLM\Software\Microsoft\Silverlight key to 2 then the Silverlight auto-updater will be disabled (i.e. it won't automatically check for updates or try to install them). This is the equivalent to an end-user choosing the Silverlight Configuration dialog and manually disabling auto-updates from the Updates tab.
  • Second, the feature that allows a non-admin to patch Silverlight on Windows Vista without requiring admin elevation is not a Silverlight feature: it's a feature of Windows Installer which can be disabled if the admin wants to do so (and is indeed off-by-default in Windows Server 2008). You can switch this off using Group Policy by setting the DisableLUAPatching property. More information on UAC Patching can be found on MSDN.

If an enterprise disables the LUA patching feature in MSI and does not give their users administrative access to machines then users will not be able to install, remove or patch Silverlight. Only the enterprise administrator could touch the files. Obviously, it's important that someone is actively monitoring and distributing patches; as with any runtime for any operating system, without any means to fix potential security vulnerabilities, users' machines are at risk.

Many thanks to Bob Pomeroy for providing the technical detail behind this post. Hopefully this is helpful to those of you who need to persuade your IT department that Silverlight is "safe" for corporate adoption.

We released a minor maintenance update to Silverlight 1.0 over the weekend (internally known as GDR3, where GDR stands for "General Distribution Release"). I'm sure most readers of this blog already have Silverlight 2 Beta 1 installed on their own machines, but if you're building a site for the tens of millions of users that already have Silverlight installed on their machine, you'll be pleased to know that we're continuing to service the 1.0 release to take account of customer-reported issues.

image The latest release is live now on the web for both Mac and PC; it reports itself as 1.0.30401.0 (where the build number indicates that it was compiled on April 1st). The changes are minor in nature and shouldn't affect existing applications; they include an audio bug fix for nForce 4 motherboards, an update to support custom parameters in ASX playlists, fixes to font support on Mac OS X Leopard and improved multi-language support during installation and update.

As ever, the way to check which version you're running is to right-click on some Silverlight content and choose the Silverlight Configuration context menu option; on a Macintosh, it's visible by browsing to the Silverlight run-time in its installation location in the browser Plug-Ins folder. Incidentally, it seems that most people don't realize that we publish release notes that highlight the deltas from one release to another (admittedly, the link is pretty buried, so it's worth adding to your favorites).

The jolly chaps at Conchango are setting up a user group in London to focus on Silverlight, and the first meeting is tomorrow! By chance I'm actually in the UK right now on something of a customer tour, so I plan to be there myself and give a bit of a status update on Silverlight 2 and WPF. Should be a fun evening - pizza and beer is provided, and the event kicks off at 6:30pm.

Full details and registration information are on the Facebook event site or on one of the Conchango blogs. If you're working in London, why not head over to London Bridge and come and say hi?

Just loved the team's latest Silverlight video. Props to Adam, Laura, Nic, Monica, Dan, Scott and Tina.

WV-SP1_h_rgbAs many people will have noticed, we released Windows Vista Service Pack 1 this week (read about the notable changes here). Aside from the inevitable bug fixes and enhancements to support new hardware types, one of the underlying changes is that SP1 brings the Windows Vista and Windows Server 2008 codebases together.

This is a big deal, but it's surprising how few people have noted it: this is the first time we've ever had a common codebase for Windows that goes all the way from a budget consumer PC right up to a mainframe-class datacenter server. Internally to Microsoft, this makes it easier for us to provide sustained engineering on the product: if we want or need to update a system component, we only have to produce two binaries (x86 and x64) for all languages and product editions. Compare that to the days of Windows XP/2003, when we had maybe 25 different language editions and x86 and x64 variants for both client and server OS releases, and you can see how the testing matrix has become a lot simpler! Externally, the benefit is of course that simply by updating to SP1, you get the benefit of a kernel that has been through an extensive server-hardening process. (Check out this Channel 9 video I recorded last year with Eric Hanson to get just a small flavor of the stress testing work that we do with every build.)

Beyond the kernel and subsystem improvements, Windows Vista SP1 brings major improvements to IIS 7. Comparing the original Windows Vista "RTM" version against that shipped with SP1 is like comparing the basic and premium models of a car - the SP1 version of IIS contains all the features added to create the server-strength edition (with the caveat that Windows Vista SP1 is obviously not licensed for use as a commercial-scale production Internet web server). As a crude measure, compare the two screenshots of the administration console below - the left image is of Windows Vista RTM, the right is of SP1:

IISComparison

You'll see other changes to Windows Vista that affect certain relatively niche groups of developers. Direct3D receives a minor update to 10.1; there are new APIs to control the Data Execution Protection and Kernel Patch Protection features; and there are new cryptographic and random number generation algorithms available for developer use. As ever, more information about these features can be found in the Windows SDK.

As a .NET developer, you'll notice that Vista SP1 updates the installed .NET components to .NET Framework 3.0 Service Pack 1. The good news is that image many of the enhancements from .NET Framework 3.5 are included in 3.0 SP1 - for example, of the list of fifteen enhancements to WPF described in this blog post, everything apart from System.AddIn and the Firefox XBAP support is included in Windows Vista SP1. This is a little bit confusing, but it probably helps to know that each of the last .NET Framework releases have built on top of each other, rather than existing side-by-side. The diagram to the right demonstrates this.

As a result, all the CLR and class library enhancements that were made to existing assemblies in 3.5 are incorporated in 3.0 SP1 (mscorlib.dll is updated from 2.0.50727.312 to 2.0.50727.1434); the binaries are identical to those shipped with .NET Framework 3.5. The only difference between 3.0 SP1 and 3.5 is that 3.0 SP1 doesn't have any of the new assemblies ("green bits") added in 3.5 for new capabilities like LINQ. Of course, if you've already installed .NET Framework 3.5 on your Windows Vista machine prior to installing SP1, you'll still have the full 3.5 release on your machine afterwards.

The many other nice features in SP1 for end-users and IT Professionals are outside of the scope of this entry, but suffice it to say that some of the major peeves have been addressed: UAC is less aggressive, file copy performance has been greatly improved (and it takes less time to "estimate"!), application compatibility is better, resuming from standby is faster, and over a thousand bugs have been fixed. For more detail on all these items, check out the main Windows Vista Service Pack 1 site.

It's worth noting in closing that many of the above fixes at least have been delivered via Windows Update over the last twelve months. We're moving away from the old-school approach where service packs were the main way that fixes were delivered to a more agile model where patches are available via Windows Update (or its enterprise equivalent, WSUS) and then rolled into a service update at a later stage. The goal is to reduce the gap between us fixing something and you seeing the results of that fix.

Well, what are you waiting for? Go install Windows Vista Service Pack 1!

Following on very nicely from my last post on deploying Silverlight content to your own production server, I'm pleased to announce that Silverlight Streaming has added full support for Silverlight 2 applications. As well as adding the basic support, the team have put a lot of work into simplifying the process of uploading and validating your application. Here's a basic walkthrough:

  1. Create your Silverlight 2 application using Visual Studio or Expression Blend, do all the usual test / debug steps, etc.
  2. Create a manifest file named manifest.xml, that describes how you want the control to be hosted. Here's a simple sample you can use as a template:
    <SilverlightApp>
      <version>2.0</version>
      <source>PopTheBubble.xap</source>
      <width>400</width>
      <height>300</height>
      <background>white</background>
      <isWindowless>false</isWindowless>
    </SilverlightApp>
  3. Zip your application .xap and manifest.xml files together into one file.
  4. Go to silverlight.live.com and upload the application.
  5. You're done! Now you can embed the resulting content in any web page with an iframe or the sample code provided.

As a small example, here's a mini-game called PopTheBubble that you can learn to build by following the Silverlight 2 fundamentals hands-on lab. Click on as many bubbles as you can before the timer runs out - have fun!

sl_button Deploying Silverlight content to a production web server is a pretty easy process. Despite occasional misconception, Silverlight doesn't require a Microsoft-based web server: Apache can host up Silverlight content just as happily as IIS.

But there's one little gotcha: web servers are typically configured to only serve up a limited set of known file extensions as static content. That's all well and good, but Silverlight introduces two new file extensions (.xaml for loose XAML files and .xap for the zip-based binary packaging format). As a result, you need to add the MIME types for those file extensions to your web server so that it recognizes Silverlight content appropriately. Here are the MIME types you need to add to the server configuration:

Extension MIME Type
.xaml application/xaml+xml
.xap application/x-silverlight-app

That's all you have to do. Unfortunately, it's not possible to provide generic instructions for how to add MIME types, as it varies from server to server, but here are some links for various common web servers:

While you're updating the list of MIME types served, you might want to also add the relevant types to your web server to support WPF and ClickOnce applications. Here are the additional items you'll need:

Extension MIME Type
.manifest application/manifest
.application application/x-ms-application
.xbap application/x-ms-xbap
.deploy application/octet-stream
.xps application/vnd.ms-xpsdocument

But what if you're hosting your Silverlight application on a shared hosting service and your hoster doesn't give you access to change these settings? The good news is that there are two options available to you. Obviously, you could take advantage of Silverlight Streaming, our free hosting service for up to 10GB of Silverlight content.

Alternatively, you can "cheat" the web server by renaming the XAP file extension to a compatible MIME type. The XAP container is ZIP-based, so you can simply rename the output file from .xap to .zip and change the source param within the object tag contained in the HTML file to point to the new file location. Click on this hyperlink to see the technique in action - it's a plain HTML file that points to a ZIP file (containing the Silverlight content).

One last piece of good news: IIS 7, included in Windows Server 2008, already includes all the relevant MIME types for both WPF and Silverlight, including both .xap and .xaml extensions, so if you're using Windows Server 2008, you're all set. (The same applies to a clean install of Windows Vista SP1, although if you upgrade from the RTM to the SP1 release, your settings will remain unchanged until you uninstall and reinstall the IIS feature).

win-SDK_rgbIt can be pretty hard to keep everything up-to-date on a developer workstation these days. With so many CTP releases, betas, and service packs, I know I often realize that my own machine is behind in one area or another.

One particularly worthwhile update that might have missed your attention over the last couple of weeks is a new release of the Windows SDK, focused on enhancements in the .NET Framework 3.5, Windows Vista SP1 and  Windows Server 2008. Amongst other changes, this updated SDK has new documentation that covers all the new classes in WPF 3.5 (e.g. UIElement3D, System.AddIn, LINQ-based data binding), a variety of new samples for common Windows services such as User Account Control, Windows Search, Windows Error Reporting, Speech, and a range of shell APIs. If you've not installed the Windows SDK before, another incentive is a ZIP file containing over 100MB of sample WPF code (check out %ProgramFiles%\Microsoft SDKs\Windows\v6.1\Samples\WPFSamples.zip).

After installing the Windows SDK, you'll want to do two things:

  • Run the new Windows SDK Configuration Tool (Start / Programs / Windows SDK v6.1 / Visual Studio Registration) to ensure that this is set as the default help collection in Visual Studio
  • Follow this workaround to fix a XAML Intellisense bug that will be very irritating if you're a WPF developer.

For more information on the Windows SDK, check out the team's blog or visit the recently overhauled Windows Vista development center on MSDN.

A confession: I'm really bad at tipping.

It's not that I'm deliberately ungenerous, but simply that I never know how much to give. The UK isn't really a nation for tips: outside of restaurants, it's not something that's particularly expected, which means that here in the US I'm a complete novice at the art. The result is that sometimes I lavish cash like Sinatra on surly and unhelpful staff, while at other times I completely blow an opportunity to recognize excellent service.

To my embarrassment, I've only lately realized that it's polite to tip housekeeping staff at hotels. I determined to rectify my error this week while staying at the Venetian hotel in Las Vegas for an event, and so I dutifully left a small amount on my bed when I left for the day. To my surprise, when I returned to my serviced room, I noticed that my toiletries had been "upgraded" from the uninspiring generic items that first adorned my room to some rather impressive high-end replacements.

Next morning, I determined to show my gratitude for such thoughtfulness, and left a slightly larger amount on my bed. On returning later, I discovered that not only had the toiletries I'd stashed in my suitcase been replenished, but that I'd acquired still additional items, including a "gentleman's kit" of useful travel accessories. This turned into something of a game: the third morning, I excitedly tipped a little yet more out of fascination to see what would happen (a small vase of flowers and a Loofah sponge). For once, I was rather disappointed that I had to check out; it would have been very tempting to have upped the ante dramatically further to see what the ultimate reward would have been!

As well as discovering a new aspect of the service culture in the US, I also discovered that there are a lot more fun ways to "gamble" your money in Las Vegas than putting it into a slot machine. And just so I don't come across as bragging about my largesse, I should note that the very same evening I horrified a colleague of mine for innocently tipping just 5% on a bar bill (I figured this was a pretty good wage given the size of the bill, but I was apparently so far out that I could have had the dregs of my drink poured over me!). I've still got plenty to learn, it seems.

I'm going to be "live blogging" the Steve Ballmer keynote this afternoon at this URL. Keep this blog post bookmarked and start hitting "refresh" shortly after the keynote starts at 1pm Pacific / 9pm GMT. Or simply tune in to the webcast (750kbps, 300kbps, 100kbps) and watch it live yourself!

1:04pm - Ray Winninger (my boss!) is on stage to announce MIX09, taking place here at the Venetian Hotel in Las Vegas between March 18th-20th, 2009. No - registration hasn't opened yet!

1:07pm - Guy Kawasaki and Steve Ballmer are now sitting in comfy chairs, ready for Q&A.

1:08pm - Guy: why do you want to buy Yahoo? Steve: we've shown tenacity around advertising. Search is the killer feature for online advertising. You could say that we're not where we'd like to be, but we're very committed. Yahoo seems to be a way to accelerate that because of the required critical mass. "What's the current state of the offer?" Steve: We've made an offer - that's all I can say!

1:13pm - Guy: so you're telling me you're an underdog? Steve: Yes, you could say that, for this space.

1:14pm - Guy: I know this won't leave the room, but I use a Motorola Q phone running Windows Mobile, not an iPhone, because I need Exchange.

1:16pm - Guy: tell us about the deal with Facebook. Steve: again, it's about advertising.

1:17pm - Guy: what drives you? Steve: Three things: firstly, I love what I do - bringing out great products like Silverlight 2 and IE 8. Secondly, I get to work with some of the smartest people in the world. Lastly, I enjoy a challenge.

1:19pm - Guy: can you describe a typical day in the life of SteveB? Steve: there are three kinds of days. Sometimes I'm outside of Redmond meeting with customers, flying around the world. Sometimes I'm in the office with back-to-back strategy meetings. Sometimes I have a day where I can think, write and research where there's only perhaps one meeting and I can really focus on strategy. Guy: how much email do you have? Steve: I get perhaps sixty emails a day. Guy: really? I don't believe it. Steve: why do people get a lot of mail? Human beings aren't abusive in general, they send thoughtful, constructive mails. I might get more than sixty tomorrow, of course!

1:23pm - Guy: can you talk about Bill's departure? Steve: he's very fortunate. He's had something to build professionally in Microsoft, and now he's got a second opportunity with the foundation. You know, the company isn't reliant on Bill for new ideas - we've got so many amazing people.

1:25pm - Guy: what's the marketing pitch to recruit young people, particularly now "the stock profit has been made"? Steve: surprisingly, it's almost identical to what it used to be. Even in the early days, people didn't expect to get rich on stock at Microsoft. In the early 90s, we thought it had gone as high as it could go. There aren't many companies where you can get a 10x stock appreciation: it's usually a startup, and most startups fail.

1:28pm - Guy: my kids have no history of the OS and desktop wars - they think of Microsoft just as the Zune and Xbox company. Steve: the opportunity is for us to make great products. For the 17m people who own Xbox 360, or the 10-11m people who are Xbox Live subscribers, but even kids find themselves using office productivity applications for homework.

1:31pm - Guy: tell the audience about your strategy for Silverlight. Steve: there's been a big fork in the road historically - either I build something that's easy to deploy through the browser, or I build a powerful, rich desktop application. Over time, we're trying to bring those two worlds together, so you truly get the best of the Internet and the best of the PC all in one place. We announced Silverlight at MIX07, and we're already seeing 1.5m downloads a day. Windows Presentation Foundation is also seeing lots of momentum.

1:34pm - Guy: don't Apple do a great job with design? Isn't my MacBook Air wonderful?! Steve: it weighs more than my machine and it doesn't even have a DVD drive. Guy: who needs a DVD drive? Steve: you tell that to your kids on a long flight! Let's take that machine away and give you something that's got a full set of features, and then we can talk.

1:35pm - Guy: do you think there's a risk that Microsoft is losing its focus? Steve: you move forward or backward.

1:39pm - Guy: let's talk about Firefox and IE. We're investing heavily in Internet Explorer - lots of browser innovation. Guy: what about IE on the Mac? Steve: how do I say this sensitively? Of all the places we could put our energy for innovation, porting our browser to the Mac is fairly low down the list.

1:42pm - Guy: I've got to be honest, and admit that I've been doing an increasing amount of work with Microsoft over the last few years, and I have to admit that I've seen a change in Microsoft. The "new" Microsoft employee is different - not arrogant, better at responding than other companies. Dan'l Lewin and the guys down in Silicon Valley are doing a great job of bringing Microsoft to people who might not otherwise experience the company.

1:44pm - Attendee: what about Adobe? Steve: Adobe are a competitor, of course; but we also appreciate the innovation they've done with technologies like PDF.

1:46pm - Attendee: .NET is great and there's been lots of innovation on this side of the developer platform; why did IE get left out for so long? Steve: partly because Internet Explorer was shipped as part of the operating system and there was a long gap between Windows XP and Windows Vista. You won't see that kind of gap again - we now understand how to get things decoupled sufficiently to develop innovations separately from the OS and then bring them back later.

1:48pm - Attendee: if Microsoft take over Yahoo, what will you do with all those PHP applications? Steve: obviously we shouldn't have two of everything - two search services, advertising services, mail services etc. Some of the technology would come from the Microsoft side, some from the Yahoo side. I'm sure that when all is said and done, some of them would still be running. There will be lots of innovation in the core infrastructure, and over time, probably most of the big applications on the Internet will wind up being redone, but for the forseeable future, we would be a PHP "shop" if we own Yahoo as well as an ASP.NET shop. One of the key things we've done in Windows Server is to ensure that it's the best place for PHP applications.

1:50pm - Attendee: what synergies do you see with Yahoo? Steve: scale is a form of synergy. The more search share, the more advertisers you have, the more bidding you get in keywords, the more revenue you get. Google has a bigger body of ad inventory than either Microsoft or Yahoo do individually and bringing the companies together can result in benefits.

1:52pm - Attendee: you did a great job by acquiring FAST Search - it's amazing technology. Steve: we're in the regulatory phase here; we love the company and we'll have more to say when we're through the approval process.

1:54pm - Attendee: what is Microsoft going to offer in terms of cloud computing? Steve: with the launch of Hyper-V, it makes it easy for anyone to set up a datacenter for cloud services. Ray Ozzie hinted at some plans we're going to announce later in the year.

1:55pm - Attendee: any news about Silverlight for the iPhone? Steve: this is of course interesting; we'd love to see Silverlight in as many places as possible. Apple today announced an SDK and runtime, but they want 30% of all revenue that you make on it. This is a great model if you can make it stick, I'm not sure that many developers will be interested in that arrangement.

1:57pm - Guy: what kind of mobile phone do you have? Steve: I'm always rotating around from one phone to another.

1:58pm - Attendee: when are we going to see Silverlight as the default for Microsoft properties, e.g. Hotmail? Steve: you'll see it in a lot of places over the coming months and years. Of course, we have the same codebase issues as everyone else- it's only when we update a product that it makes sense to consider changing the delivery mechanism.

1:59pm - Attendee: can you tell us about your plans for the health sector? Steve: health is the only vertical we've really invested in, both because it's the largest sector and because there's a lot of potential there. We have technologies like HealthVault that are trying to bootstrap the idea of a portable medical record.

2:01pm - Attendee: what are your plans for Blu-Ray now that it's won the format war? Steve: we liked HD DVD because it was there early, but we're not a player manufacturer. We'll add support for Blu-Ray, of course, and we already have support in Windows Vista, for example. It's interesting to note though that there is a move towards digital downloads: maybe not in the next year or two, but certainly in the medium-term.

2:05pm - Attendee: thank you for DreamSpark and Channel 8: this really helps us out as students. We've got the tools - how can you help us out with servers / services? Steve: plenty of hosting companies out there. (Tim: don't forget the MIX Sandbox either!) Students can also check out these sessions at http://sessions.visitmix.com.

2:12pm - And we're done!

More Posts Next page »
 
Page view tracker