views:

58

answers:

2

Hello

I'm very new to silverlight and I'm thikning which way to go. I'm in planning phase of my new project which should be built on silverlight. The problem is that I want to have my own DAL -> BLL on server side, and WCF service, which will talk to Silverlight should be consumable by other applications too, including other technologies such as Java. I know that in 4 release MS presented RIA services to handle business logic tasks and EF for data handling, but I don't want to use EF at all. So do you have any suggestions what's the cons and pros of choosing either ways? Does RIA service has some cons when working with silverlight app than standard WCF service? How about portability? consuming it from java for example?

Thanks

A: 

RIA Services are not tied to Entity Framework. You could use just any data access technology you want and expose it as RIA service. An advantage of RIA services over plain WCF is that it simplifies much of the necessary plumbing.

Darin Dimitrov
That's what I want to know. What does RIA service simplifies exactly? I really have no idea, never worked with RIA and Silverlight and in the net, I can only find information about RIA + EF model, that's why i'm asking here.
Davita
One example is server side validation using DataAnnotations on the model classes will be automatically transposed to the client side without any code necessary. It also provides common tasks such as authentication and roles.
Darin Dimitrov
A: 

RIA Services are a layer that sits on top of WCF. It is designed to enable advanced usages with EF or LINQ to SQL. You can also mix in your own custom WCF services, and you can use RIA with your own custom logic, data/entity mechanisms, and your custom DTOs as well (you will lose most of the advantages RIA offers though).

The key thing about RIA Services is that it allows automation of LINQ query execution and auto-generates some very advanced proxy classes on the client. This allows the client to work with the RIA Services as if the query execution was local on the client, but have those queries actually execute on the server. The drawback to RIA Services is that it's mostly a MS only technology (in this version at least). In theory you can talk to RIA from a java client, but you'd gain almost no advantage that way; you'd be best advised to just build your server services with WCF manually if you are going to support other clients.

One exception is that RIA can generate oData endpoints. That might be useful in non-MS client scenarios, but only if oData is appropriate in your case. RIA Services are VERY new though, so I'd wait for the next version before trying to use it for non-silverlight clients.

Stephen M. Redd