tags:

views:

26

answers:

1

I'm looking for a set of scenarios that can be used to assess the overall elegance, strengths and weaknesses of a given MVC framework.

For instance, one such test could be how cleanly authorization is handled when it affects elements in the presentation layer. If the user has permission to see elements within an object, is that decision made in the view or the business logic. Are the two conflated, such that business logic is in code that affects layout of the displayed object?

There are other problems within this general domain, and, given that MVC has been around since 1979, I'm sure that there are books that deal with this sort of thing. However, I'm not looking for yet another reference on patterns in enterprise architecture. I'm looking for a compendium of problems and pitfalls. So, if you've any test scenarios that you like to throw a framework up against, or if you have any suggestions for books that deal with this sort of thing, I'd be grateful were you to share them.

+1  A: 

What I look for in an MVC framework is for it to stay out of my way! So, when you talk about conditionally displaying UI elements based on user security level, I think of how easy it was for me to solve this in ASP.NET MVC. I just created a base controller that all my other controllers inherit from, and it has a method that fires when a web request first comes in. I that method, I check the cookie, establish who the user is and what roles they have, then I stuff that information in the request context, calling it the Token. Now anywhere else in the application where I want to see if the user has a certain role, I just grab the Token, and ask it if the user has that particular role. Easy as pie.

ASP.NET MVC has all these fancy baked-in security mechanisms, like Authorize attributes and special filters, but I think fundamental website functions are very simple, and I don't want to go around chasing the latest implementation of those functionality. Just give me a language I can program effectively in, and a simple framework with all the stuff I need, just simple stuff really, like Request management, Response management, caching and cookies and I will be fine. That language may be PHP for you, then choose Symfony or something, or if it's java, that maybe Spring will do or else Ruby on Rails or Django. I think most all of these frameworks have the functionality you will need, and then some, but what I want to know is will the framework stay out of my way when I want it to.

Josh Pearce