3

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.

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Does this mean I will have no code in the controller and models folder?
It sounds like you are describing Domain Driven Design. codeproject.com/Articles/339725/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.