views:

180

answers:

1

I've done some cursory reading on Silverlight and data access. From what I can tell, I'll need a web service to hook up a Silverlight application to a database while it's running in browser. Is this true when it goes OOB? Or is there another method that should be used then?

Some background: We have a .Net 2.0 Winforms application. We're trying to convert the functionality to a web app of some sort without rewriting the business logic. Our internal web developers all write in ColdFusion, so Adobe Air seemed to be a natural fit. However, we've found out that the only way to consume a .Net dll in Air is to write an EXE that makes function calls. (Perhaps something like a WCF service on the local machine.) Since that's the case, I thought I'd see how the data access was in Silverlight OOB, because we will have customers with limited-to-no internet connectivity and will need to be able to access an offline DB.

A: 

As far as I know, whether it runs in or out of browser it will need a web service or other means to hit a database. You cannot do it through the Silverlight application because of the sandbox security model used.

In 4.0 there is the added use of COM so you may be able to use that to your advantage.

Otherwise you would just be using a file stored in IsolatedStorage to persist data to, like an XML file for example. Maybe this is what you are looking for though?

Tacoman667
No, not looking to just persist to an XML file. We have a full fledged product selection DB. We have traveling salesmen who like to work on the plane or out at a job site w/o connectivity.Thanks
taylonr
What about maybe caching into a file in IsolatedStorage when connectivity is down and key off the network availability event to push the changes back to the web service once connection is restored?
Tacoman667