Passion * Technology * Ruthless Competence

Tuesday, March 04, 2008

Lunchtime Coffee 153

Posted By Harry Pierson at 12:28 PM Pacific Standard Time

Wednesday, April 11, 2007

Is Guidance Automation Too Complex?

Over the past couple of weeks, I've gotten a chance to spend time investigating the Guidance Automation Toolkit. For those who aren't familiar with GAT, it is the underlying enabling technology that powers p&p's Software Factories. Several of p&p's factories include data access guidance, but that works against an actual database rather than a VSTDB project. Given my newfound love for VSTDB + my interest in GAT, I thought I would whip up some simple automated guidance.

The key word in that last sentence is "thought". Turns out that authoring guidance in GAT is extremely unfriendly. GAT's unit of automation is called a recipe, which consists of arguments, wizards and actions. Arguments are GAT's equivalent of variables, wizards gather argument data from the user and actions execute changes to the solution based on the values of the arguments. There's more granularity to the GAT authoring model - for example, GAT arguments have optionally have value providers and converters (which should be called validators) - but you get the basic idea.

What makes GAT so hard is that all these recipe elements are wholly independent. This makes individual recipe elements easy to write and recipes fairly modular, but at the cost of making recipe very difficult to write. Your recipe has to define both the list of these elements that it uses as well as their interconnections. For example, arguments optionally contain value providers and converters. They are exposed to the user in wizards as either custom pages or arguments. They are fed into actions as input parameters. Action input parameters can also come from the output parameters of other actions. All these interconnections have to be hand coded in XML with fully specified type names like "Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library". Ugh.

The good news for GAT is that help is on the way. Clarius' Software Factories Toolkit includes a graphical domain specific language for authoring recipes. With that tool, you can pick the various recipe elements from a list and connect them graphically instead of hand coding all of that in XML. But why do we have this problem in the first place? How much are we gaining by using this XML format in the first place? Frankly, I don't think very much. I think it would make more sense to define recipes in code than XML.

I was talking to Michael Lehman about Project Glidepath, which is built on GAT. However, Glidepath only uses GAT for integration with Visual Studio's menu system (which seems much more difficult than it needs to be, but that's a separate post). Instead of GAT's recipe system, Glidepath plugins simply expose an Execute() method. Within that method, the plugin can do whatever it wants. Michael showed me the code behind the Vista Bridge package, and it is MUCH simpler than the GAT equivalent. I could see having a little more structure than just Execute(), but GAT seems like overkill in comparison.

Sometimes complexity is necessary. But I can't help but think that GAT's complexity wasn't really necessary. Wouldn't it have been simpler and just as modular to define a recipe in code instead?

Posted By Harry Pierson at 11:07 AM Pacific Daylight Time

Thursday, February 22, 2007

Morning Doughnuts 5

  • Joel Dehlin, a former Microsoft employee and the CIO of the LDS church is conducting a series of tech talks. The next one is being planned for the bay area. If you are interested you can respond to his post here. The dates would be between April 22 - 26 with a tentative agenda as follows:
      • Keynote
      • Infrastructure breakout
      • Development breakout
      • Interaction Design breakout
      • Community breakout
      • Building to building video breakout
  • Everything needs a 12 step program now. CNN has a 12 step program to cure your email addiction here. I started thinking about this after Harry's post saying he had hit zero email bounce prior to going on his secret mission.
  • I read an interesting blog on XNA and how it fits into Microsoft's strategy in gaming. I am not sure I agree with all of the points, but I found the arguments to be compelling.
  • My BYU Cougars are now up to 21 in the AP Poll. I can't think of a year when both the football and basketball teams have both had such successful seasons.
  • Between today and tomorrow I will be finalizing my vision document for how I think monitoring should work in the Service-Oriented Infrastructure project I am on. As I was outlining my vision it really hit me how much there is to do.
Posted By Dale Churchward at 10:15 AM Pacific Standard Time

Monday, February 19, 2007

Morning Doughnuts 2

  • Joel Dehlin, the CIO of the LDS church has an interesting blog entry on buy versus build this morning. His main point is that buying is often cheaper, but only if you can move your business processes to match the processes in the off-the-shelf software.
  • The search for Jim Gray by his friends and colleagues has been called off. Even with a massive high-tech effort no new clues have been turned up. For the sake of his family I do hope that the mystery is solved. I would imagine it is very hard to not know what happened to him.
  • I am currently running a Build and Deployment Task Force. We are trying to ensure that our team follows best practices when building new applications. The project that Harry and I are working on seems to be a good test bed for the process.
  • For those of you who read my blog you know I am passionate about how we implement Service-Oriented Architecture in the real world. I have been reading a book titled Service-Oriented Architecture: A Planning and Implementation Guide for Business and Technology. I find the description of real business objections, and how to solve them quite refreshing.
  • It appears that the San Diego Chargers are going to hire Norv Turner to replace Marty Schottenheimer as their head coach. I don't see how fans of the Chargers can possibly see this as an improvement.
Posted By Dale Churchward at 10:04 AM Pacific Standard Time

Tuesday, January 30, 2007

Hawkeye on Web Service Software Factory

As I wrote the other day, I've been investigating the Web Service Software Factory. The WSSF includes four guidance packages: Data Access, ASMX, WCF and WCF Security. The Data Access isn't service specific (I'm guessing it's also included in p&p's other factories) so I didn't focus on it much. I also didn't investigate the ASMX package at all.

For the WCF and WCF Security packages, I walked through the tutorial in the documentation. The tutorial contains the usual WCF suspects such as creating a data contract, creating a service contract and implementing a service contract. While you can do these things manually, the WSSF provides wizards for most if not all these operations. This seems like overkill for some of these operations. For example, filling out the grid of data contract members was more cumbersome (for me) then just typing the values in the code file.

Also on the subject of somewhat more complex than necessary, WSSF provides wizards for building type translators. This is pretty standard stuff: given an instance of a given type, the translator returns an instance of a different type. Again, I find it faster to write the code for this directly than to individually select the matching fields in the wizard UI. Somewhere on the complexity scale between CRUD stored procedures and service data contracts is the tipping point where it's faster and easier to just write the code than it is to manipulate the wizard UI which generates the code.

On the plus side, the WSSF includes snippets which are very convenient to use. For example, WSSF includes the WCFDataMember snippet (short name: wcfDM). It's a lot like the standard prop snippet, but with the automatic addition of the DataMember attribute.

I had much more success with the main WCF package than I did with the WCF Security package. I wasn't interested in the anonymous or direct authentication mechanisms, which left only two security recipes that I cared about: kerberos and x.509 certificates. Unfortunately, I couldn't make either of these tutorials work. For kerberos, the baseline configuration works (i.e. standard wsHttpBinding with no additional configuration), but after running the "Secure a Service Using Kerberos" recipe, I get an exception that "The token provider cannot get tokens for target". It wasn't in me to debug the sample to figure out what that meant. For x.509 certificates, I can't even complete the wizard - I click OK in the certificate selection dialog, but the wizard doesn't get updated and won't let me continue.

I really dig the new Guidance Navigator window, especially the history window, but I do have one problem with it. Is there a way to mark a recipe so it doesn't show up in the history view? The WSSF includes some recipes like "View Service in Browser" and "Run Client" that don't change the project state and quickly clutter up the history view. It would be great if they didn't show up there in the first place.

I'm guessing the WSSF is designed primarily new WCF developers, so I'm not exactly in the target demographic. Many of my issues above stem from my deeper than average experience with it (though nowhere near the depth of experience some members of the community have already). But it's a good start and I'm sure it will get better with successive releases.

Posted By Harry Pierson at 2:53 PM Pacific Standard Time

Saturday, June 25, 2005

Real World GAT - NUnit Converter

Jim Newkirk has released an alpha version of a utility to convert NUnit tests to VSTS tests. What he doesn't mention in the post is that he's using GAT to integrate this conversion functionality into VS05. Basically this conversion is an "unbounded recipe" which means that any time you right click on an item in the solution explorer, the NUnit Converter uses Visual Studio's CodeModel functionality to analyze the contents of the file. If the file is a C# file and has any NUnit test fixtures in it, NUnit Converter adds a "Convert NUnit Test Code" item to the context menu.

From a cursory glance at the code (which Jim was kind enough to send me) it doesn't look like it took very much GAT code to integrate into VS. Of all the files in the solution, there are only three that relate to GAT - the Conversion Action (i.e. the code that initiates the NUnit -> VSTS conversion when you select the context menu item), the Conversion Recipe Reference (i.e. the code that determines if the conversion menu item should be added to the context menu) and the Selected Project Item Provider (i.e. the code that retrieves the selected file from the Solution Explorer). There's also the XML file that defines the recipes. Everything else as far as I can tell handles the conversion itself and has nothing to do with GAT.

It's cool to see a real-world usage of GAT and that using GAT is a pretty low-impact effort given the VS integration benefits it provides.

Posted By Harry Pierson at 7:38 AM Pacific Daylight Time
Change Congress
Recent Bookmarks
Tags .NET Framework (2) __clrtype__ (9) ADO.NET (5) Agile (7) AJAX (3) Architecture (288) Guidance (6) Interop (2) Modelling (61) Patterns (7) Process (4) SOA (94) Web Services (5) ASP.NET (25) Async Messaging (2) Azure (1) Battlestar Galactica (3) BI (2) BizTalk (4) Blogging (117) dasBlog (11) Podcasting (4) BPM (1) C# (11) C++ (4) Capitals (5) CardSpace (3) CLR (2) CodePlex (1) College Football (10) Comedy Central (1) Community (81) Concurrency (6) Consumer Electronics (1) Database (13) Debugger (23) Dependency Injection (2) Development (122) C Plus Plus (1) Embedded (5) Lanugages (42) Media (2) P2P (11) Rotor (1) SharePoint (6) SOP (3) DIY (1) DLR (25) Domain Specific Languages (15) Durable Messaging (5) Dynamic Languages (12) Dynamic Silverlight (1) Education (3) Enterprise 2.0 (1) Entertainment (14) ETech (15) F# (51) Functional Programming (17) Game Development (2) Guidance Automation (3) Hardware (8) HawkCodeBox (1) HawkEye (3) Health (1) Hockey (31) Home Electronics (1) Home Network (5) Hosting API (1) Humor (5) IASA (1) Idempotence (3) infrastructure (5) Instrumentation (4) Integration (2) IronPython (112) IronRuby (16) Java (2) Job (3) Kodu (1) LangNET (2) Lightweight Debugger (5) LINQ (23) Live Framework (3) Live Mesh (2) Lost (1) Master Data Management (1) Media 2.0 (6) Microsoft (31) MIX06 (2) Mobile Phone (1) Monads (5) Morning Coffee (172) Object Oriented (4) Office (5) Open Source (8) Open Space (2) Operations (3) Other (135) Art (1) Books (1) Family (33) Games (18) General Geekery (27) Home Theater (1) Movies (23) Music (20) Politics (3) Society (1) Sports (37) Working at MSFT (19) Parallel Programming (3) Parsing Expression Grammar (16) patterns & practices (2) PDC08 (5) Politics (48) Polyglot (3) PowerPoint (2) PowerShell (39) Presentation (7) Projects (1) HawkWiki (1) Pygments (5) Python (6) Quote of the Day (4) Refactoring (1) Research (2) REST (18) Reuse (5) Robotics (2) Rock Band (4) Rome (5) Ruby (23) Ruby on Rails (1) Sci-Fi (2) Scripting (4) Security (3) Service Broker (14) SharePoint (2) Silverlight (20) Social Software (1) Software + Services (2) Software Design (2) Software Engineering (1) Software Factories (11) Software Industry (1) Space Elevator (1) Spark (1) SQL Server (2) Stephen Colbert (1) TechEd (7) TechEd06 (1) TechRec League (1) Television (6) Travel (7) Unified Client (1) Unit Testing (4) USC (1) UX (1) Virtual PC (2) Visual Basic (3) Visual Studio (20) Volta (2) Washington Capitals (37) WCF (31) Web 2.0 (67) Web Services (7) WF (21) Windows (3) Windows Live (29) Windows Live Writer (3) WPF (8) Xbox (1) Xbox 360 (54) XML (11) XNA (15) Zune (4)
Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion.