Home > MonoRail > 0 to 60 in … 3 months

0 to 60 in … 3 months

February 12, 2008 Neal Leave a comment Go to comments

In early December of last year I started working on a new web application designed to simplify telephone-assisted exit interviews. I don’t quite remember my rationale, but I made the choice to build the system using MonoRail (probably something to do with 5 or so years of WebForm inflicted pain). 3 months later I have a system that allows the user to log in, view the list of pending surveys, edit various details about a survey or employee and fill in a questionnaire on behalf of an employee; doesn’t sound like much does it?

MonoRail is hard, don’t let anyone tell you any different. You have to download a bunch of stuff, set it up on your machine, learn some weird new syntax for writing your web pages, you don’t get intellisense in your webpages, there’s no nice server controls, no drag and dropping to build the UI, the documentation doesn’t always show you how to get things done and much much more.

Still reading? Still thinking you want to use MonoRail in your next project? Good! Everything I said in that last paragraph is true, however it doesn’t cover the whole story.

When I started out using MonoRail, I read about most people’s experiences and got a warm fuzzy feeling – they all tell you it is great; I want to inject a little bit of realism here, starting out with MonoRail is hard work.  The key thing with MonoRail is, once you know how to setup and build a MonoRail application, nothing changes (unless you runoff the trunk and Hammett goes and changes a bunch of stuff – but that’s your own fault and a story for another day). Compare that to WebForms; you get everything out of the box, you can build your first “useful” page in minutes and the learning curve is quite shallow (depending on how heavily you use the designer). There’s a gotcha hidden in there though, over the entire time I spent building WebForms applications, I rarely had a “pleasant” experience where things just worked and I didn’t have to spend at least some of my week fighting the framework.  I think the biggest difference between MonoRail and WebForms is how soon using it becomes “easy”.

3 months on I have a web application that does everything I mentioned above as well as:

Still doesn’t sound like much – maybe it isn’t but here’s the thing, in the past 3 months I have done all the learning I need to build a reasonably scalable and robust solution, that means my productivity will keep accelerating as I get better at dealing with the domain and the business problems (Ayende has talked about this before but I cannot find the specific post I had in mind).

At the end of the day, I am glad I made the switch to MonoRail, developing is fun once again and I get to concentrate on solving the bits of the problem that should be solved, rather than fighting with the framework I’ve chosen to implement the solution with.  Hopefully I have set some realistic expectations about the initial investment required to get going with MonoRail, and given you an indication that the investment is well worth the gains in the end.


Categories: MonoRail
  1. Robert Ream
    February 18, 2008 at 5:49 pm | #1

    > you don’t get intellisense in your webpages

    Actually, with Ken Egozi’s AspView view engine you do get close enough to complete intellisense for the web pages. AspView is located in the Castle Contrib. We’ve also added it to Ayende’s Rhino Tools BuildFromTrunk build script, so you can run with the latest updates from Castle, NHibernate and Rhino Tools. Considering you are using “a repository to isolate persistence and a unit of work to manage persistence”, I assume you are using Rhino Tools anyhow…

  2. Neal
    February 19, 2008 at 8:08 am | #2

    @Robert

    Thanks for the comments. Yes, I know about the ASPView engine, however this post was more to illustrate the default state of play for someone starting out with MonoRail. I hope to post something on efforts that are being made to simplify life for developers starting out with MonoRail shortly.

    I am not using Rhino Tools directly as I started out building a simple repository based on the MSDN article. I need to migrate across to Rhino Tools but there are some parts of it that I don’t understand well enough just yet.

  3. February 20, 2008 at 12:19 am | #3

    I agree on most points – the Monorail learning curve can be steep initially, but in the end it made me NOT hate web development, which was something I had avoided for years.

  1. February 16, 2008 at 2:52 am | #1
  2. March 12, 2008 at 9:37 am | #2