How to partition your classes between assemblies

Eric Gunnerson has great post with some performance inspired assembly guidelines for fewer larger assemblies. Versioning and Security units of work. Good reasons.

But a non-performance reason for partitiioning into more assemblies is to stop developers from doing things like referencing your data access layer classes from a user interface layer (without going through a business object layer). If you have your classes in 3 assemblies/projects: UI, BUS and DA, where UI references BUS and BUS references DA, then it's hard for a class in UI to call a class in DA - without going out of their way to add a project reference.

Should a project always correspond to an assembly? Well that's the default but you can create intermediate assemblies called netmodules and link them together with the assembly linker (AL.exe). Net Modules are MSIL but without a manifest. You create the new assembly which links the modules together (and adds metadata) with the AL.exe.

The only problem with all of this is that you have to use the command line to compile your projects into .netmodules and link them afterwards. The net result however is that still end up satisfying Eric's performance tips with the requirement for binary partitioned UI, Business, and Data Access layers.

Risk: It's a 4 letter word

Risk is bad. But it doesn't have to kill you if you acknowledge, plan for and manage it. The most important part of risk management is to avoid the evil consequences as soon as you can in your project. Having risks show up the day before a delivery date (or later) is really really bad.

Both the Rational Unified Process and the Microsoft Solution Framework do good jobs at addressing perhaps one of the most important project management practices. I recommend to clients to make risk management a part of their team meetings - weekly if not more often. As a team, we need to identify, analyze and prioritize risks so that we can plan to deal with them effectively.

As part of identifying and analyzing risks is to accurate assess the consequences of the risk should it happen, and while this might seem silly, an accurate description of how we know the risk has turned into a problem. That may be a drop dead date, or some other description.

A good way to prioritize risks (using MSF) is to rank the impact of a risk should it actually happen. Combine that with a probability of the risk occurring and multiple them you get a probable impact or in MSF terms, Exposure. Ranking by Exposure will help you quickly identify what risks you should spend some resources on trying to mitigate.

All of this is described in more detail in the MSF Risk Management Discipline v. 1.1 pdf.

You can also download a couple of nice spreadsheets as part of the MSF Sample Project Lifecycle Deliverables which includes a huge array of other types of documents related to MSF. But I recommend starting with the Simple Risk Assessment Tool.xls at the very least.

Visual Studio 2005 Team System testing features ...

My goal is to spend some time trying out all of Visual Studio 2005 Team Systems new testing feature:

  • Test Project creation
  • Record a Web Test: records browser activity and contains a list of Web requests and various properties for each request
  • Load Test:  is a test that is designed to put a server application under heavy user load to pinpoint performance and/or scalability problems. In Visual Studio, a load test can be based on a Unit Test or a Web Test.
  • Web Test : is a test that is used to verify functionality of a Web application
  • Unit Test: tests written to prove that production code will work or works, they map very closely to development code in name and scope (one Unit test, one method).
  • Test Format Manual Test
  • Word Format Manual Test

I will break down each feature into seperate blogs should anyone like to get all my notes I'll post them as articles (they include snagits of the screens) they are very detailed step by step notes.


Now getting back to the creation of a test project if you've worked with .Net development it is no different you can select either a Test Project or an Empty Test Project you can select the language you want your test scripts to be created in (C#, VB, J# and C++) etc... Once created you have a Solution with References and a Project where you can add items to your project, the items being the above test features.


Recording a Web Test

This feature is very cool, it captures all User interactions with the browser and creates a script for each request. Each script has properties like Think Time and others that I'd like to investigate more on and blog about later. Other features is the ability to bind data to a recorded input field, to add validation rules to a script. You can validate that a text exists on a web page by simply entering for instance “My WebPage“ in the validation rule text.


 Once tests are recorded you can playback, modify, the interesting feature in running these scripts is the display of not only the data gathered but also the Web page requested per script. All this information is kept with the script for review at any time after being run.


These Web tests are not being considered for usage as true QA Functional tests but so far I do not see in some instances why they couldn't be, the purpose of these Web Test recordings is to use them for Load testing.



I am just getting into trying out VS 2005 Team System and if you stay tuned I'll be blogging on more of my findings as I go along.  I am hoping to also have a try at Compuware's TestPartner (GUI - functional test tool) integrated into VS 2005 Team System which I'm looking forward and will blog on also. 


Too late for Windows Update

I took the train to Montreal to see DevTeach Conference on Monday Tuesday. I managed to get a train without internet access so I took the opportunity to do a long time coming repave of my laptop. I installed from the Windows XP Pro SP1a msdn dvd. I knew I'd have a ton of Critical Updates to get from the Windows Update site when I got to my hotel, but at least I wasn't installed from the Windows XP gold 1.0 disc.

So I get to my hotel room and there is something like 20 critical updates to do. After I get through those there are some more iterations of recommended updates and more critical updates (on the the recommended ones). It was about an hour or so before I had my machine in a nice secure state......but the whole time I WAS CONNECTED TO THE FRIGGIN INTERNET.

I'm still uninstalling and cleaning virus crap off my VIRGIN XP install that I got while connected to the internet waiting for critical updates to secure my machine.

But the problem is that it's too late. What we need is a roll up (Windows XP SP2) but even that is going to get stale. I think what MSDN needs (or maybe Technet already has this) but a roll up of offline windows update stuff that comes out monthly. An Offline Windows Update of all critical updates that I can run on a virgin machine without connecting to the internet to get them. Isn't there some wishlist address at MS.COM I can send this too?

BizTalk 2004: New Training Course for Developers

We now have a course available for BizTalk 2004 in our Toronto office. I get so many of these requests about BTS2K4 these days. Matt Meleski, who is our BTS guru is teaching the first one on July 5th. Matt's been using BTS 2004 right throughout the beta.  BTS has improved dramatically over 2002, it's quite amazing. I hope I have a chance to sit in on part of it.

Visual Studio 2005 Team System

I watched  Visual Studio Team System end-to-end demo given at TechEd 2004 and found it to be very informative on how Unit, Web, Load and Manual Testing has been integrated into Visual Studio. I also learned that Compuware's TestPartner which is a functional testing tool can be integrated into Visual Studio 2005 Team System. The video is fairly lengthy but well worth watching.

BizTalk 2004 at Metro Toronto User Group - Jun 16, 2004 - Toronto - -18

On June 16, Matt will be speaking at the Metro Toronto User Group meeting on BizTalk 2004. An abstract of the presentation can be found below. For details on the time and location of the meeting or to register to attend, click here.

AbstractIn today's business environment, it is increasingly important to createbusiness processes that combine separate and diverse applications into acoherent whole. BizTalk Server 2004 enables you to connect diverseapplications, and then use a graphical user interface to create and modifybusiness processes that use services from those applications.

Released in March of 2004, BizTalk Server 2004 expands and improves onthe BizTalk 2000 and BizTalk 2002 Platforms. Some of the improvementsof BizTalk 2004 include:a) Built around the Microsoft .NET Framework.b) Development environment encapsulated into Visual Studio .NET 2003.c) BizTalk Projects compiled into .NET Assemblies.d) Business Rule Composer.e) Single Sign-On capability.f) many many more.

Demos and discussions will include:a) An overview of the new BizTalk 2004 development environment.b) How BizTalk fits in with SOA (Service Oriented Architecture).c) Using BizTalk Server to coordinate a Batch Job.d) Using BizTalk Server to consume a Web Service and to expose itself as aWeb Service.e) Calling business rules created in the Business Rule Composer from anOrchestration.

Marcie Robillard Speaks to Toronto .Net User Community - Jun 15, 2004 - Toronto - -25

ObjectSharp’s very own Marcie Robillard, the DataGrid Girl, will be speaking tonight at Durham College to the Toronto .NET User Community. Marcie will be talking extensively about DataGrids and Gridviews.

The lecture begins tonight commencing with refreshments at 6:00pm. It will be held in Lecture Hall UA1350 located on 2000 Simcoe Street N. More information about the event can be found here:

Getting the DataRow that is bound to an Infragistics UltraGridRow

Here is one of those posts I make because I keep forgetting how to do it. Now that I have posted it I won't forget. Perhaps someone else will be searching for this little code snipit and I will have helped them out. :)

If you have an Infragistics Grid bound to a Dataset, and you want to get the DataRow that the UltraGridRow references. Here is what you do.

Cast the UltraGridRow's ListObject property to a DataRowView and get the DataRow from that.

I'll do the code sample in VB this time.

Dim GridRow As UltraGridRow  'Let's assume you have the GridRow perhaps passed in an event argument
Dim OrderRow As

OrderRow = CTypeCType
GridRow.ListObject, DataRowView  ).row , Myapp.Orders.OrderData.OrderRow  )

This will return Null if it's an UltraGridGroupByRow.

TechEd 2004 Sesion Slides & Videos Available Online to Public

The site doesn't yet contain everything but things are trickling in.