SCSF / CAB - Module & View Loading Best Practice?

667 views Asked by At

I have a team who is architecting a complex rich client user interface on CAB/SCSF. One of the design elements we're considering is the dynamic loading of the CAB modules and potentially the CAB views themselves. Leveraging SCSF/CAB "out of the box" will automatically load all module assemblies at start-up time. The start-up time for our rich client application is significant and will grow as we add more modules.

I'm just curious if other folks out there have looked at the standard overhead of the CAB module loading process. Is it all within the loading of the CAB Views? If so, has anyone looked at designing an "on demand" loading mechanism for CAB Views, so that the module assembly-load footprint can be minimized? The idea here is that a View shouldn't be loaded until it's actually needed the first time. And are there any real benefits to designing an "on demand" loading mechanism at the module level?

Thoughts on best practices would be much appreciated ...

(Please note that this question originally appeared on http://social.msdn.microsoft.com/Forums/en-US/modelingandtools/thread/dce936fe-45f9-420c-90ca-286a8d553e35, so I have copy pasted the question written by Dan)

2

There are 2 answers

1
EndlessSpace On

We use CAB extensively for our application, since we have a very complex UI and correspondingly complex business logic. In our case using cab does add overhead due to the framework setting up not only the views, but also setting up the hierarchy of workitems and also the wiring between all the ui components. But I believe that time is not significant compared to the time required for instantiating and loading all the objects & data needed for our application, though someday, we will need to thoroughly test this assumption.

To help us manage the loading time and also manage available functionality we -->have our own configuration manager, that we can use to selectively load only required modules -->settings that allow for views to be only created when a user requests them and not before hand --> lazy loading data only on manual refreshes -->settings to throttle data output from our network services based on user demand.

0
ioWint On

To my knowledge the module load doesnt take too much time. We had two enterprise level applications on SCSF, one of its source code is more than 700mb! its pretty huge and we never faced any issue in loading the module. And until the view is created it is not instantiated in memory. the information about the views in the module is loaded but not instantiated. Your statement is lil confusing.

I would suspect what service calls or other application setup you guys perform while the modules are loading for the first time.