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 imagehelp@codebetter.com
Concise Introduction to Castle MonoRail

Henrik Feldt, a competitor in my latest coding challenge, sent me a link to an AVI presentation given by Ayende discussing Castle MonoRail, how it compares to Web Forms development, and the creation of a ground-up application based on this framework.  The presentation is a little over an hour long and should greatly shorten the time needed for you to figure out what MonoRail's all about.  In the presentation, Ayende does a great job of showing the strengths of MonoRail while not shying away from detailing the up-front work necessary to put it in place.

After using Model View Presenter for 1 1/2 years, and after carefully reviewing other separation-of-concern alternatives, my development team has decided to begin migrating towards Castle MonoRail.  With MonoRail, we're hoping to have the fewest number of classes and lowest level of complexity while still supporting test driven development.  My biggest concern with moving towards MonoRail was having to abandon third party user controls such as telerik.  Although immensely valuable for speeding up development during the early stages of development, I'm finding these types of controls very difficult to alter behaviors later on in a project's life cycle.  Another concern, to some, is that MonoRail abandons the ASP.NET page life-cycle.  After working within the added complexities of the ASP.NET page life-cycle for seven years, I'm quite excited about getting back to a simpler web model.  We'll see how this goes...

Anyway, be sure to check out Ayende's presentation to help make up your own mind.

Billy McCafferty


Posted 05-29-2007 11:10 AM by Billy McCafferty
Filed under: ,

[Advertisement]

Comments

kevin wrote re: Concise Introduction to Castle MonoRail
on 05-29-2007 2:31 PM

You don't have to abandon third-party controls like telerik - just use the WebFormsViewEngine.

Billy McCafferty wrote re: Concise Introduction to Castle MonoRail
on 05-29-2007 2:44 PM

@kevin,

It seems like the Web Forms View Engine with MonoRail brings with it a number of complexities described at http://www.castleproject.org/MonoRail/documentation/trunk/viewengines/comparisson.html and http://www.castleproject.org/MonoRail/documentation/v1rc2/viewengines/webforms/index.html.  Alternatively, we're going towards having Castle MonoRail and Web Forms living side by side while we begin the migration process.  (I fully expect that many pages will probably never get migrated at all.)  Have your experiences shown that using the Web Forms View Engine is not as problematic as it first appears?  From what I've seen and read, it seems best to avoid it if possible.

pete w wrote re: Concise Introduction to Castle MonoRail
on 05-29-2007 4:20 PM

Billy Im surprised you didnt pick Monorail up sooner

Ive built a website that has some monorail, some aspnet. Monorail was cool to me, when I needed to localize some pages on this site, but I'm not letting go of standard ASPnet, for the simple reason it plays nice with everything else out there, from custom controls to the IDE to the mountains of existing documentation.

To me, Monorail is like Vista. Its got some cool ideas, I think everyone will eventually use it, or something like it, but its got some compatibility issues that will be ironed out as the users grow in numbers.

BTW, Im almost done with an article re-write on NHibernate performance Ill let you know soon -p

Billy McCafferty wrote re: Concise Introduction to Castle MonoRail
on 05-29-2007 4:24 PM

I took a close look at MonoRail about 1 1/2 years ago and decided to go with a ground-up implementation of MVP.  At the time, I wasn't convinced that the user community was strong enough with MonoRail and hadn't yet developed a strong vendetta against the ASP.NET page life cycle.  The user community is now quite strong along with my vendetta, as well. ;)

Brett wrote re: Concise Introduction to Castle MonoRail
on 05-29-2007 8:47 PM

I've been using my Telerik controls with the NVelocity view engine. This technique won't work for all the Telerik controls, but some.

I programatically create instances of the Telerik controls and then manually call their RenderControl method to output (ultimately) to a string, which can be embedded in the view.

Billy McCafferty wrote re: Concise Introduction to Castle MonoRail
on 05-29-2007 10:56 PM

Brett,

Do you feel it would work with the Brail/Boo engine as well?  (I assume it would since you're just spitting out the rendered HTML.)  Thanks!

Steve wrote re: Concise Introduction to Castle MonoRail
on 05-29-2007 11:15 PM

Billy, can I join your team  :)

Brett wrote re: Concise Introduction to Castle MonoRail
on 05-30-2007 1:44 PM

Billy,

I assume so because like you say, it's just dealing with strings. About the only thing that would not work is anything that requires ViewState and postbacks.

joeyDotNet wrote re: Concise Introduction to Castle MonoRail
on 06-01-2007 11:51 AM

@pete w

I'm just curious to know what "compatibility" issues you're referring to...

pete w wrote re: Concise Introduction to Castle MonoRail
on 06-01-2007 4:12 PM

Yeah Joey to answer your question about  "compatibility", well,

I like the ASP.NET's way of making custom controls with event delegates and callbacks. I like user controls and server controls.

I like the quick convenience for the ajax update panels.

Devils advocate view, compatibility also means a change in standards. I choose a technology when its the right tool for the job, but sometimes monorail is overkill for small fast projects, quick prototypes (ala visual designer; laugh if you like),  maintaining some mature and large applications. Can I make everyone else on my team excited to change their web-design approach and refactor because I found this cool new framework?

So maybe compatibility isnt quite the right word, but these are the challenges I've experienced that stop me from using monorail more often.

Steve wrote re: Concise Introduction to Castle MonoRail
on 06-08-2007 10:49 PM

I just wish they'd release a new .msi with an updated wizard for nhibernate 1.2 GA

I've been waiting quite some time.

Pulling builds and hacking the registry makes me wonder if it's quite ready for any production environment despite the hype....

hammett wrote re: Concise Introduction to Castle MonoRail
on 07-01-2007 10:43 PM

What production environment has anything to do with changing registry entries for the IDE wizard?

SDuzluyNIgBRQzbeQOD wrote re: Concise Introduction to Castle MonoRail
on 04-13-2009 7:27 PM

Rb2IQ9

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)