Which is the best approach for RESTful API requests?

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.

链接地址: http://www.djcxy.com/p/45650.html

上一篇: 在JavaScript应用上使用oAuth2身份验证

下一篇: 哪种方法适用于RESTful API请求?