I have a one-page web application developed using ASP.NET. I recently converted many of the push-based web methods using the SignalR library. This greatly accelerated the page and reduced the number of server calls from the page.
At the same time, I also looked at RESTful ASP.NET WebAPI for some server-side methods, and the real beauty is that it allows you to create APIs for external applications at the same time. I am developing the main application (which will be important for what I do )
However, having looked at several articles and these two questions that use push and WebAPI methods, seem to be two completely different paradigms for client-server interaction. I'm sure I can create various methods that can be accessed through any protocol, but I'm not sure if there are pitfalls or if this is considered sloppy - maybe there is a more elegant way to achieve what I aim for.
There are, of course, situations where I want a RESTful WebAPI to broadcast events through a SignalR hub ... The opposite (SignalR ever needing access to a WebAPI) seems less likely, but I believe that it is still possible.
Has anyone done this? Does anyone have any tips or advice on how to proceed? What would be the most elegant way here?
mbeasley Sep 11 '12 at 11:34 2012-09-11 11:34
source share