My Headlines

Monday, November 19, 2007

The New Asset Management and Version Control with Expression Studio

by Don Burnett

 

It's the age-old clash programmers versus designers.  The arguments have been very clear over the years, the solutions have not been as clear though. Process ends up ruling the day in most scenarios.. Let's take a look a bit closer:

The Designer: "Boy this really messes me up, I hand-off a complete design to the developers and they carve it up like the Thanksgiving turkey. By the time their are done, all the integrity of the look and feel that I worked so hard on will be gone. They might as well had not hired me to do this in the first place if it was going to go down like this.."

The Developer: "Wow these designer folks, they come up with some cool looking stuff, but boy when I have to go through and engineer it, they get all stressed and upset, because I have to break it down into something I can use.. If after I have the design engineered, they go back in and break my code.. I really hate this process, the designers step all over my work and make me work twice as hard when I have to fix something. They go in to change or fix their design and break all my hard work. I like how things work when I am in charge of everything, after all programmers are the project leaders, nothing would get done if not for us..."

Why do we hear these complaints? Until now things like web projects and even desktop applications graphical assets and design and scripting have usually existed in the same page. This is most evident in a web project where you have HTML and scripting existing in the same place.. It's not only the designers that were unhappy with the process but the developers themselves. What has this done for the platform in general? Well hold things back mostly. Developers unsure of working with designers or unwilling to give them enough ownership in the project process to the designers have stifled the design process. This also means that the quality of the product that is produced many times has a bad design, or isn't functionally what it could be... Is there a solution?

Enter Expression Studio and XAML

XAML stands for eXtensible Application Markup Language and it is based on XML..  It allows you to build applications in simple declarative statements and can be used for any CLR object hierarchy (not just WPF) meaning that it can represents objects. It also allows you to separate the code completely from design. Code and content are separated so you can easily streamline collaboration between designers and developers. It's also easy for tools to consume and generate.

For instance here's a snippet of code to make a light green button appear on-screen in XAML..

<Button Width="100">OK

<Button.Background>

     LightGreen

</Button.Background>

</Button

Besides XML based elements declared in the markup the XAML file is completely separate from the code behind file. Because XAML markup needs to be well formed XML, each element defined in your markup should also be named so that when the elements are created and instanced they can be used in code and are created there as well.

<Button HorizontalAlignment="Left" Margin="53,201,0,189" Width="111" Content="Button" x:Name="myButton"/>

 

So how does this all change your workflow, since we can separate graphics designs as separate XAML pages from the code behind pages where we do various programming and scripting tasks we can work with them as separate the files. This allows us to check in the project files into version control using tools like Visual Studio Team Foundation server..

So how does this answer the designer's complaints? Well quite nicely actually.. Expression Studio doesn't have any built-in version control, but that's okay because we don't really need it at that stage of the game. The way a designer handles assets and design elements is very different than a developer. Fortunately with Expression Studio Microsoft gives you Expression Media which can allow you to catalog everything the designer is doing and working on including revisions of graphics.. This is usually separate from the version control that developers do with code projects, but is a completely separate part of the process the developer doesn't catalog or have something to do with..

How does this help the developer? Well let's examine the workflow from scratch...

 

  1. Developer and Designer get together to spec out the project with the team.
    1. Designer and developer arrive at a project format.
    2. Designer arrives at final design in Blend which is stored in a Visual Studio Project file..
    3. Finished design is handed off as a Visual Studio project to be checked into version control in visual studio.

Here is a finished project still in Blend. Notice the visual studio project icons and layout..

projectinBlend

 

Here is the same project saved out of Expression Blend and re-opened in Visual Studio 2008. Note it's the same..

projectinVS2008

After you have checked this into version control in Visual Studio both artists and coders can check-in and out new and revised versions of the same software. As a developer at that point ownership of the project should be through the version control system you are using by the developer. If the artist needs to revise the design most likely only the XAML files will change, so if they get checked in only their designs will get updated, keeping the xaml separate from the code behind page.  So any updating they do really won't effect the code. Code changes or additions usually don't effect the design because it's in a separate file.

Sure if you remove or replace or add elements, code is necessary to make events happen or something the developer will need to revise, but even if an element gets deleted from the XAML, the code should work as long as it's not referencing a deleted element which you would get a message about right away.

You might ask yourself well version control sounds like a good idea with graphics, and yes we aren't advocating you track your assets with them and why there isn't version control in expression studio itself.  It's just that programmers and artists work differently so what you as a developer might want will still get tracked, but how a designer revises and keeps changed might be a totally different paradigm and how you track changes in the design revisions wouldn't be the same way you'd necessarily do in a programming project.

ProcessFlowTest

So why isn't there version control built into Expression products? It's all about the workflow, the project is handled by artists individually. A "final version" is then submitted to the visual studio project leader and version control manager to be checked in. If this is new, the project can then begin to be coded, otherwise if it's a revision (because it's already in the project and checked in), everyone should get copy of the new XAML and an updated project file when they check out the project on the team to work from.

 

That's the beauty of version control. It's appropriate to put the requirements for version control in Visual Studio over Blend because it's likely that a developer may never need to step foot in Expression Design or Expression Blend.. Also really the "developer" not the designer should have rights over the entire project implementation.

This makes designers then able to check in updates and new versions independently without having to worry about changes.

Will Expression get real version control client capabilities? Only time will tell, but it's not necessary to be effective if you are doing proper project management and version control with Visual Studio and using it as the basis for project management..

If you have a version of Visual Studio (not Express) that doesn't come with version control, you could also check out using Subversion with it. If you do have Team Foundation Server, you have excellent version control at your fingertips that will integrate well with your Visual Studio projects once you check them in, if they came from Blend of Visual Studio itself..

If you are smaller you might want to check out version control clients like subversion, but be aware they aren't as nicely integrated and your designer folks will not want to learn or touch these. They really shouldn't be asked to in the first place other than furnishing a design with an initial visual studio project from Blend that you can check in as a developer into Visual Studio's version control. You can probably count on the fact that later down the road if further integration with Expression Studio and Visual Studio happens, it will probably be more compatible with the Visual Studio product versus third products like Subversion..

No comments: