Last post Jan 03, 2008 01:59 AM by hhariri
Jan 02, 2008 10:07 PM|CompiledMonkey|LINK
Jan 02, 2008 10:28 PM|ChadThiele|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 02, 2008 10:44 PM|CompiledMonkey|LINK
Jan 02, 2008 11:00 PM|ChadThiele|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 02, 2008 11:20 PM|CompiledMonkey|LINK
Jan 02, 2008 11:33 PM|ChadThiele|LINK
Glad I could help.
Jan 03, 2008 01:59 AM|hhariri|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.