Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 03, 2008 05:59 AM by hhariri
Jan 03, 2008 02:07 AM|LINK
Jan 03, 2008 02:28 AM|LINK
Well, you pretty much hit on the answer yourself. Yes, there is a model folder that should hold your BLL/DAL tiers, but that doesn't stop you from separating them. You could just create a BLL namespace and a DAL namespace (I wouldn't do it that way,
but that's an option). And yes, I it's a good idea to put your business and data access layers into a separate project for reuse across multiple platforms.
That's where I think the MVC concept's strengths become apparent. It really opens your eyes to separation, at least compared to web forms asp.net.
Jan 03, 2008 02:44 AM|LINK
Jan 03, 2008 03:00 AM|LINK
Well, typically (and everyone, correct me if I'm wrong) you'd want to have your Web project contain the
controllers and views while your business logic and data access were in a separate project. You shouldn't need to reference the System.Web.Extensions from the business/data project. I'm not sure how to word this, but the business/data project
should be able to build and perform its job alone. Your Web project would need the reference to System.Web.Extensions (and your business/data project), the extensions reference is done automatically when you create a new MVC application in Visual Studio.
Jan 03, 2008 03:20 AM|LINK
Jan 03, 2008 03:33 AM|LINK
Glad I could help.
Jan 03, 2008 05:59 AM|LINK
As Chad's pointed out, I don't see any reason why you would want to separate out your controller and views. The controller is pretty focused on working with the views you have in your MVC application. It's quite hard to re-use the controllers for other setups,
and more for web service.
Separate out our model (which is your application logic and it includes your data access and business logic) into separate projects. Those are the components that you can and should re-use in different application fronts.