Silverlight Hack

Silverlight & related .NET technologies

About Me

Welcome to Silverlighthack.com.  This is a site where you can find many articles on Silverlight, Windows Phone 7 and .NET related technologies.  

My name is Bart Czernicki.  I have been working with computers since 1988 and have over 12 professional years in the IT field focusing on architecture, technology strategy and product management.  I currently work as a Sr. Software Architect at a large software development company.

Below is the cover of my new book that shows how Silverlight's unique RIA features can be applied to create next-generation business intelligence (BI 2.0) applications.

Silverlight 4 Business Intelligence Soft 

Contact: bartczernicki@gmail.com

View Bart Czernickis profile on LinkedIn

NONE of the comments or opinions expressed here should be considered ofmy past or current employer(s).  The code provided is as-is without anyguarantees or warranties.

Silverlight 2.0 - Concepts To Become A Silverlight Master (Series Part 3 - Blend)

Series Articles:

In order to get a better understanding of how Silverlight applications are designed from a UI perspective, let's take quick look at the Silverlight architecture.

Notice under the WPF Heading listed are Controls, Data Binding, Layout & Editing.  You might be wondering, why does this say WPF?  The reason is Silverlight essentially leverages a subset of WPF technology (some parts are different) for the items mentioned.  Before it was branded with the term Silverlight, it was actually known as WPF/E.  Therefore, one can see that Silverlight has its roots in WPF.  Furthermore, note how the WPF technology stack replaced the UI Core in Silverlight 1.0.  WPF has been around since 2006, when .NET 3.0 was released.   However, WPF adoption has been slowed because of poor UI tool support.  In Visual Studio 2005, it was complete mess to try to write a WPF solution.  Improved WPF support was finally added in VS 2008 (more is coming in .NET 3.5 sp1). However, Microsoft realized that in order to create rich/interactive applications, a first-class design tool was needed.  This is how the Blend product came to be.

The Blend product is part of Microsoft's Expression Studio, which is a collection of first-class design tools.  Microsoft Blend is a design tool that makes creating & editing XAML-based applications easy.  Both WPF & Silverlight use XAML to declaratively control the controls, binding, styles, animations, etc., for the UI.  Visual Studio is a great development IDE and has some basic design features.  However, adding a full-blown designer inside the VS shell would have had poor results.  Blend has been created with the designer in mind and the latest version(s) are actually written inside WPF! Expression Studio is a much needed application.  Microsoft is competing primarily with Adobe AIR/Flex products.  While Microsoft has the developer tools on its side (Visual Studio, C#, WCF, etc.), Adobe is the gold standard for graphical applications.  Because Adobe products such as Flash, Illustrator, PhotoShop, etc., are tightly integrated and provide a designer first-class tools, Microsoft needed a strong design suite of their own.

Seperating Blend into its own product allows graphic designers to create/layout/style the application while the developer focuses on the code/data communication, etc.  However, in order for this to happen, Microsoft had to leverage the ability of XAML to declaratively control layout, data binding, styling, templating, resource management, etc., inside Blend.  Simply creating a second product and saying this is for designers and Visual Studio is for developers would not go over well!  I think of it this way: Wherein some IT shops, DBAs are the only ones to touch the database and app developers only touch the the code. Except inside Blend, the seperation is the XAML/UI from the code behind.  Hopefully, this makes sense as to why Microsoft decided to seperate the heavy design operations to another product.

By now you are probably asking yourself:  So what can Blend do for me? 

  • Currently the Silverlight 2.0 SDK adds very little design support inside Visual Studio 2008.  A developer can definitely lay out a simple application; however, harnessing the true power of Silverlight with animations/effects/styles/templating is not all there.  As I mentioned above, I don't believe this will change in the RTM for the simple fact that it would be a real mess to try to add all the tools that Blend provides inside the VS shell.
  • Silverlight 2.0 uses Blend 2.5 (This might change when the RTM version comes out) and this gives Silverlight 2.0 first-class design support for layouts, controls, animations, styling, templates and resource management.  All these items that a developer would normally have to code by hand inside XAML are done for you simply using the Blend product.
  • Blend has excellent integration with Visual Studio 2008.  A developer can write a piece of code, jump to Blend, add a new control/user control and jump right back into Visual Studio and add some code behind.  This is all done very seamlessly and the integration is fantastic.  Blend can even build the entire Silverlight solution and perform test runs inside Blend as well!  Even as of Beta 2, this integration is first class and I cannot stress the power of this feature enough.
  • Blend is much more than just dragging and dropping a button and changing a color or a brush.  The true power of Blend comes with the ability to spice up an application with animation/transitions/styles quickly giving a Silverlight applications that fluid/liquid interface that many compare to the iPhone for example.  Blend does this by using a set of tools that expose XAML functionality (Remember, Blend just writes XAML).  For example, creating a new button that looks completely different but behaves like a button is straightforward or attaching a set of transitions for mouse events is easy simple.  These kind of additions not only make the UI look modern but can add visual queues, emphasis, enhanced spacial layout that were harder to do but add greater value to the application.
  • Blend is not just for a designer.  Not every IT department is going to have a dedicated designer able to strictly focus on pretty designs.  I am not a designer.  However, I dabbled with PhotoShop, GIMP, etc., and I could not do much beyond the tutorial I was using.  Blend makes creating a first-class design clear once you have a good understanding of the capabilities of the product.  The product definitely has the designer in mind; however, even a developer can use it and extend a Silverlight design.
  • Creating advanced custom controls usually has been left to 3rd party libraries.  Furthermore, creating professional looking controls demanded knowledge of GDI+ (which wasn't easy).  Creating professional custom controls/user controls has never been easier with Blend.  Personally, I have created simple mashup controls to pretty complex grid controls and it was actually pretty fun.  In my opinion, Blend is really going to give some of the 3rd party controls a run for their money in Silverlight 2.0.  The tools inside Blend drop the learning curve signifigantly for creating custom controls.
  • Blend essentially gives you the tools to bring Silverlight applications to life and to design Silverlight applications using best practices for future enhancements, data binding, templates, etc.

From the list above, one can see that Expression Blend does a lot for you!  This is why I feel it is a must, even for a developer, to learn Blend real well (unless you are the sadistic kind and like to crack open Notepad and hack XAML). Understanding Blend will allow a developer or a designer to bring their applications to life and harness the full power of Silverlight. 

kick it on DotNetKicks.com

Posted: Jul 25 2008, 17:18 by Bart Czernicki | Comments (8) RSS comment feed |
  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Blend | Silverlight
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us
blog comments powered by Disqus