I want to create an application that has both an ASP.NET MVC 3 web client and a Windows Phone 7 phone client. The application data is stored in SQL Server and needs to be accessed from both clients.
Given that scenario, I have two questions:
- I want to reuse the view models I use in the (existing) MVC application in my phone app and validate these using
FluentValidation
. Am I supposed to create a new class library called ViewModels and reference it in both client projects, or is there a better way? - Would it be appropriate to create a Web Service that both clients talk to? Or is it better to access the data via the MVC web project?
How would an appropriate solution structure for that scenario look like?