This question seems to be popping up in several things that I’ve read today. In my personal experience, the answer is: it depends. I’m not sure I could say that there’s any hard-and-fast rule that says where business logic should go, but I will say this, I think the answer lies at least partly in how you define "business logic".
I think there are different kinds of business logic that can be applied at various different levels in an MVC based application. The two primary kinds that come to mind are business process flow logic, and data validation logic. Some might argue that validation logic wouldn’t fall under the category of business logic, but we would have to agree to disagree on that one.
I’ll attempt to explain my position on this with a hypothetical scenario:
read more »
I posted last week asking for thoughts on whether or not to use WebForms or one of the alternatives out there as a View Engine for an MVC app that I’m working on on the side. I was a little bit harsh in my criticism, and said that I was actually leaning towards NOT using WebForms at all.
Based on some of the feedback I’ve gotten to that question (mostly offline, with the exception of some good thoughts from Scott…thanks), I thought about this quite a bit over the weekend, and even did some playing around with it, and I think I’ve come to a conclusion.
read more »
I’m currently in the planning stages for a web application that I’m planning on building on top of the ASP.NET MVC extensions, and am trying to figure out which view engine would be best.
The three that I’ve looked at so far have been the standard ASP.NET WebForms, NVelocity and NHaml. I kinda like what I see in NVelocity and NHaml, but the documentation and support appears to be a little bit lacking. I had a hard time trying to figure out how to get started and up-and-running with either of them (though I’m sure I could figure it out if I spent more than an hour or so with either one). So for the most part, I’ve been kinda leaning towards just using WebForms.
read more »