views:

92

answers:

1

Hello, I would like to know how do i incorporate a feature like wcf within and MVC application. My current idea of the architecture is as follows:

EntityFramework -> ASP.NET MVC (Views)

EntityFramework -> ASP.NET MVC with WCF endpoints -> mobile Apps.

EntityFramework -> ASP.NET MVC -> Silverlight (using .NET RIA Services).

So I'd have 1 asp.net mvc project. create my DAL in the models folder. have my controller access that DAL. Add a wcf file somewhere and have that call to the DAL. Some parts of the application i have a silverlight app that opens and uses the asp.net membership information and other related data.

Please correct me. I have no idea what I'm doing.

A: 

For your situation, I would do things a little differently.

I would create a seperate project for your Data Access Layer. I would also move business logic into a Business Logic Layer.

You could then share both your DAL and BLL between the ASP.NET MVC site (your Models would be a Facade to the BLL objects) and your WCF Services thus centralizing all of your logic into a central location.

Justin Niessner
Does this mean I will have no code in the controller and models folder?
Shawn Mclean