Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at
Castle Project cooler than Jerry Springer

There, I've said it.  If Castle Project has been on your "need to check that out list," you very much need to make it a higher priority.  Recently, I discussed how our development team has been migrating a 1 1/2 year old project into the MonoRail framework.  We had been using Windsor for some time but needed a simpler approach to managing the separation of presentation and logic.  MVP was our previous approach which we were implementing in a disciplined manner, exactly as I described in a previous article; but after a year or so of using it, we began finding MVP becoming cumbersome, not worth the effort on simpler pages, and tricky to determine exactly where the line is to be drawn between the code-behind and the presenter.  (This becomes particularly difficult when taking a Supervising Controller approach as opposed to a Passive View approach as the view may still have access to the domain.  But I still prefer it over Passive View as it decreases the amount of primitives and DTOs being passed between the view and the presenter.)  The only real drawback to integrating Castle Project tools with legacy code is that it is difficult to appreciate all that the Castle Project has to offer.

Over the past couple of weeks, I've been fortunate enough to do a small ecommerce website from the ground up with everything Castle Project has to offer.  What I've found particularly pleasing is that it just works.  I needed to add ajax support to a "contact us" page to replace the input form with a thank you message; with just a couple of lines of code, AjaxHelper made it trivially simple.  (IMO, only telerik rivals Castle's simplicity with respect to AJAX.)  I needed to get my code talking to a database; ActiveRecord required about 10 minutes to set up my entire data communications DAOs to manage, no NHibernate HBMs to create, and certainly no SQL to write.  (I doubt that I would use ActiveRecord on a large project in favor of a cleaner separation of domain and data, but for smaller projects, it's perfect.)

But what I believe to be the real gem of Castle Project is the MonoRail MVC framework.  MonoRail enforces a very clean separation of presentation and logic while still allowing the view to access domain properties when using the Brail view engine (e.g., someUser.FullName); similarly to what Supervising Controller provides but without the gray area of separation.  MonoRail also fully supports TDD development of both the views and controllers which was my former motivation behind using the more complicated architecture, MVP.  Furthermore, MonoRail abandons the ASP.NET page lifecycle events...I never realized how much headache the page lifecycle caused until I didn't have to deal with it anymore.  Everything is just HTML and JavaScript with a pure and simple HTTP request and response.  If you use the SmartDispatcherController with the DataBindAttribute - and I don't know why you wouldn't - the data binding between the form and the controller is seemless and strongly typed.  Yes, you can do comparable feats with ObjectDataSources in ASP.NET, but, IMO, it's much simpler in MonoRail while still providing a very clean separation between presenation and logic.

A major concern I had about moving to MonoRail was the limited support for sophisticated, off-the-shelf, ASP.NET user controls such as what telerik has to offer.  I've come to find that:

  • You generally don't need the complicated sophistication that third party tools tout.  Most of the time, these features are gold-plating that clients never use which are only offered to make the lives of developers more interesting.  (I put myself squarely in that camp.)  Take grids for example.  Off-the-shelf, third party grids typically provide features such as drag-and-drop dynamic grouping, drag-and-drop column ordering, column resizing, and keyboard navigation.  These features are a lot of fun, but they're almost always gold-plating.  In the 10 years I've been developing, I've never had a client request one of these's not because they're (all) ignorant, it's because they just don't need it.  When you consider that 2/3 of projects significantly overrun their cost estimates and that 64% of features included in products are rarely if ever used [Agile Estimating and Planning by Mike Cohn], do we really need to be pushing all these gold-plated bells and whistles?  Furthermore, I can't tell you how many hours I've wasted trying to customize one of these features to "do what I want it to do" when it never really needed to be there in the first place.
  • Alternatives exist to give you the same time savings that off-the-shelf .NET controls provide.  In addition to helpers provided within MonoRail, many other options are available for developing sophisticated web applications.  The Yahoo! User Interface Library provides animation utilities, drag and drop capabilities, pop-up calendars, rich text editors, menus, trees, and a rapidly improving data grid. provides a potpourri of visual effects rivaling what can be done in WPF.  Here's a few more to help extend your coding reach:  prototype, dojo, dojo offline, and Google Gears.
  • MonoRail view components are much simpler than ASP.NET user controls.  No page lifecycle, no weird binding problems...just basic HTML, JavaScript and a simple HTTP request and response.  The increased simplicity means faster development and less painful maintainance.  It also means less time pounding the desk trying to figure out why the Page_Load of one control didn't set the proper values in the selection box because someone called Page.DataBind() in some other control.  Of course you'll still find yourself stuck on challenges, but you'll have less moments yelling at the code, "what's wrong with, you should be working just fine!"  Over the past week, I've found myself with a big grin time and time again after writing some code and seeing it work exactly as I had expected it would.  It just works.

As I'm starting to sound like a used car salesman, I believe I should stop while I'm ahead (or at least at an even keel).  The bottom line is that Castle Project really does provide an all in one package for improving the web development experience...definitely cooler than Jerry Springer.

Billy McCafferty

Posted 09-21-2007 9:58 AM by Billy McCafferty



joeydotnet wrote re: Castle Project cooler than Jerry Springer
on 09-21-2007 2:52 PM

Hey Billy,

Nice to have you back.  :)

I'm also really happy to hear your experiences with MonoRail, especially with your experience and solid reputation.  I've been using MonoRail for over a year now on 3 "professional" projects  and haven't looked back.

Definitely wouldn't choose anything else for .NET work right now...

Sean Chambers wrote re: Castle Project cooler than Jerry Springer
on 09-23-2007 9:19 PM


Great overview of the main features of monorail.

As Joey said, I too wouldn't be able to go back to again. Not after all the page lifecycle snafu's I was constantly running into.

And now, RC3 is out! Woohoo! no more running off the trunk =)

bennyb wrote re: Castle Project cooler than Jerry Springer
on 09-24-2007 2:43 PM

Great work bill, I followed your [NHibernate] articles on Code Project. I will definitely check out MonoRail [again]. wrote Castle Project cooler than Jerry Springer
on 09-27-2007 9:49 AM

You've been kicked (a good thing) - Trackback from

Onur wrote re: Castle Project cooler than Jerry Springer
on 09-29-2007 8:44 PM

How about using ExtJS on top of monorail ? This way you can go fully component driven (and even far richer than telerik) without doing any sacrifices!

Billy McCafferty wrote re: Castle Project cooler than Jerry Springer
on 09-29-2007 10:45 PM

I had never heard of ExtJS but will certainly check it out more after taking a look at its capabilities.

Paul Kohler wrote re: Castle Project cooler than Jerry Springer
on 10-01-2007 5:59 AM

That was my experience with Castle - it's just fantastic! Nice summary too... Its what I had been looking for in the ASP.NET development world - sanity and simplicity!

Gabriel Florit wrote re: Castle Project cooler than Jerry Springer
on 10-03-2007 4:01 PM

Hey Billy,

Thanks for all your work on Code Project. I'd love to start using MonoRail, it sound very interesting... But working on state projects means using standard software...

Billy McCafferty wrote re: Castle Project cooler than Jerry Springer
on 10-03-2007 4:12 PM

Oh contraire! ;)  (Or however you spell it.)  My largest project is for a government run transportation agency which is involved with multi-billion dollar, transportation, construction projects with plenty of state and federal oversight.  The key is in how you present what's "standard."  In many respects, there's nothing non-standard about MonoRail...runs on standard IIS, it's (initially) handled by the standard ASP.NET 2.0 ISAPI filter.  Furthermore, you don't even need to throw on a ".rails" filter to make people can use the ASP.NET provided AXD extension or even the ASPX extension if you don't have any classic ASP.NET ASPX pages in your app.  That all looks pretty standard to me. ;)

Bill wrote re: Castle Project cooler than Jerry Springer
on 05-29-2009 12:29 AM

<a href= >remington spr 220 coach gun</a>  

<a href=

Heel wrote re: Castle Project cooler than Jerry Springer
on 05-29-2009 12:50 PM

<a href= >sexy videos of nicole coco austin</a>  

<a href= http://sinkcabinetsb

Bill wrote re: Castle Project cooler than Jerry Springer
on 06-11-2009 7:59 PM

<a href= >fotos kendra holly and brigitte</a>  


Kir wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 9:12 AM

<a href= >limewire pro download free</a>  

<a href= >do my own taxes</a>  

<a href= >don quixote by</a>  

<a href= >old san juan</a>  

<a href= >florida hotel key west</a>  

<a href= >body building how to</a>  

<a href= >a summer of love</a>  

<a href= >department of human services minnesota</a>  

<a href= >free funny videos</a>  

<a href= >shaker ying yang twins</a>  

<a href= >gainesville sun newspaper</a>  

<a href= >how to buy guitar</a>  

<a href= >telephone numbers white pages</a>  

<a href= >the ranch house</a>  

<a href= >injury of the knee</a>  

<a href= >moo and oink</a>  

<a href= >release from liability forms</a>  

<a href= >bel air travel</a>  

<a href= >listings of homes for sale</a>  

<a href= >out of the cold</a>

Diesel wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 10:25 AM

<a href= >i lifted my</a>  

<a href= >tenant credit report</a>  

<a href= >school of interior decorating</a>  

<a href= >ashlee simpson s nose job</a>  

<a href= >alba jessica pic swimsuit</a>  

<a href= >kingdom hearts my sanctuary</a>  

<a href= >display boards for science fair</a>  

<a href= >out of commission</a>  

<a href= >food gourmet online</a>  

<a href= >is the real mccoy</a>  

<a href= >gold coast school</a>  

<a href= >precious moment wedding</a>  

<a href= >counter marble top</a>  

<a href= >the transporter dvd</a>  

<a href= >university of washington hospitals</a>  

<a href= >causes of lung cancer</a>  

<a href= >how do i cut crown molding</a>  

<a href= >clothed females nude males</a>  

<a href= >african airline south</a>  

<a href= >my wife swallows</a>

Arnie wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 10:28 AM

<a href= >what is sleet</a>  

<a href= >blue cross and shield of california</a>  

<a href= >helicopters crash videos</a>  

<a href= >i love you but do</a>  

<a href= >britney spears nipple</a>  

<a href= >the wives of henry viii</a>  

<a href= >fetus picture week by</a>  

<a href= >oops celebs fortunecity</a>  

<a href= >www ancient egyptians</a>  

<a href= >bam margera pictuers</a>  

<a href= >the sun uk newspaper</a>  

<a href= >a dream with in</a>  

<a href= >my love horoscope</a>  

<a href= >bush funny video</a>  

<a href= >i breathe in</a>  

<a href= >driving russ swift</a>  

<a href= >happy to be with me</a>  

<a href= >world time zone</a>  

<a href= >the bear market</a>  

<a href= >contintal airlines reservations</a>

Aron wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 12:09 PM

<a href= >www pbs kids</a>  

<a href= >free arcade downloads</a>  

<a href= >ghost in shell stand alone complex</a>  

<a href= >what is doxazosin</a>  

<a href= >covers for cell phones</a>  

<a href= >ali muhammad biography</a>  

<a href= >com content ms option site</a>  

<a href= >rental apartments vancouver washington</a>  

<a href= >rottweilers puppies for sale</a>  

<a href= >free autominer for runescape</a>  

<a href= >etiquette for funerals</a>  

<a href= >when you love me lyrics</a>  

<a href= >vacation rentals in italy</a>  

<a href= >the peabody hotel memphis</a>  

<a href= >gas pressure washer</a>  

<a href= >a troy ounce</a>  

<a href= >adviser to the</a>  

<a href= >care child texas</a>  

<a href= >kansas city autoshow</a>  

<a href= >iz ruk ruki v</a>

Arnie wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 1:01 PM

<a href= >get out off</a>  

<a href= >resorts in florida keys</a>  

<a href= >austin texas restaurants</a>  

<a href= >a notebook computer</a>  

<a href= >injury lawyers for you</a>  

<a href= >aging anti care product skin</a>  

<a href= >kitchen decorating ideas</a>  

<a href= >the heats on</a>  

<a href= >tgi friday restuarant</a>  

<a href= >toys and learning</a>  

<a href= >thank you notes interview</a>  

<a href= >sandra bullock keanu reeves</a>  

<a href= >the polyatomic ions</a>  

<a href= >of james bond movies</a>  

<a href= >harlequin great danes</a>  

<a href= >california home mortgage rates</a>  

<a href= >where do i buy stocks</a>  

<a href= >stains on glass</a>  

<a href= >about egyptian cotton</a>  

<a href= >what is gdi</a>

Heel wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 1:54 PM

<a href= >game in psp</a>  

<a href= >conversion of measurement</a>  

<a href= >angier north carolina</a>  

<a href= >vintage dresses prom</a>  

<a href= >blue tooth headset motorola</a>  

<a href= >bakersfield driver ed online</a>  

<a href= >high speed cameras</a>  

<a href= >a world of pain</a>  

<a href= >cure the walk</a>  

<a href= >lower abdominals exercise</a>  

<a href= >egg rolls recipe</a>  

<a href= >the 13 ghost</a>  

<a href= >conversion from kilograms to pounds</a>  

<a href= >county jail maricopa</a>  

<a href= >saturn lansing michigan</a>  

<a href= >gulf persian war</a>  

<a href= >to the window wall</a>  

<a href= >lowest gas prices in</a>  

<a href= >project life cycles</a>  

<a href= >orange county new york</a>

Bill wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 1:57 PM

<a href= >tattoo for lower back</a>  

<a href= >a punk band</a>  

<a href= >rules for cribbage</a>  

<a href= >cd player pioneer</a>  

<a href= >jimmy kimmel snake bite</a>  

<a href= >how to become a pharmacist</a>  

<a href= >cape cod summer rental</a>  

<a href= >copper price wire</a>  

<a href= >abercrombie myspace layouts</a>  

<a href= >rent calgary apartments</a>  

<a href= >cameras refurbished digital</a>  

<a href= >kids internet games free</a>  

<a href= >mai tai recipe</a>  

<a href= >cause of divorce</a>  

<a href= >practice learner s permit</a>  

<a href= >portable trade show booths</a>  

<a href= >jobs on a cruise</a>  

<a href= >kentucky derby betting odds</a>  

<a href= >gum paste flower</a>  

<a href= >california driver education garden grove</a>

Heel wrote re: Castle Project cooler than Jerry Springer
on 06-19-2009 4:02 PM

<a href= >korea and nuclear weapons</a>  

<a href= >real estate foreclosure</a>  

<a href= >chloesterol lowering drugs</a>  

<a href= >exchange rate from pounds to dollars</a>  

<a href= >vacation in washington</a>  

<a href= >formula volume of sphere</a>  

<a href= >college football largest stadium</a>  

<a href= >myspace top 12</a>  

<a href= >auto glass repair pittsburgh</a>  

<a href= >my chase credit card</a>  

<a href= >make your dick bigger</a>  

<a href= >jc penney discounts</a>  

<a href= >always something there to</a>  

<a href= >roller coaster tycoon 2</a>  

<a href= >web cam shows</a>  

<a href= >calories counter food</a>  

<a href= >virgin first time</a>  

<a href= >that start with</a>  

<a href= >real estate rocky mount</a>  

<a href= >bread maker recipees</a>

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)