New Posts New Posts RSS Feed: Silverlight Guidance for DevForce EF developers?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Silverlight Guidance for DevForce EF developers?

 Post Reply Post Reply
Author
AdamC View Drop Down
Newbie
Newbie
Avatar

Joined: 04-Feb-2008
Location: United States
Posts: 20
Post Options Post Options   Quote AdamC Quote  Post ReplyReply Direct Link To This Post Topic: Silverlight Guidance for DevForce EF developers?
    Posted: 23-Jul-2009 at 1:08pm
My company is currently using DevForce EF (WinClient) to develop a WPF application.  We would like to eventually deploy certain pieces of the application using Silverlight and will most likely upgrade to DevForce Universal to obtain the DevForce Silverlight product.

To my question: Is there anything we can be doing now in our DevForce EF-related code that will help us minimize re-writes when we start working on our Silverlight application?  In other words, we are looking for some guidance on writing business logic/ DevForce EF queries so that we will be able to share our code between the WPF and Silverlight applications.

Thanks in advance for any information you can provide!
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 23-Jul-2009 at 4:51pm

Our goal was to make the WinClient and Silverlight business objects and APIs as close to each other as possible.  With that said, there are necessarily a few differences between the environments.

One of the biggest differences is that all network access is asynchronous in Silverlight.  This means that you will need to use asynchronous queries and saves when working with the persistent data store.  There are a few things in DevForce that can make this easier.
 
First, you can use the cache-then-compute pattern to bring all of the necessary objects into cache first, and then execute a fully synchronous block of logic against the cache using the CacheOnly QueryStrategy.
 
Second, to avoid the headache of managing event handlers for all the asynchronous tasks, DevForce provides the AsyncSerialTask and AsyncParallelTask classes that will take multiple tasks and automatically execute them in serial or parallel for you.
 
When designed correctly, you can share all of your business objects and business logic code between your Silverlight and your desktop/smart client application.  On the UI side, you can share a bulk of the code if you limit yourself to the Silverlight subset of the WPF API.
 
The ModelExplorer and PrismExplorer also have example patterns and practices for building a Silverlight application.
 
Back to Top
AdamC View Drop Down
Newbie
Newbie
Avatar

Joined: 04-Feb-2008
Location: United States
Posts: 20
Post Options Post Options   Quote AdamC Quote  Post ReplyReply Direct Link To This Post Posted: 24-Jul-2009 at 6:37am
Thanks for the information!  I will definitely take a look at the ModelExplorer and PrismExplorer examples.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down