Tuesday, May 18, 2010

Carolina Code Camp

I attended Carolina Code Camp on Saturday (May 15th) in Mathews North Carolina. The camp had 9 conferences and approximately 45 sessions of which I attended:
  • Introduction to Functional Programming with Scheme
  • C# Ninjitsu
  • Advanced WPF-Model-View-ViewModel Apps
  • Silverlight on MEF
  • Become an rX Pusher with the reactive Framework
A very good geek day and I came away with a couple of books:

Monday, May 10, 2010

ReMix Atlanta

I attended Remix Atlanta on Saturday (May 8th) and found it well worth the $25 to attend. The keynote by Brandon Watson on Windows Phone 7 was my favorite session of the day as it was my first exposure to Windows 7. At this point there is still a lot of details still being worked out by Microsoft such as the device specs, market place (very raw at this time) and pricing, but overall the Windows phone 7 looks very intriguing.

The conference offered 3 tracks: Windows Phone 7, Silverlight/Blend/Web and User Experience. I stuck with the Silverlight/Blend/Web track which included the following sessions:
  • Silverlight 4 and Blend 4 Essentials
  • Why Blend 4 has become Indispensable
  • What's new in ASP.NET 4 WebForms
  • Silverlight for the Enterprise
All were good but enjoyed Silverlight for the Enterprise the most of the 4 – it was the first time that I've heard of MEF and look forward to diving into it more. Another bonus was the free copy of Silverlight spy that I won in one of the sessions.

Definitely recommend attending it if the organizers offer it again in 2011.

Wednesday, May 5, 2010

Application Architectural and more Layer Diagram

In my previous post, I talked about one of the new modeling capabilities in visual studio 2010, without giving any background on application architecture which would cover what layers are. If you are lacking knowledge or experience in this area I recommend the architectural guide published by Microsoft's patterns and practices group. You definitely can't beat the price. Download the book here: http://msdn.microsoft.com/en-us/library/ff650706.aspx

I downloaded the guide a while ago so when looking for the download link, I discovered another nugget from Microsoft for layer diagrams. From the same URL above you can download layer diagram templates that match what is covered in the book.

  1. After installing create a new layer diagram and your toolbox will contain the following:

  2. When I selected Rich Client Application it added the following to my diagram.


  3. Now you can create your projects and add them to the correct layer. Then add your dependencies. Which brings up another point I skipped in my last post, if your solution is already up and running and projects referencing each other the way you want modeling you can have Visual Studio auto detect dependencies by selecting "generate dependencies" from the context menu:

Saturday, May 1, 2010

Visual Studio 2010 - Layer diagrams

Disclaimer: The feature described in this post requires either the ultimate or the premium editions. For a good visual of the edition differences see the visual studio 2010 editions poster (http://vs2010quickref.codeplex.com/)

The layer diagram is a new feature in visual studio 2010 which allows an architect to visualize applications layers and the desired communication and dependencies between the layers and components. Big deal right – you can do that in power point if you had to. Ah but the goodness with the layer diagram is that it can enforce the dependencies between layers. Therefore it is possible to stop rouge leader from having the UIX layer from accessing the data layer directly.

Getting Started

  1. Select New Diagram from the Architecture menu in visual studio
  2. Select Layer Diagram and give it a name. I recommend also adding a new project that will hold your various diagrams.
  3. Now using the toolbox, you can add you application layers and the dependencies between them
  4. To enforce these dependencies you can associate your solution projects to the appropriate layer. Using the solution explorer drag each project to the appropriate layer. Each layer will show a count of projects associated with the layer.
  5. This view shows how many projects are associated to each layer, but to see the actual projects you need to open the layer explorer
  6. The layer explorer:
  7. You can now have visual studio validate that your solution matches your architecture by opening the context menu and selecting validate architecture. This will return errors if you solution validates your diagram.
  8. Tie the validation to your builds and TFS work items:
    • You can modify your modeling project to validate on every build
    • If using CI (Continuous Integration) with TFS or MS Build you can add an option to validate your model with every build.
    • You can add work items for each violation

Wrapping it up

I've shown a very basic layer diagram but MS has provided screenshots of the potential diagrams with a true enterprise application

For more information and details see: