locked
ServerApplicationContext, Odata question RRS feed

  • Question

  • Hi,

    I read the blog post from Joe Binder about the ServerApplicationContext.

    He writes that you can use the ServerApplicationContext with with ASP.net Webforms and MVC using WebAPI. But it is also possible to consume Odata in MVC.

    But I do not know the advantages or disadvantages?

    Is it also possible to use the WebAPI or something similar with ServerApplicationContext to consume Data in WPF, Winforms or other Clients?

    Thanks.

    Markus


    • Edited by Dragonalw Saturday, December 15, 2012 1:27 PM Added a link
    Saturday, December 15, 2012 1:27 PM

Answers

  • Hi Markus,

    In most client technologies (even an Iphone has odata sdk), you can simply consume odata out-of-the-box, without ServerApplicationContext.

    E.g. in a winforms client you simply have to add a service reference to the odata feed, and you are on speed.

    You will need the ServerApplicationContext only when you want to transform the normal odata feed to something else (e.g. WebApi, a CSV feed, ...)


    paul van bladel

    • Marked as answer by Dragonalw Sunday, December 16, 2012 11:16 AM
    Sunday, December 16, 2012 7:29 AM

All replies

  • Hi Markus,

    In most client technologies (even an Iphone has odata sdk), you can simply consume odata out-of-the-box, without ServerApplicationContext.

    E.g. in a winforms client you simply have to add a service reference to the odata feed, and you are on speed.

    You will need the ServerApplicationContext only when you want to transform the normal odata feed to something else (e.g. WebApi, a CSV feed, ...)


    paul van bladel

    • Marked as answer by Dragonalw Sunday, December 16, 2012 11:16 AM
    Sunday, December 16, 2012 7:29 AM
  • Thanks Paul.

    I just tested the Odata with Winforms and the performance is not very good. I thought there is maybe an easy way to improve the performance via ServerApplicationContext? Or maybe I have to wait until the ls team improves LS Odata?

    Sunday, December 16, 2012 11:16 AM
  • ServerApplicationContext should be faster, but you have to have your page INSIDE the LightSwitch project for it to work. if you are consuming LightSwitch data outside of the LightSwitch project you have to use OData. (or you can make a ServerApplicationContext inside the LightSwitch project and then consume that page from outside of LightSwitch).

    Also, the only reason oData would have bad performance is that it is very verbose. I usually use WCF RIA Services (that are then consumed through OData) to shape my collections to make them as small as possible and improve performance.


    The Visual Studio LightSwitch Marketplace

    http://LightSwitchHelpWebsite.com

    Sunday, December 16, 2012 6:51 PM