best way to push database changes using net.tcp communicationa and silverlight

407 views Asked by At

What is the best way to push database changes to silverlight ui using net.tcp communications? Sql Notifications? query notifications, clr triggers? or just poll the database every so many seconds?? And would net.tcp be the solution?

1

There are 1 answers

0
Ken Smith On BEST ANSWER

See my answer to a very similar question here. Basically, it all depends on what your needs are. The simplest way would be to just poll the database. That may meet your needs if timing and/or performance and/or complexity aren't critical. But if you need a more scalable solution, then you probably want to use something like a SqlDependency object.

Once you know what data has changed, then yes, you would presumably send out notifications to the clients over a Net.TCP or HttpPollingDuplex binding.

And once the client has received its notification, then you'll need to implement a translation layer between the notification and the model and/or view model that's sitting behind the UI. There's no special magic here, just some careful coding to make sure that everything stays in sync.

Once the model/viewmodel is updated, you'll finally get to the point where XAML databinding will show its value, but unfortunately, that's only the last part of the solution.