Geeks With Blogs
A Curious Mind #tastic

Lately I have been having a crisis of faith about MonoRail and have been looking at ASP.Net again. All of the neat controls, and IDE support are sooooo tempting. So late last night I happened to catch Ayende online and here is what he had to say:

ASP.Net

  • Pro
    • Because it is what everyone use.
    • Has controls
    • Isolate from web
  • Con
    • Isolate from web
    • You work in a different model than what really is - leaky abstraction
    • view state
    • Very complex model for doing really simple stuff.
    • Encourage mixing of UI / BAL logic. No, code behind is not  considered a seperation

MonoRail

  • Pro
    • solid MVC architecture.
    • Work in the same model as actually happens
    • Feel the magic - almost like you are creating an API, instead of pages.
    • Strict seperations of UI logic / BAL
    • complex UI logic is usually very easy.
    • Close to the "metal"
  • Cons:
    • Not Microsoft - some people sees that as a con, not me [nose smile]
    • Not something that everyone knows.
    • Tool support not that great
    • No designer - a plus for me.

MY BIGGEST THING

I feel like I am doing ASP.Net development in MR. By that I mean I have a bunch of controllers with 3-4 actions and each action has 1-2 views. I don't feel like I am building an API I feel like I am building crap. I think I need to work with ASP.Net for awhile to remeber why MR is better.

SOMETHINGS I NEED TO DO TO IMPROVE MY MR CODEBASE

  1. Need to leverage MRs ViewComponents more
  2. Need to work on reuse in my views
  3. Would PageMethods for MR would be cool. Would seperate the views form the Controller for me. hmmm...
  4. Figure out how to best structure my views with AJAX/Components in mind.
      Views\
        Ajax\
          Customer\
        OldSchool\
          Customer\
        Components\
        ???
  5. Figure out how to handle all of these AJAX methods that are starting to appear that look like arse (ajax_city_econ ?) and use the AJAX attributes.
  6. public void ajax_city_econ(string id)
    {
      //do stuff
    }
    
    //to
    
    [AjaxMethod]
    public void CityEconomics(string id, bool ajax)
    {
      //do stuff
    }

RANDOM MR REQUEST:

I wish controllers didn't have to inherit from Castle.MonoRail.Framework.Controller and instead could just request a ExecutionControl (An Interface of course)  object in their constructor so that I could more easily test my controllers. Then those that want the base controller experience could still have it (with property injection) and it would be wrapped by Castle.MonoRail.Framework.Controller as a base class.

I am jealous of these POCO controllers in ASP.Net
http://devlicio.us/blogs/jim_bolla/archive/2006/10...
http://haacked.com/archive/2006/08/09/ASP.NETSuper...

Posted on Wednesday, October 25, 2006 11:59 AM | Back to top


Comments on this post: MonoRail vs ASP.Net

# re: MonoRail vs ASP.Net
Requesting Gravatar...
I haven't used MonoRail, but those cons on the list (especially no 3rd party controls) are a tad large. (though lately I am encouraged to "roll-my-own" rather than purchase, but that's a different story)

I agree that ASP.NET encourages mixing of presentation, content, UI logic and business logic. But that doesn't mean that all of us using standard asp.net are doing it that way. I write my pages to be as thin as absolutely possible, so while good design is not encouraged, it's definitely possible.

And not having a designer is a plus I guess, (I never use a designer), but it makes it hard for people to adopt if they use the designer for some things... You don't want them to just shun MR for that reason alone.
Left by Ben Scheirman on Oct 25, 2006 5:21 PM

# re: MonoRail vs ASP.Net
Requesting Gravatar...
those links are not working
Left by Jiho on Nov 05, 2006 5:23 AM

Your comment:
 (will show your gravatar)


Copyright © Dru Sellers | Powered by: GeeksWithBlogs.net