Microsoft's Recent Announcements on Web Technologies

I have now been away from the blogosphere on yet another extended leave of absence. The reason is that I have been in the midst of change - I now lead Web Strategy at Microsoft India. The web is evolving at a very fast pace and Microsoft has a unique position amongst all technology vendors when it comes to this space. This becomes even more interesting in the India context - the pace of socio-economic change is unprecedented, and companies here are coming up with some very innovative business ideas to succeed, so I feel both excited and humbled at the opportunities ahead.

Now if you are interested in the Web (who is not?) then it cannot be that you are not aware of Mix - Microsoft's biggest conference on the web technologies space. Like the last two years, Microsoft made some big announcements around the Mix timeframe and showcased some very interesting new technology. This post captures the announcements and explains what they really mean.

  1. Internet Explorer 8
    • CSS 2.1 + DOM Enhancements: As Dean Hachamovitch pointed out in the Mix keynote, IE 8 is heavily focused on Developers, and the biggest problem web-developers have had is the non-compliant, quirky behavior of Internet Explorer which has led to countless hours spent in achieving cross-browser compatibility. The goal with IE 8 is to achieve 100% compatibility with the CSS 2.1 spec (note that the spec is still in a "candidate recommendation" status). It also tries to address some of the top requested features from CSS 3.  More details are available on CSS Improvements in Internet Explorer 8. The other big step towards standardization is an enhanced DOM which is closer to the implementation in other browsers. More details on this are available on What’s New in Internet Explorer 8.
    • CSS 2.1 Test Cases: It is never easy to define the behavior of software unambiguously in regular English. Specs therefore go in great formalism to try and define as clearly as possible the expected behavior of software. (This has also led to efforts like Spec#) Getting that clarity for sophisticated markup like HTML and CSS is even more difficult. Which is the reason why the W3C also defines a test suite for CSS that consists of 487 odd tests. What Microsoft has done is to submit an additional 700 tests to W3C - the idea is to get these included in the W3C suite and get feedback to improve IE's adherence to CSS specs.
    • Standards Mode: The evolving nature of the HTML and CSS specs means that there is a lot of content on the Web which is not compliant with the standards. This means that browsers like Internet Explorer need to follow the "Don't Break the Web" rule in a strong way, while being standards compliant at the same time. Note that this not just an IE problem. The so called Quirks Mode is something that all browsers - Mozilla, Opera, IE - need to maintain. Now what has changed in IE is that besides using the DOCTYPE switch, in order to take advantage of the fully standards compliant mode of IE 8, authors would need to include a META content tag as well. The reasons for doing this and its implications are a bit complex and I would discuss that in detail in a future post. For now, if you want to read more about this, start from Chris Wilson's post on Compatibility and IE 8, and finally read Versioning and IE Modes.
    • Scripting Improvements: The other area where standards compliance was needed was the JScript engine. There are certain compatibility issues in the Microsoft implementation of the ECMAScript Language Specification 3rd Edition (ES3). These have been identified and documented at JScript Deviations from ES3 which should act as a guidance for developers working on cross-browser apps. Of course as a developer, I do not want to understand the differences and JavaScript should behave identically on all browsers and my code should just work! For those of us who were expecting IE 8 Beta 1 to deliver on this, the news is not exciting - IE 8 JScript Engine does not fix the compatibility issues. The JScript team is of course fully committed to achieving full compatibility, but we will have to wait a little longer to see that. However, what we are getting in JScript as a part of IE 8 are improvements on areas which were huge pain points for all developers. There are two key areas of improvement - performance and memory management:
      1. The perf issue - JScript is notorious for its string performance. (see this benchmark for details) The good news is that now operations like String Concatenation - which are very common in AJAX - are several times faster. The JScript GC has also been tuned so if you are creating a number of strings and discarding them, the number of collections is reduced, hence increasing the perf. Improvements have also been made to built-in array operations. Other improvements include DOM Search using the getElementById and getElementsByTagName methods, and the availability of CSS Selector APIs. More details are on perf improvements can be found on this whitepaper.
      2. Circular Reference Memory Leaks: I am not sure how many people are aware of this, but the JScript Garbage Collector does not control lifetimes of DOM objects, it does lifetime management only for JScript objects. The result is that JScript cannot break circular references between JScript objects and DOM objects unless the IE process terminates (IE 6) or the user navigates away from the page (IE 7). The issue is a bit more complicated than just this - read this MSDN article if you want to know what is really happening. Now what the JScript team has done for IE 8 is to go and make changes to underlying COM plumbing infrastructure to address this problem at a fundamental level so that the issue is revolved not just for JScript, but also for any other components which face similar issues. For a JScript developer, the impact is that now DOM object lifetimes are also controlled by the JScript engine and hence it can break circular references between JScript and DOM objects and hence not leak memory. More details are available on this whitepaper.
    • Developer Tools: Every time I had
      t
      o understand why my page was behaving in a certain way, my only choice was to open that page in FireFox and use FireBug. The IE Developer Toolbar solved it to some extent, but not completely. The IE 8 team has now gone and delivered a set of dev tools which tops even FireBug. You can inspect and edit HTML + CSS + DOM. You can see the details of Style, Layout and even trace styles to view computed styles. But the feature I like best is the script debugging support. You can do breakpoints, watch windows, call stack, custom script execution - it is almost a Visual Studio experience, and it ships as a part of IE 8! More details are available on this whitepaper.
    • Activities: IE 8 introduces the notion of an "Activity" - a contextual UI pattern that can used to access a service from a web page. The pattern is activated when the user brings up the context menu by a Right Click or by selecting some content on the page which brings up a smart-tag like button. Activities can then be used to perform Lookup operations like Search, or Send operations like email and blog. Much like the Search Provider functionality that shipped with IE 7, an Activity is user deployed and can be promoted by any website. In this sense, an Activity is yet another kind of a browser plug-in. Activities are declaratively created, using an XML grammar called the Open Service Description. More details can be found on this whitepaper.
    • Web Slices: A Web Slice is a subscription to a frequently updated portion of a Web page, much the way RSS is a subscription to the content of a Web-page. WebSlices uses the hAtom microformat to describes a feed and feed items. But while hAtom can only represent static content, WebSlices work with dynamic content that is expected to change. To achieve this, WebSlices reuses properties from hAtom and adds properties for subscription. From a publisher standpoint, this allows creation of update-able content right inside the page which can stay with the user even after he has closed the page. More details can be found on this whitepaper.
    • Other Improvements: In IE 8, the IE Frame and the tabs are separated into different processes. This increased isolation improves perf and reliability. This allows the Windows Vista Integrity Mechanism to be used in an interesting way: The Frame runs at medium integrity level and individual tabs - manifested as separate browser processes - can run at low or medium integrity levels. More details can be found at Loosely-coupled Internet Explorer. These changes not only isolate errors from each other, but also help the browser recover from crashes and hangs. This is done by an object in the Frame that stores key data such as per tab URL history, tab URLs and order, etc. in a persistent store. When there is a hang /crash in a browser process (typically because of an external component), this object can recover the data. Since the data is persisted, it survives even Frame crashes. More details can be found at Automatic Crash Recovery. The other key architectural change is that a lot of internal communication inside the browser is now asynchronous which leads to better response times. Besides these key changes, there are improvements on the accessibility front that are detailed at W3C's ARIA support, Zoom v2, Manage Add-Ons, Per-Site ActiveX and Non-Admin ActiveX Controls, Printing Improvements, DOM Core Improvements, HTML Improvements and ACID2, etc.

      In all, IE 8 has a number of enhancements which are very exciting for a developer and promise to make life a lot simpler for a consumer. You can download details on most of these from http://code.msdn.microsoft.com/ie8whitepapers. More information on IE 8, including hands on labs and IE 8 VPCs is available on http://www.microsoft.com/windows/products/winfamily/ie/ie8/readiness/.

  2. Silverlight 2: One of the most significant announcements at Mix 08 was that Silverlight 2 Beta 1 bits were made available. An architectural diagram of SL 2 can be found at http://en.wikipedia.org/wiki/Image:Microsoft_Silverlight_stack.svg. I am going to describe the key constituent pieces here: 
    • Managed Code: Silverlight 2 is browser plugin that hosts a specially created version of the CLR (called CoreCLR) along with a subset of the libraries that ship with the .Net Framework. This means that as a .Net developer, you can start writing code for SL 2 without having to learn anything new - fundamental things like memory management, type system, generics, reflection, threading, collections, work just the same. More information on this is available on Common Language Runtime and Base Class Library in Silverlight.
    • Dynamic Languages: When Microsoft released CLR back in 2001, one of the stated goals was support for different kinds of programming languages. A category of languages which was hard to target for the CLR was Dynamic Languages. Thru the work done by people like Jim Hugunin, Microsoft has in the works a Dynamic Languages Runtime which facilitates targeting languages like Ruby, Perl, Lisp and Python on the CLR. The good news is that Silverlight 2 hosts the DLR, and hence it is possible to program against SL 2 using languages like IronRubyIronPython and Managed JScript.
    • Browser Interaction: At the end of the day, a SL app is a browser app, so interacting with the browser host is critical for several SL apps. To achieve this, the Browser is exposed to SL via .Net classes, and similarly, SL objects are available to JavaScript code running in the browser. To interact with the browser from inside SL, you go thru the System.Windows.Browser namespace.This allows you to work with browser information, get to the HTML DOM tree, hook on to events, invoke JavaScript code, etc. Details are available on Calling Client Script from Managed Code. Similarly, it is possible to interact with SL from JavaScript code running in the browser. For this, the code to be called in SL is registered during the Application Startup event in SL as a Scriptable object. This then is exposed as a property on the SL control, callable by JavaScript. Details are available on Calling Managed Code from Client Script.
    • Integrating with ASP.net: While Silverlight content can be embedded in an HTML page, the most interesting Silverlight applications would be generated using server-side technologies like ASP.net. To make it really easy for developers to integrate ASP.net with Silverlight, two ASP.net controls are provided in the SL 2 Beta 1 SDK: The ASP.net MediaPlayer Control to integrate media content (no need to learn XAML or JavaScript), and the ASP.net Silverlight Control which is a generic control that allows you to integrate XAML and any other supporting code. More details are available on ASP.NET Silverlight Overview.
    • Controls Framework: A number of web applications are form-based, and need richer functionality like the ability to work with formatted text, offline forms, spell check, etc. For developing these apps quickly, a set of controls and extensibility using a Controls Framework is required. SL 2 provides both. Moreover, the controls in SL 2 are customizable - they come with templates that can be changed to completely modify their look and feel. This is achieved by decoupling the the visual behavior of a control from its logic. The visual behavior is defined in a ControlTemplate which in turn consists of several parts. If you want a particular visual behavior element to be re-definable, you create a separate part for it. These parts can then be individually customized without any impact to the logic of the control itself. Of course this maybe too complicated for some scenarios, in which case you can always create a control using a UserControl class in the familiar ASP.net / Windows Forms way. The controls that Silverlight ships with have this decoupled visual behavior that allows them to be customized. More details can be found on Styling and Templating Overview.
    • Web Services: The term web-service is classically associated with SOAP based web-services. However, when we think of a web-service being accessed by Silverlight, we are thinking of the following kinds of services:
      • Self-Describing Services: For a service that can describe itself using using machine-readable metadata, we can generate a proxy to which Silverlight can bind. This is the process of service consumption that happens when you click "Add Web-Reference" to a project in Visual Studio. This works exactly the same way in Silverlight 2 projects as well - you add a reference to the web-service and then you can call that service from inside SL. Now which services are self-describing? These are the following:
        • SOAP-based Services: SOAP Services from the beginning have been self-describing (thru WSDL) and hence can be consumed using a "Web-Reference" from inside VS. From a service design standpoint, the restriction is that WS-* services like addressing, transactions, etc. cannot be used in SL. So if you have a WCF service, Silverlight can use the BasicHttpBinding. The implication of this is that you cannot have message-level security and need to rely on transport-level security using SSL.
        • ADO.net Data Services (Astoria): ADO.net Data Services allows you to store arbitrary data on Microsoft's infrastructure, and provides semantics for reflection on URIs and payloads. The service itself can be described using an Entity Data Model (EDM) conceptual schema. This allows tools to consume this metadata and generate proxies which can then be consumed directly from within the Silverlight code. A simple way of doing this is to use the ADO.net Data Services .Net Client Library. Please note that ADO.net Data Services is not to be confused with SQL Server Data Services which serves a different purpose (explained below)
    • Non Self-Describing Services: These services have human-readable markup. The model is to, well, read the documentation, create HTTP requests and work with Request / Response data in XML / JSON - pretty much everything by hand. Accessing HTTP-Based Services Directly describes how you should consume such services from Silverlight.
  3. Data: Silverlight is a client side technology and hence its work on data is also on the client side. On the client side, there is no database and the data is usually held in the browser's isolated storage in the form of XML files and manipulated there. This data may be data pulled in by services mentioned in the previous point, or/and it can be AJAX data. To store and manipulate the data, a virtual file system can be created using System.IO.IsolatedStorage. Irrespective of how the data is pulled in, it is manipulated using Silverlight XML facilities. This is described in detail on Working with XML Data in Silverlight.
  4. Deep Zoom: In Feb 2007, Microsoft acquired a company called SeaDragon Software. Out of this acquisition came the technology called PhotoSynth and a technology called SeaDragon, which has now found its way in Silverlight 2 under the name Deep Zoom. The problem this technology solves can be understood as follows: More and more visual information is finding its way into images, (curtsey high definition cameras and

    the need to share detailed visual information digitally), however, our ability to access this information is limited by screen size (what are the dimensions of a 4 giga-pixel image?), bandwidth (how do you download a 4 GP image?) and graphics processing capability (how do you fit a 4 GP image into the memory of a GPU card?). Deep Zoom addresses this thru a simple solution: if you have a really large image, you are not going to see all the detail on your monitor, and will only see some of the detail by zooming into that. The Deep Zoom Composer tool converts a large image into a pyramid of small images of various sections of the image at different levels of zoom, with the whole image representation being at the top, followed by a set of images representing the next level of zoom, followed by a larger number of images for the next zoom level,  and so on. When you view the whole image, the first image at the top of the pyramid is rendered, and then as you keep moving around and zooming in an out, the apt image from the pyramid is pulled out and rendered. If you zoom in, the image would be pulled from the lower side of the composition pyramid and if you zoom out, the image would be from the higher side of the pyramid. Moving around at the same zoom level pulls out images from the same level in the pyramid. This means that at any given point, you are only downloading a small piece of data and rendering that. In SL2, you use Deep Zoom using the MultiScaleImage control. At the Mix keynote, the Hard Rock Cafe guys showed how they have used Deep Zoom to provide access to their memorabilia collection.

  5. Media: Media is a key scenario in SL 2 much like it was in SL 1. The focus is to provide high quality, high performance and low TCO. The key capabilities are:
    • Content Protection: Silverlight provide DRM support based on Microsoft PlayReady, for both Windows and Mac. Note that PlayReady is general purpose DRM solution so it can be used not just for media but also other content types like images, animations and graphics. Plan is to also support Windows Media DRM - which is the media specific DRM solution used by Windows Media - on both these platforms. Also, one can use SSL to protect progressive media delivery from IIS 7.
    • Format and Codec Support: SL 2 supports WMA, WMAPro, WMV/VC-1 and MP3, with support for HD 720p video. VC-1 is considered to have twice the decode efficiency of H.264 which makes it more capable for lower-end PCs, besides having other advantages for broadcasters. A detailed comparison is available here
    • Adaptive Streaming: An interesting announcement made at Mix was that under a partnership with Move networks, SL would be able to playback a Move Adaptive Stream using the VC-1 codecs. Note that Adaptive Streaming is not a part of Beta 1 and would be made available in a later beta. So my description of Adaptive Streaming here is generic and not SL specific. Adaptive Streaming is a media delivery innovation on top of HTTP where the video stream is chunked into smaller video segments, cached on the network, and re-packaged on the client. In traditional streaming, there are maybe a couple of streams (at different bit-rates) available and the user chooses one at startup time and then stays with that stream. This ignores the fact that in reality, bandwidth varies over a period of time and the decision on which bit rate to choose should be dynamically taken. Adaptive Streaming addresses this by providing several streams at different bit-rates, splitting each stream into tiny, multi-segment streamlets. The player - based on network and client-side characteristics - can decide at startup which stream to use, and as available bandwidth or available resources on the client machine change, ask for the next segment to come on a different bit-rate. This optimizes the bandwidth utilization and provides the best possible client side experience while also reducing server-side bandwidth cost. In order for adaptive streaming to work, the condition is that the media server should expose multiple streams, should chunk the streams, and information about the streams should be query-able.
    • Media Serving: While SL is a media consumption technology, I also want to talk here about the media serving platform. There are three choices available from Microsoft:
      • Windows Media Server: Windows Media Server 9 was considered by many customers and analysts as being the best in the market for live and streaming delivery, and with Windows Media Services 2008, these capabilities have improved even further. WMS08  is twice as scalable as WMS 9, the server-core deployment reduces the footprint for dedicated server scenarios, and with a built-in cache/proxy, it is easier to configure it for edge scenarios.
      • IIS 7 Media Pack: For those customers who do not want a full fledged media server, there is the IIS 7.0 Media Pack. At Mix 08, a couple of interesting Media Pack features were described: Bit-Rate Throttling and Web-Playlists. In a progressive download scenario, BRT detects the encoded bit-rate of the file being downloaded and controls the speed at which the first few seconds are downloaded, followed by the speed for the rest of the file. This saves bandwidth and also preserves a fast startup experience. Web Playlists are meant to do two things: hide media assets and provide the ability to sequence media playback to provide pre- post- roll advertising and in-stream advertising. Both these features were the preserve of a media server, but now you get them with the web server.
      • Silverlight Streaming: Silverlight Streaming is a media streaming solution hosted on the Microsoft platform. The idea is to host media + other client-side assets (including HTML/js files which can host SL) on the Microsoft infrastructure. This transfers the hosting + bandwidth cost to Microsoft instead of you having to pick it up. Currently the service is in a pre-beta stage and targeted at developers with a per user limit of 10 GB storage and 5 TB / month of aggregated bandwidth being offered for no charges.
  6. Mobile: A very exciting announcement made at Mix was that Microsoft would be building SL for Mobile devices as well. People were expecting it for a long time, ever since WPF/e - the former codename for Silverlight - was announced, however, what was unexpected was that SL Mobile would be available cross-platform, with support for Symbian as well. With this announcement, XAML is now available across three screens: PC, TV and Phone. (Confused about TV? Well, Media Center SDK also uses XAML). Now SL for Mobile devices is going to have a somewhat different roadmap: SL 1.0 for Mobile CTP is expected in Q2 2008, with the RTW in Q4. As SL 1 Mobile goes to RTW, you would be able to see the CTP for SL 2 Mobile, which would then RTW in Q2 2009. Or so says the slide deck from the session T12 at Mix by Amit Chopra and David Kline.
  7. To build apps using Silverlight 2 Beta 1, you would need: Silverlight 2 Beta 1 runtime, Microsoft Silverlight 2 Software Development Kit Beta 1, Microsoft Silverlight Tools Beta 1 for Visual Studio 2008, Expression Blend 2.5 March 2008 Preview. More resources and tools can be found on http://www.microsoft.com/silverlight/resources/default.aspx.

  8. Expression Studio 2: Microsoft also announced Expression Studio 2 Beta 2 with an expected release of H1, 2008. Note that Expression Studio 2 targets Silverlight 1. For Silverlight 2, support will be provided in future versions. There is a ton of new functionality available across the Expression 2 products, and you can find all that on the new community site - http://expression.microsoft.com/ - which was also announced at Mix. To build Silverlight applications, as a designer you would need:
  9. SQL Server Data Services: To me personally, the most interesting announcement at Mix 08 was that of SQL Server Data Services.  As Soumitra Sengupta - architect on the SSDS team - was keen to point out, SSDS is Simple, but it is not SimpleDB. Much the way SQL Server is available on a PC, on a server and on a mobile device, it is now also available as a service. This service runs on several commodity boxes hosting the same SQL Server technology that you and I use on a daily basis. Right now SSDS exposes a small subset of the capability of the on-premise SQL Server product, but this would change as the service matures. The vision is that customers would be able to store virtually unlimited data at on-demand scalability on SSDS under enterprise-ready Service Level Agreements on a pay-for-use model. The data can be synced with an on-premise SQL Server using Microsoft Sync Framework, or consumed by an app using SOAP / REST interfaces. The idea is to have three types of SQL Server capabilities for customers: on-premise, hosted and as a service. Exchange Server already has the service offerings, and BizTalk Server is well on that journey with the BizTalk Services initiative. Note that this is different from ADO.net Data Services which has a similar name, but serves a different purpose. Nigel Ellis gave a talk on SSDS at Mix 08, and there is a blog by Jeff Currier that explains how to use SSDS. There is also a channel 9 video of Dave Campbell talking about SSDS. The technology and its implications are very interesting and I will post more on this in detail later. To find out for yourself, register for the free beta.
  10. Partnerships: Microsoft also announced a number of partnerships at Mix 08. The keys ones are: 
    • Nokia: The agreement with Nokia is to make SL Mobile available for S60 devices on Symbian, Series 40 and Nokia Internet tablets. Given that S60 has more than 50% of SmartPhone marketshare, this gives SL Mobile tremendous penetration. This also means that the gates are now open for other handset manufacturers to approach Microsoft to provide SL-enabled phones. However, the fact that SL Mobile is a royalty-free runtime, may not work for somebody like Apple who want to charge for runtime on the iPhone.
    • DoubleClick:  DoubleClick announced DoubleClick In-Stream - their SL2 based SDK for in-stream advertising. This would allow publishers to dynamically serve video ads from DoubleClick's DART platform into the SL 2 video players and get reporting and forecasting data. According to Ari Paparo, VP Advertiser Products, DoubleClick, who spoke about the partnership at Mix, the SL 2 support is expected in Q2 2008.
    • Move Networks: I talked about Adaptive Streaming support in SL2. The partner with whom this capability would be going live would be Move Networks. The nature of the partnership was not described, but I guess more details would be shared in the next few months.

So Mix 08 had some interesting announcements on all fronts, but most prominently on the client side with IE 8 and SL 2 betas getting released. Some of the long-term bets Microsoft is making - SL Mobile and SQL Server Data Services would have implications not just for consumer computing, but also for business computing. Ray Ozzie also hinted at some interesting stuff happening on the Live front during his keynote. Combine this with the Oslo announcements a couple of months back, and you start seeing the Software+Services vision which Ozzie outlined in Mix 07 last year taking shape: On-Premise software with corresponding Service and Hosted offerings, with tight integration with x-plat client side technologies. All very exciting stuff ... what a time to be here in this industry!!

 

 

Tags: