Thursday, December 2, 2010

Silverlight 5: From Silver to Gold in One Release

Silverlight 5 is coming!

According to the keynote from Scott Guthrie, Silverlight 5 will be here in beta by Spring 2011 and in release by end of year 2011.

Today's Silverlight Firestarter event included a keynote speech by Scott Guthrie, announcing the features that are slated for the Silverlight 5 release. Because I went into great detail about how Silverlight is alive, well, and perfect for many line of business applications in this post, I wanted to review some of the changes that are coming down the pipe and share why I believe this will completely revolutionize use of Silverlight well beyond current adoption.

First, a quick recap of some of the interesting case studies shared. One company, DayForce, demonstrated a labor compliance and payroll management application built in Silverlight 4. They reported it only cost 1/4th the development effort to build the application in Silverlight compared to Java, and that the power of the engine in the browser allows companies to run the application at 1/30th the cost of server-based solutions. Now that's powerful!

We also saw a demo of Capella, a Silverlight 4 out of browser application. The application helps facilitate integrated health care for patients with kidney disease. It includes a dashboard with intelligent, dynamic charts of patients and critical data. It includes alerts and dynamic drill-down by patients.

With Silverlight 5, the company used the new child window capabilities to allow elements of the screen to get pulled out into separate windows. This included snap-capability to build a set of screens and layouts using true native windows. They then took a glucose monitoring device and used the new P/Invoke functionality to integrate to the Silverlight application via USB and pull in the data from the device. From the browser, they demonstrated exporting data directly into Excel on the local desktop.

The demo of Crescent was incredible to watch. This is the next generation Business Intelligence tool for SQL Server being built entirely in Silverlight. A database with 10 million rows was used to create dynamic reports and trends in the browser. They were even able to generate an on-the-fly animation of trends over time showing popularity of movies. In addition, there was the ability to right-click and generate a full PowerPoint document straight from the data - with full interaction in the slide deck!

For a full list of upcoming features for Silverlight 5, visit this link. To view the keynote, check out: the Firestarter link.

Read Between the Lines

Someone mentioned on Twitter recently that "reading between the lines" implied these announcements are just more "damage control." If that's all it is, I'm all for it, because these features are exciting. There are already a variety of projects that encode ebooks and other textual data in Silverlight applications, and the upcoming release provides some powerful features such as column layouts, text flow (allowing text to automatically flow around objects or graphics on the page), pixel snapping, improved support for OpenType and promised increases with performance.

That will make including documents within line of business applications not only easier, but provide a richer, fuller experience for the end user.

You Can Print That!

One common complaint about Silverlight in the enterprise has been the lack of native printing support. This was marginally addressed in version 4 with raster-based printing, but was not acceptable for most business needs. Rasterized fonts don't scale well, and result in very large bitmap-style dumps of data that have to be shoved to the printer and then rendered in a graphics mode (often the slowest mode for printers).

The PostScript support in Silvelight 5 will completely close the loop for this feature. PostScript documents take less space and because they are vectors support full scaling and manipulation of resolution by the printer. Printers with advanced text-based modes will also print these types of pages far more quickly than raster-based data. This will offer complete control of printed output and elevate Silverlight to a first-class reporting platform.

XAML for the Masses

XAML is a powerful markup language but often can end up like a "black box" for developers because it is notoriously difficult to troubleshoot when issues arise. With the ability now to debug and step through XAML, this will change for the better.

Support for implicit data templates means far more flexibility and ease of themes and styling for application and continues to promote the separation (and therefore parallel execution) of developer and design workflow. Ancestor binding will get rid of many of the kludges we typically use to allow elements in a list to invoke actions on the parent or access parent properties. Bindings in style settings also furthers theming support and flexibility, and a data context changed event means smarter controls and ability to respond to changes in the dynamic runtime. These are all features developers have been begging for and Microsoft obviously has listened!

In the keynote, John Papa provided a demo of debugging XAML and was able to easily break on the binding, see the binding error, and even go into the model and find the correct property. It was a very welcome and amazing to watch.

Trust Me

One thorn in the side of Silverlight has been with security. With only limited support for the WCF stack, security has often required a combination of using SSL and then either relying on Windows Forms authentication or some custom encoding of the transport. The next release will support the full WS-Trust protocol as well as SAML (Security Assertion Markup Language) making it easy for Silverlight 5 to integrate directly with contemporary authentication and authorization strategies.

Commodore 64-bit

I started on the Commodore 64 which was 64K and an 8-bit CPU. Now we'll tackle 64 bits with the next release of Silverlight. I've heard this time and time again: why does Microsoft promote the power of 64-bit systems, talk about Silverlight as the development platform of choice for rich business class applications then provide it with only 32-bit support? They've listened, and the answer is ... you got it. 64-bit support means, well, twice as many bits, right? It's a welcome addition to have native 64-bit code running when we deploy to those operating systems that support it.

Out of the Box

One problem with the current Silverlight version is that you cannot host other web content in the browser without resorting to more exotic techniques such as DIV overlays. The next version will allow hosting a WebControl when in browser mode (not just out-of-browser mode) which will allow for a higher level of interaction with existing websites, gadgets, and tools.

That's not all. Some of the frustrating limitations in previous versions go away and get us further out of the box with things like full keyboard support in full screen mode, access to devices via COM (such as USB and scanners), integration with Outlook, and the ability to call unmanaged code directly with P/Invoke.

Don't get Testy! (Er, go ahead...)

Full support for profiling and testing from within Visual Studio will also be provided. Silverlight 4 opened the door but the profiling process was either painfully manual or relied on third-party tools. This becomes native to Visual Studio in the next release and provides integration of tests within the Visual Studio Team Test suite. We saw a live demo showing a Silverlight application with a test project.

John Papa simply recorded some actions on the screen, saved them, then set assertions (this allowed him to select any element on the screen, grab it, and then assert what properties should match, such as the text in a TextBlock matching some predetermined value).

He ran the test and it launched the application, played the steps, and asserted the values. It is a very powerful and welcome feature.

Lighting up the Web

I haven't even jumped into the other Silverlight 5 features such as enhancements to the media playback functionality or the graphics improvements such as the native 3D API and direct access to graphics. These are all amazing - the keynote showed the demo of a patient application that had a layered 3D model of a human with amazing 3D quality rendered realtime with shading and textures, including peeling away different layers to see muscles and skeletal structure.

(Take a look at the entire feature list here).

I don't believe this set of features is the sign of a dying product or one that Microsoft is pulling support away from. In fact, this coming release addresses so many specific needs I've heard customers voice that I believe it will be the most impactful version of Silverlight to date and really blow the lid off enterprise and line of business applications.

How do these features affect your thoughts about Silverlight? Weigh-in using the comments below!

Jeremy Likness

6 comments:

  1. I agree Jeremy, the SL5 stuff they showed is quite impressive. I am mostly re-inspired.

    One thing I would have liked to hear more about (even briefly) is what the roadmap is for WPF. They showed SL is moving closer to WPF but WPF was not really mentioned. Or are they going to have a WPF firestarter in 2 months for that? :).

    If they are going to add P/Invoke to SL, on top of COM support, why not just go all the way and allow it to call the full .NET framework if it is already installed on the user's machine?

    Alan Cobb

    ReplyDelete
  2. @Alan:

    I agree about being able to call the full .Net framework for Full-trust applications. Would really make a sweet ability for developing real-world applications that can quickly be deployed en-masse.

    ReplyDelete
  3. I am encouraged by all the good news, but the end of 2011 for v5? A lot can happen in a year: You only have to look at what's happened in the last 12 months!

    Silverlight 5 was never in doubt. With RTM being so far out (yes, I appreciate that they've had to play their hand early after the PDC Muglia debacle, with stuff that was originally intended for MIX11), my original question still stands: will there be a Silverlight 6?

    Most of the issues that explain the low take-up still exist (I know you disagree on this whole "low take up" argument Jeremy, but you're not talking to the same recruitment agencies or community groups of Microsoft developers I am): the steep learning curve, the limited reach, the bugs that have been there since version 2 especially with controls and memory leaks, the lack of authoritative, complete and developer-friendly best practice guidance (Please don't point me at Prism v4, I'm using it and it's more of the same old same old - over-engineered, with far too much stuff to wade through and the stuff you really want missing) are all things that need addressing.

    ReplyDelete
  4. @Ian:

    You said regarding Prism v4: "and the stuff you really want missing".

    Can you expand on that? Personally I'm pretty happy with Prism 4. They provide a boatload of material, but they have a lot of ground to cover. I'd rather have a lot of material, than too little.

    Alan Cobb

    ReplyDelete
  5. Re: the material. It's too poorly structured and indexed. Try looking up something like "Blendability". I think I found one reference that referred to a section on Blendability which isn't there when I search. The reference was highlighted in blue as if it was a hyperlink, but it wasn't.

    Most of the important stuff is hidden away in the QuickStart walkthroughs (eg what do all those entries in ModuleConfig.xaml actually do? How do I know what to set them to?) when it should be in the main body. You waste too much time trying to figure out what you should be doing and what the authors intended you to do. New developers I'm working with just look at the stuff and say "It doesn't really tell me how to do stuff. The QuickStarts focus on individual areas, the MVVM quickstart is missing stuff and I don't really want to wade through the Stock Reference Implementation just to find out how I bring all these different areas together".

    Too often you're presented with choices with no real clarification as to when you should use one approach over another. The MVVM "Reference Implementation" barely uses the PRISM libraries. Shouldn't a Reference Implementation be just that - a real LOB app, not a mickey-mouse application that doesn't use most of the features of the PRISM library?

    The Navigation chapter ignores the Silverlight Navigation Framework so you're left to surf the web and find Karl's blog entries on how to integrate that with PRISM's roll your own (yet another one!) approach.

    Because PRISM is focussed on WPF and Silverlight (lowest common denominator in the assumption you're writing an app for both rather than one) there's no mention at all of Application Extension Services which for Silverlight-only apps might be a better approach to implementing client-side services. This is a glaring omission in my view.

    ReplyDelete
  6. Oops. And I forgot to mention that there's nothing about WCF RIA Services either.

    ReplyDelete