As I promised here, you can download the samples I created on my visit to MS. What’s in there?
MvcExtensions: a class library project with all extensions developed including parameter binder support, Windsor integration and a NVelocity View Engine. I remember complaining about relying exclusively on inheritance to change behavior/add specializations. Looks like I’m not alone on this… To some things, a vertical approach is good enough, but not usually to frameworks. The inheritance scheme eventually will turn into hell in a complex project. I know as I been there.
RestSupport: Uri formats and a nice Respond To syntax inspired on the work from Chris Ortman/MonoRail.RestSupport.
UsingAR: self explanatory
UsingNVelocity: ditto.
Looks like they still need to make some things virtual and some things public. If you read my code you’ll eventually bump into interesting comments :-)
December 11th, 2007 at 12:04 pm
Just downloading these to take a peek. But, I am curious: have you considered including these the the mvccontrib project: http://mvccontrib.org?
December 11th, 2007 at 12:16 pm
Thanks, Hammett. Now if I could just download some extra time in my day to try this and other MS MVC stuff out.
December 11th, 2007 at 12:54 pm
[...] Take a look at his blog post for more details and to download the samples here. [...]
December 11th, 2007 at 12:58 pm
@Tom, I think Jeffrey will. I have no idea how to operate with Codeplex…
December 11th, 2007 at 2:29 pm
I bet if you gave your permission to Jeffrey Palermo, he’d add it for you. ;)
http://codebetter.com/blogs/jeffrey.palermo/
December 11th, 2007 at 2:49 pm
@Phil, he contacted me yesterday, I gave the permission.
December 11th, 2007 at 4:06 pm
@hammett: Thanks for the nod.
>> “Looks like they still need to make some things virtual and some things public”
This is exactly my biggest complaint against this framework. Sure during this early phase we can tell them that we need something virtual and they might do it. But 1 year down the road when that Internal class makes extending impossible or a real PITA then what? Wait for the next release of visual studio?
December 11th, 2007 at 4:27 pm
@Chris, my argument to them was: give power to the people. I think their audience is much more wider then an OSS project, so they are concerned about not giving a monkey a gun as the monkey might shot someone.. but I think they could be pleasantly surprised if they just assume people will get it and use it right (most of times, at least) :-)
December 11th, 2007 at 5:04 pm
> But 1 year down the road when that Internal
> class makes extending impossible or a real PITA
> then what?
Switch to Ruby? *ducks*
December 11th, 2007 at 5:08 pm
Dont need to duck. If the switch makes sense for your company/client/app/scenario, go for it.
December 11th, 2007 at 5:19 pm
@Rhywun: it will be an interesting day when/if that should ever become Redmond’s response to that issue.
December 14th, 2007 at 5:51 pm
Hey Hamilton, thanks for the project. Will be really helpful for me.
One bug that I saw is
IContainerAccessor accessor = (IContainerAccessor) context.HttpContext.ApplicationInstance;
if (accessor == null)
{
throw new ApplicationException(“Whoops, looks like you forgot to make your Global app ” +
“class implement the IContainerAccessor interface”);
}
the problematic line is
IContainerAccessor accessor = (IContainerAccessor) context.HttpContext.ApplicationInstance;
I believe it should be
IContainerAccessor accessor = context.HttpContext.ApplicationInstance as IContainerAccessor;
since “as” makes it null if the conversation fails.
Cheers.
December 14th, 2007 at 5:54 pm
That makes sense! I guess the cold weather of Redmond affected my brain ;-)
lame excuse, I know.
December 14th, 2007 at 10:16 pm
In his most recent blog post MVC Experiments, hammet includes the samples for download that he created on his visit to Microsoft.
January 7th, 2008 at 8:17 am
hi .i want to know about castle project , nmonorail and mvc . i can’t find a good and compelet article about these . please help me
thanks
January 27th, 2008 at 9:12 pm
[...] Adapted by Hammet and added to MvcContrib with [...]