Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

When coding a MVVM pattern I use Dependency Injection (DI) and try and code against interfaces. One of the common patterns is a Repository pattern, so I can swap my data storage provider. If I'm creating a web server side REST/ODATA API to server data to a MVVM/JavaScript/HTML UI, should I need to include a repository pattern in my MVVM JavaScript client code or just leave the repository pattern at the Web Server API level? I just can think of a 'Use Case' which would have me swapping out the Web Server API for another API at this stage. What do others do?

In my case I've chosen to implement AngularJS as the HTML/JavaScript MVVM client framework and Microsoft MVC WebAPI as the data/business logic service for Angular.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.