Santosh Benjamin’s Weblog

November 25, 2008

Blueprints Diary 2 : Getting Started – The Videos

Filed under: Blueprints, DSL, Factories — santoshbenjamin @ 2:13 pm

Mike Lehman has posted a set of screen-casts on Channel 9 that explain the process of authoring and composing blueprints, including how to use the WF process workflow, creating custom extensions, using T4 etc. Here is the list of videos and a short summary (the C9 abstract) of each and my comments wherever applicable.  I spent a useful afternoon last weekend watching every one of them

(1) Microsoft Blueprints 101 – The SimpleEdit Blueprint : In this screencast (10 minutes, 34 seconds), Michael Lehman demonstrates the essential features of the Microsoft Blueprints Manager by walking through the sample SimpleEdit Blueprint. Here Mike shows how to use the Blueprint to build another text editor.

(2) Authoring Blueprints – Introduction : In this screencast (6:05) Michael Lehman introduces Microsoft Blueprints. This shows how to build a Level 100 blueprint with only word based guidance and no code.

(3) Authoring Blueprints – Adding Project Templates : In this screencast (3:27) Michael Lehman describes creating Microsoft Blueprints using custom project templates. Mike only demonstrates the single project template here but the written guidance includes some information on how to use multi-project templates and links to the MSDN article on multi-project VSTemplates. In future versions of the Blueprints we may have a UI for simplifying the creation of multi-project templates. Although creating such a template is fairly simple, hand-editing the XML doesnt make for a great experience, but this is a Visual Studio feature not a Blueprints feature.

(4) Authoring Blueprints – Composing Blueprints : In this screencast (5:26), Michael Lehman demonstrates how to combine Blueprints together using composition to create composite Blueprints. The feature of linking blueprints is shown here.

(5) Authoring Blueprints – WF-Process Workflow: In this screencast (5:32), Michael Lehman demonstrates how to create structured process guidance using Windows Workflow Foundation (WF)

(6) Authoring Blueprints – Custom Command Extensions using WF: In this screencast (7:58), Michael Lehman demonstrates how to create custom Visual Studio automation command extensions using WF. Mike shows the addition of a menu item that appears on the “Project” item and it is possible to have more sophisticated and custom filters so that menus show up only for , say . C# files in a particular project and so on. Although there are a few manual steps to get them all linked up, i think its still much simpler than the GAT route.

(7) Authoring Blueprints – Creating custom Command Extensions in C# : In this screencast (5:35), Michael Lehman demonstrates how to create custom command extensions using C#

(8) Authoring Blueprints – Using T4 Templates : In this screencast (4:01), Michael Lehman demonstrates how to use T4 templates with Microsoft Blueprints. Only a very basic T4 template is shown which is sufficient for the purposes of the demonstration. For more information on T4, read Oleg Sych’s T4 tutorial series. 

(9) Authoring Blueprints – From sample application to Blueprint :  In this screencast (7:08), Michael Lehman demonstrates how the sample editor application was converted into the SimpleEdit Blueprint. This is quite useful and shows how we can convert our own working applications into Blueprints. Only some of the blueprint features are shown here but a larger reference blueprint will be made shortly to cover all the other features.

Case Studies

(1) Infosys Blueprints Screencast : Watch a demonstration (10:10) of the Infosys Blueprints on Channel 9. Follow along as Farrukh Nizami uses the Infosys Blueprints to build a layered web application that incorporates Silverlight, WCF and LINQ to SQL. I put in some comments on the Channel 9 post as well regarding the patterns used.

Creating Blueprints – Article

(1) Creating My First Blueprint: An Infosys blog article explaining the process of creating a blueprint in detail.

Hope you find the links above useful. There’s some good discussions going on at the codeplex site as well.

November 14, 2008

Teach Yourself DSL-Tools

Filed under: DSL, Factories — santoshbenjamin @ 5:54 pm

Finally!! We now have an end-to-end walk-through published on Code Gallery. According to Jean-Marc Prieur, the author of the lab,

“The idea is that, if you complete this Lab until the end, you’ll be able to create your own modeling graphical designers using the DSL Tools technology, and the code generator that will generate code, documentation, configuration files or whatever textual artifact you want, from the information that is entered by the designer user. This will probably take you one day to complete it, but it’s really worth it!”

Jean-Marc Prieur has strong DSL credentials, being a key player in DSLFactory.org, a french community around VSX and DSL Tools and also the author of the WCF Designer and DSL Utility Library.

Another good resource to learn DSL Tools is a set of videos in the How-Do-I video series on MSDN. These include the following (in the VSX category). It might be a good idea to watch these first (they are each around 15-25 minutes long), if you want to see what this is all about before diving into the lab.

  • #21 How Do I: Get Started with the Visual Studio Domain Specific Languages? : Learn what the Domain-Specific Language (DSL) tools are in the Visual Studio Software Development Kit (SDK). Dylan Miles briefly explains some of the main concepts and how to get started.
  • #20 How Do I: Create And Use T4 Templates? : Learn about the Text Templating Transformation Toolkit (T4), the code generation engine used as part of Domain Specific Languages and Software Factories projects. With the T4 toolkit now built directly into Visual Studio 2008, you can easily add code generation to your arsenal.
  • #22 How Do I: Generate Code from my Domain Specific Language using DSL Tools? :Use the power text template engine built into Domain-Specific Language (DSL) Tools to generate code from a model created by a Domain-Specific Language.
  • #23 How Do I: Create and Customize My Domain Specific Language? : Learn how to create and customize your own Domain Specific Language using Visual Studio DSL Tools. Dylan Miles shows you the basics of creating your own domain classes, changing the visual properties of shapes, and adding your own custom properties.
  • #24 How Do I: Use Advanced Customization?  : Learn how to override functionality in the generated code of your Domain Specific Language. Dylan Miles explains how using a custom constructor, custom storage for your shape and domain classes as well as hooking events to your shape classes.

Channel 9 also has an excellent video titled “Exploring the new Domain-Specific Language (DSL) Tools with Stuart Kent” where Stuart (a senior program manager on the VS /DSLTools team) explains what they are all about and creates a DSL from scratch.

Enjoy….

Blueprints Diary-1: Getting up to speed

Filed under: Blueprints, Factories — santoshbenjamin @ 2:39 pm

In a previous post, I called out the fact that the GAT technology is now evolving into its next version, Blueprints, and also shared why I think this is a great idea and how Blueprints makes up for deficiencies in GAT. In this series, my aim is to learn this technology and share it with you as I go deep into it. Although I never got round to blogging in detail about GAT, I did closely follow along with the progress in that space, notably concentrating on how the Service Factory implemented GAT and DSLs. So here , as we look at building and using Blueprints, we’ll also compare and contrast GAT along the way (and if the GAT content gets pretty large then I’ll hive that off into a separate set of posts).

Of course, with me being a BizTalk guy, for me it all comes down to whether these things can help with BizTalk development or not and I certainly think they can. So expect a call-back in most posts to relate it to the BTS world. The BizTalk Solution Factory has made a great start in this area (using GAT) and I do believe that with Blueprints we can take BSF to the next level.

Okay, enough preamble. Let’s get on with it. Here are the resources I’ve come across to help get started.

(A) Overview stuff

  1. MSDN – Overview (landing page) : pretty sparse at the time of writing this. Expect a lot more to come.
  2. MSDN – Introduction to Blueprints: Puts blueprints into context, explaining how it ties in with Software Factories 2.0 and what to expect from the Blueprints family of offerings.
  3. C9 – S+S Blueprints: A short video where Mike Lehman explains what S+S is and what the S+S Blueprints are all about. This was done quite a while ago when, IMO, Software Factories 2.0 hadn’t been written about, so there’s no mention of GAT/GAX or DSLs. There are a couple of other videos on Multi-Tenant data access blueprints and a Silverlight blueprint for Sharepoint. I’m not looking into the S+S area now although I suspect that when Azure starts to take off this will gain more significance.
  4. Infosys – Microsoft Blueprints – Building Process Oriented Contextual Guidance: Infosys, one of the top Indian SI’s are also one of the earliest adopters of the Blueprints technology. This article puts Blueprints into context.

(B) More Details On Blueprints

  1. C9 – Beyond VS Packages : A fairly detailed video talking about what to expect from Blueprints and a general sense of where the technology is headed.

(C) Building and Using Blueprints

  1. MSDN – Inside Blueprints : Talks about the levels of blueprints and a quick overview of the Blueprints Manager tool. This page unfortunately has serious formatting problems at present with the content defining each “level” being all over the place. I’ve pinged Mike about it so I hope it gets revised soon.
  2. C9 – S+S Blueprint Walkthrough: This screencast is a walkthrough of using the first S+S Blueprint, the Outlook+Services Blueprint. Mike shows the process of building an add-in for Outlook. The add-in is like Twitter and he calls it “Mumbl”. The process is much faster )(when compared to raw VSTO based development) because of the help of blueprints to code-gen some parts of the solution. If you are used to GAT, then this is no big deal. In fact there’s no automated generation of standard project naming conventions and all the other stuff we are used to in GAT. So from that respect its a little disappointing but remember this was done in Nov 2007 and so there’s no equivalence to GAT there.

(D) Blogs to keep an eye on

At this point in time, look out for these blogs. As the P&P team gets deeper into this, many of their blogs will contain good information. I shall highlight them as they become available and if you come across others, let me know.

  1. Mike Lehman: the lead architect for Blueprints.
  2. SF Team Blog
  3. Infosys Blogs on Software Factories
  4. Mine ? : well, I’ll leave that to you to decide  :-)

So, this should be enough to give you an idea of what’s out there. My next post will be on getting started with the blueprints manager, installing the existing samples and looking at what’s in the boxes (this inspection tends to get missed out often when looking into new stuff – we can learn a lot by diving into the existing blueprints) and then we’ll look at writing our own blueprints (which is where the real fun is).

However, If you can’t wait to get started, then make sure you have Visual Studio 2008 (Standard and above) with SP1 and head over to the codeplex site to grab the bits and look at the discussion forums for a couple of issues that have already been posted there.

As always, your feedback is welcome. As the series progresses, let me know if there’s anything specific you would like me to cover.

November 7, 2008

GAT is now Blueprints

Filed under: Architecture, Factories — santoshbenjamin @ 1:20 am

The old GAT is dead! Long live the new GAT aka “Blueprints“. This news caught me by surprise. I thought I was fully abreast of the happenings in this area, but was caught napping. [Ok, so I'm being a bit dramatic here. GAT isnt actually dead but has evolved into a new offering thats IMO much better. As far as the old GAT (runtime, support, tools etc) is concerned , I've put in a couple of points at the bottom of the post, but make sure you check the official support information before making any long term decisions on all this].

So, what’s all this Blueprint stuff about?. Well, essentially GAT/GAX and the first set of factories (Service Factory, WCSF etc) all validated the concept of factories and established how tooling could work and where it fell short. VS Extensibility has also improved a lot since these factories first came out. So its now time to take the concept of Factories up one level into Software Product Lines etc which is closer to the original vision of factories. Along with the P&P factories, there was a separate project called Glidepath for ISV’s which provided lightweight tooling and was instrumental in delivering the S+S Blueprints. It made sense to align the two areas together and thus the new project.

An excellent video which introduces the Blueprints concept including demos of currently available blueprints can be found on Channel 9 titled “Beyond VS Packages – Adding Value with Blueprints” and is presented by Jack Greenfield and Michael Lehman. Some of the things that I find really cool and worth calling out here are

  • Dynamic Versioning
  • Workflow Based Process
  • Workflow Based Commands
  • Design & Runtime Composition
  • Designer Integration
  • TFS Integration

I’m not going to talk about them in depth as Jack and Michael explain them  very well in the C9 video.

The big problems I found with GAT were (a) the authoring experience and (b) the appalling lack of good documentation. In terms of the documentation, the CHM files provided with the install gave a quick overview of recipes and actions and then dived straight into class library level. Having info on class libraries in the tool is ok when you have grasped the basics and are productive to some extent and then need to look deeper. There were a few blog posts by folk who had played with it, but no official stuff. You had to learn by poking into existing factories like Service Factory etc.

In terms of the authoring experience, GAT is too low level. Hand editing XML files doesn’t make for a great authoring experience. Clarius Consulting played a big role in helping matters with their Software Factories Toolkit (SFT) and in fact that toolkit was even used in the Service Factory and also in the BizTalk Solution Factory.  The SFT introduced the concept of a visual designer for recipes and actions. The P&P team did a nice thing in releasing the Guidance Extensions Library (GEL) where you could cherry pick the recipes and actions they used for various factories and put them into your own. But IMO, the thing that was missing was an overall design tool, which, for instance, could allow you to put all the items from the GEL and your own into a sort of toolbox and then drop them on to a design surface to build your package.

Now I was pleasantly surprised to discover that the Blueprints does feature this sort of design tooling, specifically using WF to achieve this (essentially GAX Actions become WF Activities). WF is a perfect fit for this sort of thing so I’m glad we’re getting this kind of authoring support. WF is not only for the package building but the whole guidance process is represented as a workflow. With the WF based process, the guidance can even take on a “parallel” nature. This will  be useful for some packages where after a certain number of steps which lay the foundation, you can do any other actions that dont have to follow a sequence or which arent dependent on each other.

Now, one of the limitations with GAT was that if a menu item  (corresponding to an action) was missing or disabled, you were left wondering if there was a problem with the package. With Blueprints however, we can see what actions are available or not depending on pre-conditions and post-conditions so there is no guesswork involved in knowing what comes next. Blueprint authors can use pre and post conditions to examine the solution or check an external system (say a live web service) and do various other things as part of the flow. This makes ‘composition’ of actions much easier because an action can come with a little ‘pack’ of conditions to help the author decide where it slots in the oiverall flow and what guidance or extra steps may be required between one action/step and another.

The story now gets even better with Design & Runtime composition which is explained in the video.

Going back to GAT/GAX, two key things are

(a) there will be a ‘rev’ of GAT/GAX for VS10, but no new functionality and no changes to the current set of factories and

(b) There will be a migration blueprint which will allow authors of current factories to move their code-base into the new system and the GAX runtime will still be available so actions will continue to work. I imagine this migration blueprint will be intensely dog-fooded as the P&P factories would need to move to this platform and they have made a large investment in GAT.

Another thing which is worth pointing out is that we’ve still got a long way to go to Dev10 etc and although we are in the Blueprints 2.0 era already, in terms of the GAT ‘integration’ I think there’s a long way to go. GAT may have authoring issues but its pretty rich functionally and once you really get into it you can be quite productive. I’ve started to poke into Blueprints now and trying to ascertain whether it really is ready to take over from GAT. At this point, I’m not totally sure it is, but I could be wrong. Let’s see. GAT isn’t really dead yet, but if you are just starting to look at factories, its best to understand where things are headed.

Looks like the world of VS10 and associated products/offerings is going to be very exciting and productive indeed.

Blog at WordPress.com.