Print Page | Close Window

Performance Tips

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1517
Printed Date: 23-Apr-2024 at 8:04pm


Topic: Performance Tips
Posted By: *Calsy
Subject: Performance Tips
Date Posted: 10-Oct-2009 at 8:39pm
Hi Guys, Just starting to put together our first Silverlight app. Got the structure all sorted out and now starting to get deep into the data side of things.
 
Just wanting to get some tips and hints from you on how to optimize performance in DevForce silverlight. Basically 90% the application will be a set of listings and details. So im already starting to cache data as soon as the user opens up the web app and also trying to shrink data set sizes to be as minimal as possible so only the needed data is getting shunted across the line.
 
Looking forward to any advice you can give me on things to do to optimize the use of data with devForce.
 
Thanks



Replies:
Posted By: kimj
Date Posted: 13-Oct-2009 at 3:17pm
Hi Matthew.  Sorry for the late response, but I was hoping your post would get a response from other DevForce users dealing with the same issues.  You're definitely on the right track, and as an experienced DevForce Classic developer you already have a head start in knowing to pre-load data and  reduce trips to the BOS, so I'm not sure what else I can add.  We're doing what we can to improve performance and to provide an easy-to-use tool set for working in Silverlight, and suggestions are always welcome.
 
Here are a few areas to look at --
 - using Include with queries to pre-load related data (this was done with EntitySpans in Classic)
 - using InvokeServerMethodAsync to both move logic to the BOS and to send larger "chunks" of data to the client
 - the AsyncSerialTask and AsyncParallelTask, both of which attempt to make working with numbers of async actions a bit easier
 - asynchronous navigation using the PendingEntity and PendingEntityList - these allow you to continue to use DevForce lazy loading of navigation properties in the async world
- caching data to IsolatedStorage using the EntityCacheState (this was called an EntitySet in Classic)
 


Posted By: *Calsy
Date Posted: 13-Oct-2009 at 5:26pm
Hi kim, Thanks for your response.
 
Coming from DevForce classic to DevForce Silverlight is screwing with my mind a bit but i can see the light at the end of the tunnel (even though the tunnel does still seem quite long). Can you tell me of any good learning resources on how correctly set navigation Properties for ideablade (I miss just being able to go straight into the object mapper and adding my own relations), andalso learning linq for ideablade?
 
Thanks


Posted By: kimj
Date Posted: 13-Oct-2009 at 6:59pm
The "Learning Resources" html page (available from the Getting Started menu item or the LearningResources folder) has some excellent material in the "Introduction to DevForce" and "Business Object Mapping" sections.  I'd highly recommend the videos on the DevForce WinClient support page from our website also - http://www.ideablade.com/DevForceWinClient/DevForceWinClient_Videos.html - http://www.ideablade.com/DevForceWinClient/DevForceWinClient_Videos.html  - these aren't really WinForms-specific and cover how to write LINQ, how to update the Entity Model, etc.


Posted By: *Calsy
Date Posted: 15-Oct-2009 at 2:45pm
Hi Kim, Thanks for the response. Watched the tutorial movies this morning and they were great.
 
I have 2 outstanding questions to ask you though:
 
1. The movie on relations went on to explain about adding one to many relationships. How do we go about adding in one to one relations?
 
2. How do you go (or if you can) add relations (one to one relations) from tables to views? We were able to do this quite easy in classic through the object mapper. For our scenario we have created views for all our listings. These views are pretty much a cutdown set of data and also bring back all related data for the listing. These views will than have a one to one relationship to its corresponding table e.g. Customer has a one to one relationship with vwCustomerListing. 
 
Look forward to hearing back from you.
 
Thanks 


Posted By: GregD
Date Posted: 16-Oct-2009 at 11:43am
Calsy, Kim's on vacation for a few days, so I'll try to answer your questions.

>> How do we go about adding in one to one relations?

SQL Server itself doesn't distinguish between 1-M and 1-1, but you can make the distinction in the Entity Data Model (EDM). In the designer, select an association, display its properties, expand an endpoint of the association in the properties window, and then you can change the multiplicity from Many to 1, or 0..1.  Do that once and inspect the XML to see the corresponding syntax there.

You can't change the multiplicity in the Devforce Object Mapper (though you can see it there): you must change it in the EDM.

>> How do you go (or if you can) add relations (one to one relations) from tables to views?

Again, this is something you do in the EDM. You can map a conceptual entity to a view just as you can to a table. Then you work with that conceptual entity just as you do those that are mapped to tables.



Print Page | Close Window