locked
One to many Navigation Property in HTML Client table RRS feed

  • Question

  • Hi,

    We are considering LightSwitch as a framework for our LoB applications. We have rather big model, 280 tables, some tables are very wide, up to 180 columns and so far it was good, including performance of the wizards in VS 2013.1 + March update. However I faced a pitfall - we have an entity with technical information, let's call it product, and another entity with all textual descriptions, for each supported language we have a child description entity, all navigation properties are in place. What I wasn't able to find is how can I promote English product name from one of description entities to the table displaying list of the products.

    1. I know that computed columns don't work yet in HTML client. Is there any plan when it could be added?

    2. I saw a sample how to calculate total on details screen on LightSwitchHelpWebsite, however we need an additional column in the table which hasn't been created on the client side. Is there any workaround which we can follow? 

    3. And we know that we can shape the data using OData or RIA Services, we are looking for alternative solutions.

    BTW, our geat thanks to Michael Washington for his LightSwitchHelpWebsite.

    Best regards,
    Andrew.

    Wednesday, April 9, 2014 11:28 AM

Answers

  • Thanks for the "shout out" :)

    You can use JavaScript to make calls to get the information, but you increase the number of calls to the database, slow down execution, and really create a lot of brittle code (you get run-time erorrs rather than easy to see compile-time errors)

    Instead if you use a WCF RIA Service you can "combine tables" very easily.

    I program with LightSwitch every day and at this point there is nothing I do that I don't use WCF RIA Services for, and I can't think of an alternative other than creating SQL Views. My main problem with SQL views is that unlike WCF RIA Services they don't give me clear compile-time errors when I refactor code (something I do all the time).


    Unleash the Power - Get the LightSwitch HTML Client book

    http://LightSwitchHelpWebsite.com


    • Edited by ADefwebserver Wednesday, April 9, 2014 4:22 PM
    • Marked as answer by Angie Xu Wednesday, April 16, 2014 7:38 AM
    Wednesday, April 9, 2014 3:47 PM

All replies

  • Thanks for the "shout out" :)

    You can use JavaScript to make calls to get the information, but you increase the number of calls to the database, slow down execution, and really create a lot of brittle code (you get run-time erorrs rather than easy to see compile-time errors)

    Instead if you use a WCF RIA Service you can "combine tables" very easily.

    I program with LightSwitch every day and at this point there is nothing I do that I don't use WCF RIA Services for, and I can't think of an alternative other than creating SQL Views. My main problem with SQL views is that unlike WCF RIA Services they don't give me clear compile-time errors when I refactor code (something I do all the time).


    Unleash the Power - Get the LightSwitch HTML Client book

    http://LightSwitchHelpWebsite.com


    • Edited by ADefwebserver Wednesday, April 9, 2014 4:22 PM
    • Marked as answer by Angie Xu Wednesday, April 16, 2014 7:38 AM
    Wednesday, April 9, 2014 3:47 PM
  • Hi,

    Is WCF RIA Service the same as WCF Data Services?  I ask because in this article  it says that OData is going away from  WCF Data Services to ASP.NET Web API.  Does that mean we should be going away from WCF RIA Services or am I totally confused? 

    Thanks

    Wednesday, April 9, 2014 5:43 PM
  • Hi,

    Is WCF RIA Service the same as WCF Data Services?  I ask because in this article  it says that OData is going away from  WCF Data Services to ASP.NET Web API.  Does that mean we should be going away from WCF RIA Services or am I totally confused? 

    Thanks

    The implementation of WCF RIA Services in LightSwitch is a specific LightSwitch thing that LightSwitch supports. If that changes in the future my expectation is that they will provide something that provides the same functionality that WCF RIA Services in LightSwitch currently provides.

    However, right now, today, it is supported and provides functionality that I need so I continue to use it.


    Unleash the Power - Get the LightSwitch HTML Client book

    http://LightSwitchHelpWebsite.com

    Wednesday, April 9, 2014 6:26 PM