Tuesday, March 06, 2007

Getting Started With CAB

I’m starting to scratch the massive surface that is CAB.  CAB is better known as the Composite UI Application Block developed by the Patterns & Practices Group at Microsoft.

It’s hard to define exactly what CAB gives you in one sentence, but I’ll try.  How about manageable windows forms architecture with an emphasis on patterns ?  I’m an ASP.NET guy, so that’s where my expertise lies, however I have built a few moderately sized WinForms apps and they get unwieldy very quickly.

I plan on posting a bit about CAB as I dig into it, so stay tuned for that.  For now I’ll just post my first experience with it:  Getting the darn thing installed.  In tune with many CTP and early release software, it doesn’t always go as smoothly as planned.

First thing to do is install the following things in the correct order:
(I assume you already have .NET 2.0 and Visual Studio 2005 installed)

I found some sources on the internet that listed those in reverse, and I got an error at the Guidance Automation Toolkit installation that said “Operation invalid for the current state of the object.”

In my case, I got the error even after uninstalling them all, but I was able to fix the error by modifying the registry.  Open regedit and navigate to HKEY LOCAL MACHINE\SOFTWARE\MICROSOFT\COMMAND PROCESSOR\.  There should be a key in there called AutoRun.  I renamed this to AutoRunOld and the installation worked.

(I have a feeling that this setting was modified by an XPize installation, since they modify your command prompt settings… but I haven’t confirmed this.)

Now that everything is installed and running, check out these resources to get your feet wet with CAB:

The next post will definitely contain more “meat.”

Tuesday, March 06, 2007 9:01:03 PM (Central Standard Time, UTC-06:00)
not too belittle the CAB, and I fully understand that it is beta software, but anything that you have to install in a specific order, and then modify the registry on top of that, it just makes me shiver.

I wish microsoft would just adopt an approach like Castle, NHibernate or any OSS, and use a CVS to manage all of their beta software, this would make it alot easier to manage along with CI.

This is THE reason I stay away from these types of microsoft projects, maybe I am hurting myself by not learning them early on, but I find I spend more time jerking with the software than I do actually using it.

Sorry to rant, but some things MS does just chaps my @ss :P
Tuesday, March 06, 2007 9:46:18 PM (Central Standard Time, UTC-06:00)
In Microsoft's defense, this is beta/preview software, and usually the install experience is last on the list before it goes RTM.

But I'd have to agree with you that many other less funded projects are a bit cleaner to get started with.
Wednesday, March 07, 2007 1:50:34 PM (Central Standard Time, UTC-06:00)
Sweet, I'm gonna start working w/CAB in the next couple of weeks.
Friday, March 16, 2007 11:17:10 PM (Central Standard Time, UTC-06:00)
Hey Ben -

Having been down this road for some time now I highly recommend this approach or a similar take:

http://laribee.com/blog/2006/10/31/managing-state-in-cab-smart-clients/

Seems self-promotional but, trust me man, the state bag in WorkItem is dangerous and makes testing difficult.

/ Dave
Comments are closed.
Loans - Credit Card - Mortgage - Credit Counseling