ASP.NET MVC Adding a Web Service Layer -
i wanted peoples opinions on adding web serivce layer. @ work, want start using web services handle of our operations.
our current project structure follow our asp.net mvc apps:
mvc app (view/controller/viewmodel/service layer) --> bal (business access layer) --> dal (data access layer)
the mvc app, bal, , dal separate assemblies.
there domain (model) assembly shared among mvc/bal/dal layers.
the plan create web service handle security functions. web service used multiple web applications. when make changes security web service want modify code in 1 place , not every web app. i'd prefer if mvc project has nothing in tied web service.
so thinking of adding web service layer between bal , dal layers.
so this:
mvc project (view/controller/view model/service layer)
calls
bal layer (handles caching / db transactions)
calls
web service layer
calls
dal layer
what opinions?
a couple thoughts.
you putting web service layer between bal , dal. means need go through web service, including functions aren't related security. think adding additional layer of complexity. if multiple websites using web service, create stand along application/service. can call service different layers of application depending on layer needs service. create webservice wrapper clean interface can call web service layer in application.
for sake of discussion, lets web service handled validation of login , password of user. can connect webservice wrapper directly in mvc project see if user data valid, can log them in if is. later, if user performs function, , business layer needs check if user has permissions, layer can use api wrapper calls api see if user has permissions, , on.
mvc app / \ bal --> web service wrapper / \ dal wcf web service
Comments
Post a Comment