March Agile Boot Camp was fun

Last week I taught the March Headspring Agile Boot Camp.  Since it’s a course for developers, it’s all about Extreme Programming, process, and architecture decisions that lead to a zero-friction project.   Stay tuned to my rss feed at http://feeds.feedburner.com/jeffreypalermo because I’ll be releasing the source code for the reference application we work on during the course.  It’s a work order system, and it has all the hairy things you expect in a line of business application, like statuses, state transitions, notifications, etc. 

Mke Palermo (MVP and Microsoft Regional Director) was in my course, and I was glad to see him again.  No we’re not related, but he’s a good friend, and I normally only see him at conferences. 

John Blackman (former Microsoft employee – moved to Austin, TX) was also in the course, and he wrote a review on his blog.

Karthik from Telligent Systems was in the January course, and his blog review is here.

MVP Summit Party with Palermo planning in full swing

Party with Palermo: MVP Summit 2008 Edition – rsvp here!!
April 13, 2008 @ 7:00PM – 10:00PM
Jillian’s:  http://www.jilliansbilliards.com/
731 Westlake Ave N, Seattle, EA
Ph: 206-223-0300
 
Cover charge is 1 business card.  This will get you in the door and register you for the grand prize drawings.
  • Free to attend
  • Free fingerfood
  • Free drink
  • Free swag
KEEP TABS ON http://www.PartyWithPalermo.com — THIS IS WHERE THE INFORMATION WILL BE POSTED.
Feel free to blog and link back to this site. 

ASP.NET MVC Framework on the Polymorphic Podcast

If you don’t care about podcasts, stop reading now.  If you don’t care about ASP.NET MVC, stop reading now.  If you haven’t stopped reading, then please continue. :-), and subscribe to my feed at http://feeds.feedburner.com/jeffreypalermo

Craig Shoemaker recently interviewed me on the Polymorphic Podcast regarding the MVC Framework and the MvcContrib project.

I, along with Ben Scheirman and Dave Verwer, are writing ASP.NET MVC in Action for Manning, and I talk a little about that.

I spoke a lot about MvcContrib.  I really have to brag on the folks contributing to MvcContrib and to Eric Hexter, who does a lot of work to keep that project’s CI setup going.  Here’s the latest build report below.  If you are curious how you can get nearly 1000 unit tests runing in an automated build and have it run in less than 3 minutes, pull down the source and see how the build and tests are put together.

————————————————————-

CruiseControl.NET Build Results for project MVCContrib (web page)


BUILD SUCCESSFUL

Project:
MVCContrib

Date of build:
2008-03-19 13:43:57

Running time:
00:02:12

Integration Request:
IntervalTrigger triggered a build (IfModificationExists)

Last changed:
2008-03-19 13:43:29

Last log entry:

Patch #1003 - kbaley
Patch includes:
- the ability to use TestControllerBuilder with controllers that have constructor arguments
- associated unit test

Tests run: 802, Failures: 0, Not run: 0, Time: 40.704 seconds

All Tests Passed

Modifications since last build (4)

GoDaddy could use some unit tests

For those who frequent the TechPodcasts network, like I do, you’ve probably heard of the 10% discount code for GoDaddy.com orders.  Everybody and their brother gives away GoDaddy 10% off codes.  The problem is that today it doesn’t seem to work.  Could it be a hidden policy (fine print) or could GoDaddy use some unit tests around thier shopping cart total calculations?

Objects have dependencies. Methods don’t

For more counter-intuitive banter, subscribe to my feed:  http://feeds.feedburner.com/jeffreypalermo

There is quite a bit of talk lately about unit testing using the extract method and override, or “inherit & override” method for stubbing out a method for unit testing.  Methods don’t have dependencies, and methods aren’t dependencies.

Objects are dependencies, and object have dependencies.  One object will depend on another object.  Objects are cohesive and present a contract of behavior so other objects know what behavior they can reliably leverage.  Because an object is cohesive, everything necessary to perform all its behavior can be passed into the object’s constructor at the beginning of the object’s life.  Then, that object can perform all of the operations.

In order to test a particular object, I might have to pass some fake objects (stubs, mocks, etc) into the constructor, but the object under test doesn’t care as long as the type is satisfied.  If I can’t test an object by passing in fakes to the constructor (and I can compromise sometimes by using setter injection), then the object is less than cohesive, and I should search the design of the object for an extra concern that is trying to get out.  Once I find the extra concern, I would separate the concern (separation of concerns) into its own object and have than as an explicit dependency by requiring it be passed into the constructor (dependency injection).

Michael Feathers outlines this extract method and override testing technique in his book, “Working Effectively with Legacy Code”, and I’ve used the technique many times to break nasty dependencies on legacy code in order to get it under test.  This is necessary because legacy code can’t be safely refactored until it has a safety net of test coverage.

If your unit test has to know that another method on the same object is being called, then the unit test knows too much about the implementation of the object.  The unit test should be doing black box testing on the object under test.  In other words, the unit test shouldn’t care about what code is written or if 1 method or 10,000 methods inside the object are actually called.  The unit test merely sets up explicit object dependencies and test state, interaction or both.

Thought-provoking “architecture” Austin .Net User Group meeting tonight

For more information about the Austin .Net and Agile community, subscribe to my feed:  http://feeds.feedburner.com/jeffreypalermo. 

I just got back from an Austin .Net User Group meeting, and instead of a presentation, we had a group discussion on architecture.  We discussed what architecture is, how specific it should be, whether a separate architecture team works, etc.  We saw some react violently against past experiences with bad architects and other voice the strong need for an architect to provide leadership and technical guidance to a development team.

The discussion turned to business with architectural decisions like how “safe” to be with redundant systems and graceful failover.  More ROI decisions.  Elaine Krause pulled the discussion back to development, and we talked a bit about buy vs. build decisions like using tools such as CodeSmith, NetTiers, CSLA, and NHibernate. I couldn’t resist giving a plug that I teach NHibernate in my Agile Boot Camp course.  

Overall, we really didn’t get to a definition of “architecture”.  What else is new.  Other forums have tackled the subject and have only been able to give it a rough definition.  The software context of architecture makes it different in each scenario. 

The following notable people were at the Austin .Net User Group meeting last night:  Blake Caraway, Eric Hexter, Jimmy Bogard, Chad Myers, Jeremy Miller, Eric Anderson, Chris Koenig, and Cy Huckaba.

If you were there and want to be listed, get a blog, and send me the link. 

ASP.NET MVC Framework big changes since Dec CTP

 For more stuff on ASP.NET MVC, subscribe to my feed:  http://feeds.feedburner.com/jeffreypalermo

If you installed the December CTP of the ASP.NET MVC Framework, you had to install it.  The assembly was registered with the GAC, and you didn’t have to deploy the assembly.  The original plan was to release the MVC Framework with a service pack of .Net 3.5.  That is no longer the plan.

In the March CTP, System.Web.Mvc.dl, System.Web.Routing.dll, and System.Web.Abstractions.dll can all be deployed to the bin folder.  They don’t require the GAC.  I like that a lot.  I recently deployed http://www.partywithpalermo.com using the March CTP drop of the MVC Framework.  I have .Net 3.5 on the web server, and it was super simple. 

Routing is a bit different.   Make sure to change [controller]/[route] to {controller}/{route}.  Minor change.  Overall, I’m actually using to using {} for tokens because of all the NAnt build work I’ve done (NAnt uses ${prperty}).

Routing can be used with existing apps.   If you have every done url rewriting (I have), you know how painful it can be.  Now that routing is in a separate assembly, you can use it with any ASP.NET app you wish.  I really like that concept because routing doesn’t care if you are using the mvc handler or page hander.  It works for parsing urls either way.

Overall, I’m pretty impressed with this CTP (and it is a CTP).  It is not done yet, and Microsoft makes no claims that it is complete.  It’s the second public drop of a new, fledgling framework.  The core, in my opinion, is the routes, controllers, and handoff to the views.   All the other stuff is ancillary.  Once the core is there, libraries like MvcContrib can start adding on extra features.  For instance, I’m looking at leveraging the presentation object validators from the Castle project along with the [DataBind] attribute.  It shouldn’t be to hard to leverage the Castle project here, even while using a different controller base class.  I think they are quite complimentary, and Monorail has so many great features, I don’t think I’ll use the MVC Framework bare. 

Let me know in a comment if you are interested in me releasing the source for www.partywithpalermo.com. 

RSVP now for Party with Palermo, MVP Summit 2008 edition

Party with Palermo

This party happens to be the day before the MVP Summit and 5 days before the Alt.Net Conference in Seattle.  All are welcome.  Subscribe to my feed to ensure you don’t miss important announcements:  http://feeds.feedburner.com/jeffreypalermo.

http://mvpsummit2008.partywithpalermo.com/

April 13, 2008 @ 7:00PM – 10:00PM

Jillian’s: http://www.jilliansbilliards.com/
731 Westlake Ave N, Seattle, EA
Ph: 206-223-0300
Cover charge is 1 business card.  This will get you in the door and register you for the grand prize drawings.ize dra

  • Free to attend
  • Free fingerfood
  • Free drink
  • Free swag

Contact me if you are interested in being a sponsor.

Current sponsors: