toddmo
toddmo

Reputation: 22406

Does an Asp.Net MVC project want to be the whole application?

I like Asp.Net MVC, I just want to be aware of what the designers of it intended as I work in it.

Is it trying to say "hey, here's a place for your business logic. Don't worry about a seperate BIZ dll. All your layers can just go in this project. Got your one stop shopping right here!"?

Maybe another way to ask the question is, when you look at Asp.Net MVC projects written by others, do you see the "Model" part being used in lieu of seperate business logic (BIZ) and domain model components?

Another aspect of the same question is, if you have multiple UIs planned (website, mobile app, windows app, service), do you have to fight (go against the tool / do something other than the offered default way of doing things) the Asp.Net MVC project to wrest out control of the business logic? And take care as you go that it doesn't creep back in?

This is not a rhetorical question. I don't have a bone to pick, and I see this as a factual question, not one soliciting opinions. Either it is or it isn't. It's designed for whatever it's designed for; I just don't know what that is, but I need to be aware of it as I go.

Upvotes: 0

Views: 64

Answers (1)

D Stanley
D Stanley

Reputation: 152511

MVC itself is agnostic of the layers you are describing. Many of the templates do put repository/business logic in the same project, but that doesn't mean that you have to keep it there.

You also don't have to use those templates - you can build your repositories in other projects (there are even templates that do that for you), and use those in your MVC project. The out-of-the-box RAD templates, however, do make architecture concessions in favor of simplicity.

I would do a search in NuGet for "MVC templates", play around with some of them, and see if there are any that architect things more in line with your desires.

Upvotes: 4

Related Questions