locked
Getting started with RIA RRS feed

  • Question

  • I'm still baffled by RIA. Never done anything with WCF and running into limitations of having to return data in exact shape as entities. have worked around some of these with SQL views due to time limitations. 

    I have a few dumb questions. I read many of the links about lightswitch and RIA, but don't understand much of the terminology (e.g. Domain services), so I'm lost almost straight away. I'm willing to buy a book or take a course on plural sight or wherever, but want to make sure i choose the right one as there are very few books specific to LS and I don't want to waste time learning the wrong subject.

    I have a desktop silverlight app that's deployed via a UNC path. What's required to use RIA? I'm assuming it's going to involve having to use IIS and creating a WCF service(?) on the IIS server to consume the http calls. Or have I got completely wrong, is RIA services something that runs in the silverlight app (and still sends call to SQL server --not via HTTP)

    Let's assume I want to use just one RIA call for joined tables (no FK link), do I have to move to deploying via IIS and install some kind of service on the IIS server? (like an ASP web site).

    Can someone point me in right direction?

    Thanks

    Mark

    Mark

    Friday, April 11, 2014 11:09 PM

Answers

  • Mark, you can create a domain service class, inheriting from DomainService, right inside your LS server project and have that class utilize the LS ServerContext for data access. You then import that domain service as another data source into your LS server project. LS takes care of the hosting and deployment for you, so no additional work required like deploying WCF services under IIS etc. have a search on the lightswitchhelpwebsite.com for some examples on creating a RIA domain service data source. There are other examples related to LS on the internet too. You can also put the domain service in a different class library project if you wish and LS will still take care of the hosting and deployment for you.

    Regards, Xander. My Blog

    Saturday, April 12, 2014 1:38 AM

All replies

  • Mark, you can create a domain service class, inheriting from DomainService, right inside your LS server project and have that class utilize the LS ServerContext for data access. You then import that domain service as another data source into your LS server project. LS takes care of the hosting and deployment for you, so no additional work required like deploying WCF services under IIS etc. have a search on the lightswitchhelpwebsite.com for some examples on creating a RIA domain service data source. There are other examples related to LS on the internet too. You can also put the domain service in a different class library project if you wish and LS will still take care of the hosting and deployment for you.

    Regards, Xander. My Blog

    Saturday, April 12, 2014 1:38 AM
  • Mark, you can create a domain service class, inheriting from DomainService, right inside your LS server project and have that class utilize the LS ServerContext for data access. You then import that domain service as another data source into your LS server project. LS takes care of the hosting and deployment for you, so no additional work required like deploying WCF services under IIS etc. have a search on the lightswitchhelpwebsite.com for some examples on creating a RIA domain service data source. There are other examples related to LS on the internet too. You can also put the domain service in a different class library project if you wish and LS will still take care of the hosting and deployment for you.

    Regards, Xander. My Blog

    Thanks Xander. that is good news. I did see the stuff on Lightswitchhelp but they all built on to of an existing app. Was hoping to find something that started with an empty project. Will continue to google

    Mark

    Saturday, April 12, 2014 3:42 PM