The Blend-ed Family

by Don Burnett

If you talk to a designer you’ll hear many takes on design, everyone has a unique approach to the subject. That’s why you get diversity. If you talk to a programmer about programming you will get a significantly less diverse answer. Well he might talk to you about open source or closed source, he might talk to you about programming in a language (pick any of the 4-5 popular ones out there). However the likelyhood of talking to another programmer and not getting a bit of the same “content” mentioned in the conversation will be less likely.

I have been reading different people’s views on design tools and what they are. I hear a lot of things from both sides of the isle, one such polar opposite view from mine is from a guy named “Dave” who seems to be in the UK.. While his views are quite a bit different than mine, I still feel he does make some valid points from people of a certain point of view of a designer with no windows development experience.

My design experience comes from years of work and windows application design, including working for a company where they were scripting storybook screens with lots of little clickable hotspot animations and games and singing “M-I-C.. K-E-Y” or something like that all the time.. So I admit I am very subjective about this stuff oh since probably 1994..

While I was with this company I learned a lot about how people interact with computers including those from three years old to sixty years old.  It “instilled” upon me just how very important the user experience is. So things like click-throughs and making things as easy to navigate as possible, I find not negotiable.

One of the things I have always thought needing changed about Flash was that it was more timeline oriented than event based, and there was no way to describe all the elements of the screen and see them because of the dependence on timelines. Flex and Flash 9 adds a screen description system,  but until lately Flash was very much looked at as a timeline based system.. Events vs Timelines has always been a struggle for the interactive developer. I believe that WPF and Blend correctly makes events and triggers and timelines have the appropriate heirarchy.

When I started diving into Windows development this “screen description language” was still missing, but in it’s place was Winforms.  It was component based but at least it let you assemble a UI out of components that were layed out visually. It didn’t offer much in the way of the things I wanted to improve about how people use the applications developed for it. It was the winforms way or the highway until XAML and WPF came along.   On Windows development has always been about “events”.

When Microsoft started looking at what the next version of Windows UI would have to be like to be competitive with everyone else and they realized they could have a UI that was more open and flexible to move the platform forward.

Microsoft wasn’t out to clone some other platform they wanted to improve everyday Windows application development. They wanted to make them more internet aware, give them all the UI coolness that has been attracting people to other platforms like Flash, and of course the cool Apple style user interfaces but focused on not some generic extensions but how they could improve the standard windows UI.

Did they do this? Mission accomplished (in my opinion)..

The quality of the applications that have been showing up as proof of concept are attracting many people to writing new Windows applications however mostly people not familiar with the programming model behind Windows. Such as that is, WPF applications still have to be written like a Windows application. How difficult is that?  Well there is still a bit of a learning curve over writing a web site application in something like ASP.NET.

In a data driven website you usually have these minimum steps,

  1. Create the database
  2. Design the Web Interface
  3. Connect to the database and wire up the pages (databinding with a connection string)
  4. Start testing



When creating a WPF Application the process is different


  1. Creates the UI design in your graphics design program
  2. Export Graphics to blend
  3. Create custom screen elements interactivity and components and style
  4. pass the completed UI to the developer


  1. Take the UI project
  2. Create/Connect to the database
  3. Create your datalayer
    1. Create custom classes for your datalayer so you can represent Datasets and Tables as objects.
  4. Create business rules layer
    1. Connect busines rules to your datalayer classes
    2. code your application functionality
  5. Wire up the UI and DataBinding to your presentation layer
  6. Start testing

Where does Microsoft have a lot of work to do with WPF?  Well mainly with developer education as they try to make Windows application development more friendly.

WPF was not designed to make Flash, Flex or Apollo runtime apps, it was designed to make Windows application development more friendly.  Do they deliver on this? The best person to ask this of is a Windows application developer.

So where in this process will for instance a web developer trying to be a WPF developer go wrong?

Well lets see, if you are a web developer you might be asking yourself, well I know how to use a connection string and connect a web page to a database and databind, unless you are using the XML connectivity in Blend you might ask “where do I wire up my SQL database?”

The answer is the CLR object data source…

You can find a great tutorial in the Blend RC help system under “Home > Data > Create a CLR Object datasource”.

You might say what’s this? It’s unfamiliar to me, I usually just connect to a datasource through a data connection string and databind right to the onpage controls.

In Windows development there are multiple ways to access data sources and code them for efficiency. In a normal Windows application people create multiple  layers of code. One is a data layer, the other is a business rules layer, and a presentation layer.. The usual method is an ADO.NET datasource which talks to the datalayer. In a web application most people just talk to the database directly over ADO.

In an effort to improve efficiency of data access ,Windows applications usually have a layer of code that does all the talking for it. This is the DAL (Data Access Layer). Microsoft has been watching the fact that people are talking to data from other things than a SQL database lately and decided to support more than just that, so we now can do that one layer of abstraction higher with the object datasource. This lets the datalayer efficiently handle data easier and you don’t have to think about anything but the data as objects itself.

So how do you do it then? You create object “classes” that represetn the datatables and datasets as objects you call and work with instead of working with the database directly.

So you worried yet? This isn’t as hard as it sounds. Visual Studio gives you the tools to easily auto generate these classes (XSD, Schemas and others). I was able to do this in about 30 minutes and it’s very easy using the tutorial in blend.

Then after you are done with that (you just created your data layer) then you can use Expression Blend’s CLR object data source. You just reference the layer you have just created and then start binding your data right to your application.

Microsoft has made data connectivity very easy with Blend, but you do have to understand the layers of code in an Application and a little about programming and making “classes”.. I agree it’s not as easy as drag and drop or a timeline, but the tools make it very fast and not that bad and you don’t have to be a geek who knows much about constructors and delegates etc..

Yes, it’s a little different but actually quite easy and most developers will clue in quite quickly. Designers however will just have to do a little bit more to understand the design process but not very much.

I actually like the CLR object datasource because it means that at the level of implementation data can come from more diverse sources other than ADO.NET and it’s as easy to use as the XML datasource as well.

Is this a 5 year step backwards? Well I don’t think so. I would just say BLEND is not Flash and neither is WPF, and never was intended to be.  So stop making the comparison, and if you know of other people that are, well get them to stop too. It’s doing the whole platform comparison a disservice. If you understand Windows development it’s a big leap forward and a makes Windows development a lot easier and of course way more powerful.

Will you want to use WPF instead of Flash or Apollo? If you are doing fullblown Windows application development it’s definitely the way to go.  Otherwise, If you don’t mind a different approach and a different toolset you’ll find that you are very productive at creating Windows applications than ever before in history with these new tools. The applications you can make can have the feature richness you are used to in a real application, not just an RIA.

Anyway, I’d say just because something’s a little different don’t stop, or get lost. Keep at it slowly and you’ll get there quicker than you expect and be able to have a bigger arsenal under your belt than ever before.

I would also say click events in XAML and C# or VB.Net aren’t difficult, they work just like button events have always worked. I don’t see Blend as full blown development environment so things like this (which requires Visual Studio integration). People who don’t understand the event model which is again that of a Windows application, not an event on a timeline will make you very productive very quickly.

I would just say anyone who is a “true designer” should probably investigate a few things about Windows development before diving into Blend.  You should at least understand the concept of a Business Rules Layer, a Data Access Layer, and the Windows Event Model. Then you won’t feel so lost or overwhelmed and you’ll find yourself more productive.

I don’t think it’s true that Microsoft just sees Flash as “gaming and animation” environment, I think they see it as a path to robust windows applications that are on par with everyone else and will see Windows developers not as easily “migrating” to other platforms when they can produce the same amount of sizzle with something they already know and understand.

I do agree that Apollo ups the anti, but doesn’t have the depth yet of the Windows api’s for flexibility due to it’s need to be using features in it’s framework. WPF 3D is just one example of stuff missing. 

When you go to a system that has an event model, objects needing referenced and mapped there is a certain amount of pain in learning all of that, but it’s actually no different than the flash/actionscript people who will need to learn Flex 2 which they will have to move to for effective Apollo development and using an IDE similar to Visual Studio (okay in a generic sense, very generic) in Eclipse..

I also believe that for web browser applications Expression Web leaves Dreamweaver far behind in a cloud of dust and legacy plug-in features which people don’t use anymore..

Also I beg the question, if you weren’t creating a Windows WPF application where would you find a use for WPF anyway?

WPF and WPF/E are very different animals talking to different layers and handling things very different from each other..

Explore posts in the same categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: