did you profile the app to verify this is your bottleneck? 2009/6/16 Lukasz Podolak <[email protected]>: > I'm building a smart client app which has finite number of modules. The > application controller is being injected with a list of all registered > modules (actually ModuleManager(s) in my code) that are a facades to each > module and hide their implementation behind a simple interface. Those > ModuleManagers are injected in constructor time with all specific classes > that are resposible for their tasks (like each builds it's own ribbon, each > has different security permissions, etc) > > But there is a single, heavy dependency for each ModuleManager that is a > representation of the actual screen (with heavy, 3rd party vendor's > controls) - I use an interface segregation so that I can operate on > displaying the screen in my logic without touching any Windows.Forms.* The > implementation for this interface however is the actual screen (User > control). > > Once this dependencies are resolved there is too big memory consumption > jump when not particularly needed. As I said I'm instantiating all > ModuleManagers at the beginning (so that I can for example choose which one > can be used and appended to the ribbon) but I don't necessarily want to load > all screens at one time ? I need only one, and the rest could be > instantiated only when accessed. > > I know I could lazy load this manually but I'm trying to keep no reference > to my ServiceLocator in the Logic module - I only keep a clean classes that > are full of constructor injection. > > This is my first smartclient project (i'm definitely more a web-guy) so I > may not get something correctly in terms of structuring the application. > If I do something wrong, I'm happy to be corrected. > thanks > > 2009/6/15 Krzysztof Koźmic <[email protected]> >> >> Lukasz, >> >> What exactly are you trying to do? >> >> 2009/6/15 Lukasz Podolak <[email protected]>: >> > >> > On Mon, Jun 15, 2009 at 6:58 PM, Bill Barry <[email protected]> >> > wrote: >> >> >> >> I would do this in a similar manner to how lazy loading is done within >> >> NH... >> > >> > thanks guys, I will try this approach >> > ł. >> > >> > >> > > >> > >> >> > > > > >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
