web services - Correct way to access data in ASP.NET web pages? -
i have wcf info service exposes info model. info security/filtering , business rules enforced using query intercepters , service operations based on current user in forms authentication cookie.
the info service used feed ajax controls on pages , may used mobile application @ point.
i have several non-ajax mvc views need display , edit same data. if utilize entity framework straight in controllers need reimplement relevant info filtering logged in user. right approach query same info service locally within same application?
my recommendation refactor datafiltering layer such can used in both cases (i.e. existing wcfds , straight ef), pulling out own separate module wrapper abstract away details of authentication method beingness used (formsauthentication or loggedin user). has bit more upfront cost in implementation, much more efficient re-querying same application (and save cost later on if have implement module in future).
asp.net-mvc web-services wcf-data-services data-access-layer
No comments:
Post a Comment