8

It is going to be a kind of subjective question but still want to raise it here.

I am planning to build a stream wall like fb, which will contain objects like text post, * embedded videos*, pictures, polls etc. As I only have bit knowledge in ASP.NET webforms I am planning to use the same. My question is which technique/approach is most appropriate to design the stream?

Will it be good to choose Web API on ASP.NET webform or should I have to rely only on ASP.NET MVC? How can I display different objects type in a same list (stream)? Which I believe is not possible with datalist, repeater, gridview etc.

Perhaps, this seems like a subjective question but may have a value with a perception of architecture.

Zerotoinfinity
  • 6,290
  • 32
  • 130
  • 206
  • 5
    Yes this is arbitrary. But I believe there is actually a "correct answer". By your needs (streaming lists), I believe you are better off with asp.net `MVC` and `HTML 5`. `HTML 5` wan't on your list so it needs particular attention. **Facebook**'s new asynchronous look and feel is primarily `SignalR`. `SignalR` is a socket tool for efficient streaming of asynchronous data (http://en.wikipedia.org/wiki/SignalR). MVC is preferable to Web Forms b/c with or without Web API (i say with) you get a highly sacalable environment that can already send streams of data to the client with JSON action mthds. – Dave Alperovich May 15 '13 at 23:57

3 Answers3

3

To me, because the Web API was built on some ASP.NET MVC components. It only different the Http packages. So we only need to know how to handling the binary streaming in ASP.NET Web API. I have searched and found out some of useful stuffs in internet like

All of those are a good reference in case you want to do some thing like that.

Community
  • 1
  • 1
thangchung
  • 2,020
  • 2
  • 17
  • 28
  • 1
    Thanks for your answer. But my concern is to show different objects in a single stream. Which may be embedded video, web links, simple text, *uploaded video streaming*(which you have explained in your answer) , polls and pictures. They all are different objects and I ain't sure how can I integrate these all objects in a single stream. – Zerotoinfinity May 17 '13 at 10:28
  • 4
    Oh I actually know your problem now. Could you consider to customize your Http handler. So we can combine many type of stream into one single stream. Let me research it and come back to you afterwards. – thangchung May 17 '13 at 10:57
  • Did you get a chance to find a way to do this? – Zerotoinfinity Sep 20 '13 at 11:37
0

WebAPI is not a front-end/view concern. It's about accessing and consuming data over http. So it's not an either WebAPI or ASP.NET MVC case. It's about using each where appropriate. Having said that, for your stream scenario, the website could be built using ASP.NET MVC. The data for your stream could be provided via WebAPI. And you could call the WebAPI from the MVC site via AJAX.

LordHits
  • 5,054
  • 3
  • 38
  • 51
  • Meanwhile I did some basic work and I am able to make it work for both ASP.NET MVC and webform but your answer, indeed, is a relief for me. :) but I am still not sure which approach I have to choose to display multiple object types, right now I am able to display only one kind of object (i.e. via generating a list or a table) – Zerotoinfinity May 13 '13 at 21:45
  • @LordHits WebAPI is a HTTP framework. It is just as capable at delivering front end content as it is backend. In fact, HTTP itself is much better suited to delivering large grained, use-case specific representations than it is being a general purpose data api. – Darrel Miller May 14 '13 at 01:11
0

The WebAPI is an HTTP Service Designed for broad reach Uses HTTP as an Application protocol, not a transport protocol.

Baby Groot
  • 4,637
  • 39
  • 52
  • 71
Kumar Manish
  • 3,746
  • 3
  • 37
  • 42