MonoRail and WebControls
I’ve been using Castle’s MonoRail for new websites that I’ve developed for the last couple years or so. I absolutely love the separation of concerns and the testability that this MVC framework brings to me. It’s been amazing to watch this project grow under Hammett’s leadership over this time. It seems that every time that I start to think about doing something, the framework already supports it. However, not everyone sees the advantages…
When I talk to traditional ASP.NET developers about MonoRail, the first thing I usually hear is something along the lines of: “WHAT?!?! You dont have WebControls? You mean I have to handcode the HTML for a DataGrid?”
Until recently, I had no way of really countering that. Some people think that being able to put together things in a drag-drop manner is much more important than the loose coupling that an MVC type of framework gives. Unfortunately, when that is the case, it’s very difficult to get the other side to see the error of their ways. :)
Until now… Recently, MonoRail has introduced the concept of ViewComponents, which are reusable pieces of functionality that you can introduce into your application. Some of my favorite are the DiggStylePagination component, which makes it absolutely dead simple to put paging on any sort of data table.
I also recently discovered a very nice set of use controls written in Javascript which allow you to build interactive web apps. The Yahoo! User Interface Library is an incredible suite of FREE controls.
The beauty of a control library like this is that as you become more and more familiar with it, you’re not locking yourself into a specific framework. The YUI Library will work with static HTML files, Ruby on Rails, ASP.NET and (you guessed it) MonoRail. Why wouldn’t you give this library a look?
Yeah, I’ve been wanting to check out the Yahoo UI library. Sounds pretty cool.
BTW, I’m also doing a lot of MonoRail development these days and have a few blog posts about View Components specifically that may be of interest…
When I talk to traditional ASP.NET developers about MonoRail, the first thing I usually hear is something along the lines of: “WHAT?!?! You dont have WebControls? You mean I have to handcode the HTML for a DataGrid?”
You know, I find that slightly amusing. When I first started doing ASP.NET applications, I often opted to use Repeaters over DataGrids — I didn’t like DataGrids because they didn’t allow me to write my own HTML, and I wanted to do certain things with the table headers that DataGrids weren’t flexible enough to do without writing a bunch of code to override the cell rendering.
What scared me was that there were a bunch of devs where I worked who preferred to mess around with the rendering rather than have to write their own HTML…
You should also have a look at http://www.extjs.com.. it’s even better than YUI!
Does no one on this thread see the advantage of re-usable UI compnents? Certeinly the MVC frameworks are wonderful, no debate, and the productivity gains of UI components have saved even more time and effort over the years.
I am glad that these worlds are startign to come together a bit, but it seems a bit strong to make fun of people who insist that re-writing yet another sortable data table layout by hand is a waste of time. Count me among them.
Yes, David… We *ALL* see the advantage of re-usable *UI components*. No one has stated anything different.
The post and ensuing discussion has been exactly about that… finding reusable UI components for MonoRail, which should help immensely with MonoRail adoption.


