c# - ASP.NET MVC Web Site & WCF Web Service - Sharing functionalities -


i have following situation: have create website , web service share part of functionalities.

this why not want write code twice.

i have thought of following architecture:

myapp.businesslogic --> here save datamodels database

myapp.dataaccess -> datamodels & entity & mapping


myapp.ui.models -> viewmodels

myapp.ui.servicelayer -> acceses business logic, creates ui viewmodels website, , transforms viewmodels datamodels saving of businesslogic layer

myapp.website


myapp.ws.models - >ws models, these objects passed between client , ws

myapp.ws.servicelayer -> accesses business logic, creates ws models web service, , transfoms ws.models datamodels saving of businesslogic layer

myapp.webservice


is architecture overkill ? problems encounter ? have problems controllers in asp.net mvc website ?

when design applications this. issue dull copying of models view models. best way overcome use automapper.

i though create unittests because there high risk of breaking app when changing services (and visa versa). unit testing tell on.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -