1

I want to make a social media feed like Facebook. I have a Post object which has its own repository. Also, I have a PostService for that. I'm using ASP.NET Web Api 2 for API and it's working perfectly.

I'm using UI layer which is ASP.NET MVC combined with Polymer. I'm using iron-ajax for handling JSON request.

But I'm stuck with something. Which is the best way? Using api uri's for iron request or getting data from MVC controllers using Service Layer and returning JSON to partial view, then using that uri.

Can you give some advices? Thank you.

  • 1
    This is a design question rather than an implementation question, so it may be better off at http://programmers.stackexchange.com. However, you're the only one who can answer this. The actual question is: _"should I let the browser call my REST API, or route those requests through the site?"_, and it all depends on how your API is set up. I'm fairly sure plenty of discussions exist on that subject already. – CodeCaster Mar 02 '16 at 09:58
  • 2
    Possible duplicate of [Separate REST JSON API server and client?](http://stackoverflow.com/questions/10941249/separate-rest-json-api-server-and-client) – CodeCaster Mar 02 '16 at 09:59
  • @CodeCaster when referring other sites, it is often helpful to point that [cross-posting is frowned upon](http://meta.stackexchange.com/tags/cross-posting/info) – gnat Mar 02 '16 at 10:43

0 Answers0