views:

441

answers:

2

After using the MVC framework for a little while now I must say I love it, but in my opinion there has always been one thing that poops on the MVC party cake. The lack of good, reusable and portable "controls". This is where the HtmlHelpers should kick in.

After reading this blog post I started thinking about what exactly I’m expecting from a good HtmlHelper and I wanted to pull this in the open so other (smarter) people can hopefully join me in the effort.

Common Syntax Conventions

This way any developper can easily get going with some HtmlHelper without having to read the whole documentation. I like how JQuery is usually doing this, so maybe it is a good idea to mimick this.

Html != string

Writing Html with stringbuilders is just a pain. wouldn't it be nice if we could write the Html in an Html or asp file that later gets compiled into the dll?

Put javascript/css where they belong

I think I'm not the only one who has built his masterpage with an asp:contentholder dedicated for his javascript and css. Preferably js at the bottom and css at the top of the page. Wouldn't it be nice if needed references and script blocks could be placed there by the HtmlHelper? Maybe check for double references..

A public repository

Currently I have the feeling that everyone is just recreating the same wheels over and over again in their own private library. Wouldn't it be nice if we had some repository somehwere where we can have all this work combined?

Is there already an existing effort in this line that I have missed? If not do you think this is a usefull idea? Would you be a participator?
I have very little experience in OS efforts, but I have the feeling that this could be something the community is craving for. Does anybody with more os project xp see any pitfalls in this?

+1  A: 

There is MVCContrib, but it doesn't address all the issues you raise. I would definitely like to see a better solution to "controls" in MVC than using StringBuilder everywhere.

DanMan
My sentiments exactly
borisCallens
MvcContrib accepts patches. This is the way to go.
Matt Hinze
A: 

There's a great asset managing available here (http://weblogs.asp.net/rashid/archive/2009/05/02/script-and-css-management-in-asp-net-mvc-part-2.aspx), which really helps a lot with adding scripts and css..

At the same blog, there's also some neat UI helpers..

I'm starting a small OS project called MVCUIHelpers see (http://github.com/erikzaadi/MVCUIHelpers/tree/master).

The project is rather new (has only Icons and Buttons Helpers so far), but is meant to answer your needs..

If you got something to contribute, that'd be great ;)

Pardon for the broken links, new users can not insert links at here :(

Cheers,

Erik

Erik
Weird, I tried editing your answer so the links would work, but that didn't work either ...Anyway, I might have some small things that I can share. I can't reach my source from where I am now, but on monday I should be able to cook something up.
borisCallens
Sounds great, and thanks for fixing the links..Cheers,Erik
Erik