Does anyone have any input on setting up my CAB application so that the
application is thread safe, and cached appropiately? I read that this
can be managed through Services, and dynamic injection. On the
contrary, I was told that this can be handled using Enterprise Library
cached application block. Last, but not least, i read you can implement
this at the class level, creating immutable classes, and caching them
accordingly. Any suggestions would be greatly appreciated?

Re: Composite UI Application Block - Thread Safe by Bob

Bob
Thu Jan 25 19:31:16 CST 2007

All UI operations must be carried out on the UI thread. Therefore you
still need to make the distinction in CAB whether the operation is a
graphical one or not.

A service dependency for example may work well on some other thread but
a UI operation will not.

CAB only connects up the various parts of the application. Those parts
all need to respect the basic principals.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





lwhitb1 wrote:
> Does anyone have any input on setting up my CAB application so that the
> application is thread safe, and cached appropiately? I read that this
> can be managed through Services, and dynamic injection. On the
> contrary, I was told that this can be handled using Enterprise Library
> cached application block. Last, but not least, i read you can implement
> this at the class level, creating immutable classes, and caching them
> accordingly. Any suggestions would be greatly appreciated?
>

Re: Composite UI Application Block - Thread Safe by lwhitb1

lwhitb1
Sat Jan 27 22:51:37 CST 2007

Thanks for the comment. What would you say about the following
description:

I would like to pull data from a data layer, and keep that
information cached so that you don't have to make repeated calls to
the data base. From the little research I have done so far, and from
what you described to me, it seems possible to keep the information in
the ui thread, and use CAB's service to pull data from the data layer,
populate a view or module, simply use that instance in a workitem,
where it can be passed around accordingly. However, if this can't be
done at the ui level, then i thought about using the cached
application block provider from enterprise library at the data access
layer.. Do you see anything wrong with this?

THanks..

On Jan 25, 7:31 pm, "Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net>
wrote:
> All UI operations must be carried out on the UI thread. Therefore you
> still need to make the distinction in CAB whether the operation is a
> graphical one or not.
>
> A service dependency for example may work well on some other thread but
> a UI operation will not.
>
> CAB only connects up the various parts of the application. Those parts
> all need to respect the basic principals.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Ramuseco Limited .NET consultinghttp://www.ramuseco.com
>
> Find great Windows Forms articles in Windows Forms Tips and Trickshttp://www.bobpowell.net/tipstricks.htm
>
> Answer those GDI+ questions with the GDI+ FAQhttp://www.bobpowell.net/faqmain.htm
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
> lwhitb1 wrote:
> > Does anyone have any input on setting up my CAB application so that the
> > application is thread safe, and cached appropiately? I read that this
> > can be managed through Services, and dynamic injection. On the
> > contrary, I was told that this can be handled using Enterprise Library
> > cached application block. Last, but not least, i read you can implement
> > this at the class level, creating immutable classes, and caching them
> > accordingly. Any suggestions would be greatly appreciated?