Three Is It

Because two isn't enough and four is just too many

That government is best which governs the least.
Thomas Jefferson
Home Blogs Genealogy Brad's Bookshelf Subscriptions Contact Sign in
 

About the author

Brad Butts is a .NET developer and architect. He is married with children and enjoys reading, working out, and genealogy is his five minutes of spare time.
E-mail me Send mail
National Debt Clock

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

TechEd08 Notes: Day 3

Session: Making your test lab obsolete with Test Test and Virtualization
Mike Azocar (here , too) conducted this presentation.  As the title suggested, Mike spoke from a completely Microsoft tools-oriented perspective (so, if you have a couple grand more for Team Edition Tester and some of Microsoft's virtualization products, have at it); never the less, I hoped to get a few nuggets of wisdom out of this talk.

Mike discussed Microsoft Hyper-V--near as I can figure, the console for managing your virtual machines in Windows Server 2008--and System Center Virtual Machine Manager (VMM), yet another tool from Microsoft for managing virtual environments.  What's the relationship between these two technologies?  My guess is that Hyper-V is the new and improved VMM for Server 2008, but that's just my guess.

So, Mike talked about authoring tests in Visual Studio Team Edition Tester and then using TeamBuild and VMM for launching virtual machines within which you can test your product.  Mike's presentation seemed to stop at the point of firing up the VM, implying that you then deploy your application to a given VM and begin manually testing in said VM.  I say phooey on that: I want to automate as much as possible.  If I spent money on Team Edition Tester and spent time writing integration tests in the tool, I'd want to leverage that automation in the VM, too.  Fortunately, you can do this.  Mike said that you simply change the URLs used by the integration (web) tests to that of your deployment in the given VM.  Again, is this a manual change or can this alteration be automated, too?  I assume that the Team Tester integration tests store the URLs being tested in some sort of config file, so I suspect that with a little bit of work, one could author some MSBuild/TeamBuild script to alter the web test URLs to point to the deployment in the VM.

The biggest gem I got out of this presentation was a quick five minute aside by Mike describing how VMM spins up a new VM: apparently, it uses Powershell to do this.  Sweet.  Mike quickly flashed one of these scripts and I scribbled down two cmdlets:

  • get-VM
  • get-dvddrive

Hmm.  I wonder where I can get these cmdlets?  Mike wasn't sure, but he said that there are a few communities out there on CodePlex and the rest of the inter-tubes where I would likely be able to find them (I suspect, though, that they're really part of the VMM installation).  I also caught a brief glimpse of the MSBuild/TeamBuild script Mike was using to power the build and test deploy of his demo app.  It included this line:

<exec command="xcopy..."/>

So, in a post build event, Mike is shelling out to xcopy to deploy his solution to the VM.  No magic there.

As I've said before, some day I'd love to see some innovative presenter(s) take many of these TechEd presentations and add the subtitle, "On the Cheap."  Thus, how would one approach "Making your test lab obsolete with XX and Virtualization...On the Cheap"?  I would think you would author your integration tests with something like WatiN, WatiR, and/or Selenium.  For the virtualization piece, you're like not going to get away from the expense of VMM or VMWare--but, what are you gonna do?  For the glue in-between, Mike's given me some clues for constructing an MSBuild script for deployment (no TeamBuild 'cause TFS costs money and, anyway, my company thinks ClearCase solves everything from source control to world hunger) and for constructing a Powershell script for spinning up a VM to host my test deployment.  Good enough for now.

Session: Data Access Layer: Architectural Concerns for Object/Relational Mappers (O/R-M) with Examples in NHibernate
Last year, I attended BOF moderated by Jeff Palermo, but not a session.  I didn't know what I missed until I attended this one.  Man, Jeff's a really dynamic speaker.  That really helps, too, when you've hit midmorning and you're coming down from your early morning coffee binge.

On a side note, he filled the pre-session dead air with a music montages including the fantastic Code Monkey.  If he were accepting requests, I would have suggested Web 2.0 Bubble or the non-musical but still entertaining New Media Douchebag.

So, the general point of Jeff's presentation was about making separation of concern decisions in your architecture so as to abstract away your Data Access code for better testability, maintenance, and upgrade (switching to newer, better, or alternative technologies).  This session was vaguely reminiscent of Paul Sheriff's From Zero to N-Tier presentation that I discussed previously, but Jeff had lots of great examples around loose couple (dependency injection) and unit testing.  One thing I found interesting was his terminology for the different layers of an application.  I noticed this terminology used by other presenters at the conference, too.  Maybe it's time I update my lingo:

Jeff's Terminology Mine
User Interface (UI) 
UI
Core Business Layer (BAL)
Infrastructure Data Layer (DAL)


Jeff strongly suggested reading the book Domain Driven Design by Eric Evans.

Jeff is another one of these types--like Scott Hanselman and Scott Cate as previously noted--who likes to code for most of his presentation.  Actually, come to think of it, his demo was largely completed prior to the presentation--he just navigated around his demo the majority of the time (which was still much better than just staring at Powerpoint slides).  And, like Scott Cate, he was kind enough to share his demo code (and code from other presentations) on his Google Code page.

Another aspect that attracted me to Jeff's presentation was his use of NHibernate in his presentation.  Finally, a presentation that doesn't toe the full Microsoft line (or maybe I should just be thankful that Entity Framework hasn't shipped yet).  He made some pretty good use of NHibernate, too, particularly in his unit tests.  Another novel convention was his use of StructureMap in his demo code--now that's pretty audacious of Jeff, considering that Unity Framework has been RTMed.  What's going to happen next--use NUnit instead of MSTest?  Perish the thought!

Session: Building Data Visualization Applications with the Windows Presentation Foundation
Up till now, I've been rather successful at avoiding these new user interface technologies--I've always considered myself more of a coder than designer, anyway (or at least I acknowledge that I stink at UI design).  However, there's seems no escaping the UI borg, so I thought I'd at least let Tim Huckaby assimilate me.  Besides, I've always enjoyed his conversations on .NET Rocks.

Tim just powered through his presentation with example after example.  He kicked things off with a demo of his famous Cancer application.  The Cancer application was a WPF application on top of a Sharepoint platform.  It was pretty awesome.  The WPF UI would display molecules in 3D and allow the user to rotate them around, do annotations, and more.  The .NET Rocks guys interviewed Tim on the application last year and Tim said that other developers have adapted the application for other purposes, like CAD work.  Tim showed those adaptations off a little, too.

Next, Tim went through a series of demos of different third party controls designed for use with WPF.  Very cool stuff, but, of course, they ain't free.

For one of his final demos, Tim brought up two guys from...uh...er...well, the name of the company escapes me and I didn't write it down.  Not important anyway.  The company writes software for casinos; Tim had them demo one of their latest solutions--a really cool application that acted like it's own mini desktop.  It had this cool, animated wallpaper in a frame with different icons on it representing different applications.  They launched one of these icons to reveal an application that collected and analyzed data from the different games and slot machines on the casino floor.  What I found most interesting about the application--aside from its already innovative use of WPF--was a button labeled 3D.  The developers said they had one requirement that they just could seem to accommodate with WPF--their client wanted a feature in which a user could walk through the casino floor virtually in 3D.  According to the developers, WPF couldn't deliver on this, so they went to Plan B: XNA.  They somehow rigged up their WPF application so that it could shell out to an XNA application representing a 3D model of the casino floor.  Really cool.

Tim wrapped up with a few reading recommendations--well, one that I wrote down, anyway.  WPF Unleashed by Adam Nathan.  He also posted up links to most of his presentation on his blog.

Session: Separation of Concerns: New Practices for Decreasing Coupling and Raising Cohesion
The presenter for this session was French Canadian Mario Cardinal.  Although he had an outrageous accent, his presentation was a good, all-purpose push for separation of concerns via Dependency Injection, the use of interfaces to better decouple implementation details, etc.  Overall, my biggest take away from this presentation was the fact that Mario was basically echoing the same story line that Jeff Palermo delivered earlier today and that I heard from Juval Lowy two days before: separating your logical layers by interface is a good design approach.  It's good to hear this message coming from multiple, independent sources.

Mario talked about two ways of transferring object "instantiation to an external party": a pull approach via indirection and a push approach via inversion of control.  Indirection is characterized by factories, registry, and a construct commonly called the Service Locator.  These helper constructs commonly use reflection to load up the proper implementation instance, but one thing to note about this approach is that the "service locator must be visible [to] every object."  I guess that means that every object served up by a Service Locator must reference this helper construct?  I can see how that would be bad if you decide to later swap out your current Service Locator with another.  Inversion of Control/Dependency Injection apparently has a better decoupling story but introduces more complexity (as evidenced by this increasingly ambiguous blog post).  Mario seemed to fall on the IoC/DI side of the fence for the most part, showed some examples, and then talked briefly about some of the available DI frameworks (and stressed that you shouldn't write your own):


Pulling back slightly, Mario talked about the logical layers in general and identified these four basic layers:

  • Presentation - contains the views
  • Application Model - contains the controllers
  • Domain Logic - contains the work of the business domain
  • Infrastructure - provides services to communicate with external infrastructure (configuration, persistence, logging, caching, security)

The terms sound vaguely similar to the terminology Jeff Palermo was using in his presentation earlier in the day.  Mario also mentioned how the thoughtful construction of namespaces can help promote better decoupling and how tools like NDepend can be used to determine architectural violations.

Session: Architects: How are they made?
I generally try to avoid touchy-feely, non-technical discussions, opting for sessions with real technical meat.  To me, I'd rather know all my technical options to solving a problem--I feel like I'm pretty good at figuring out how to piece together all the different bits into something coherent and effective.  Never the less, this session was put on by Rocky Lhotka--someone who's opinion is well respected and someone who takes a very practical approach to technology and architecture.  So, I thought I'd give it a go.

Actually, the session made for a good end-of-day talk: not too many details to focus on; just a conversation around the dynamics of software architecture and design.  Rocky started by giving us a bit of his resume, so as to give us some context as to how he has developed his opinions regarding software architecture.  Boy, does he have a lot of experience.  Sometimes, it might be nice to hear other speakers outline their career path and their usage of whatever it is they're presenting on so that we can put their statements in a better context (I would say the same for the idiot talking heads on the nightly news, but that's a post for a different blog).

Rocky identified three main categories of architects:

  • Application Architect
  • Enterprise Architect
  • Systems Architect

Interestingly, these types map roughly to what we've talked about in the Architecture Special Interest Group at the Cincinnati .NET User Group.  Rocky went on to outline several personality types of architects.  These include:

  • The Rock Star
  • The Artist
  • The Daredevil
  • The Carpenter
  • The Strategist
  • The Guard

Each type brings unique opportunities and baggage.  Some, like the Rock Star and the Daredevil, bring an improved speed-to-market ratio, but tend to introduce a certain level of instability in the solution, development team, or both.  Others, like the Carpenter or Strategist, bring a lot of thought and planning to the to the architecture process, but can sometimes sit and ponder for too long.  I feel like I'm too much of a Strategist when it comes to solving many problems, including my .NET to JMS problem--do I continue with a monolithic wrapper around the Tibco API?  Do I jump on an open source offering like Spring.NET or NMS?  Do I write my own adapter for WCF (like IBM did for MQ Series--which begs the question, where is Tibco on this one)?  What do I do...what do I do?  Let me sit and strategize some more.

Session: Party at Universal Studios
After another long day of learning more cool technologies--don't you just feel sorry for us?--Microsoft rewarded us conference attendees with a night a Universal Studios.  Art, Jay, and I enjoyed a good night of food, beer, and rides.  Probably the highlight of the evening was the Simpsons ride, where I think I spent half the time laughing at Art's chortles.  The Men In Black ride was fun, too--I still don't know how Jay got double my score, though.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: Technology Blog
Posted by Brad on Thursday, July 03, 2008 10:13 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Thursday, August 21, 2008 7:17 AM