Provider, ContainerProvider, Composite Pattern


PAPI = Provider API, a public interface in PS6/7.

I would like to consider just two interfaces from PAPI: Provider and ContainerProvider. These two form the basis of PS aggregation such that ContainerProvider allows aggregating content from more than one Provider. The two interfaces can be pictorially presented as follows:

Provider, ContainerProvider, Composite Pattern
Note that this is a simplified representation for discussion purpose.

Provider is first class citizen of PS6/7 that presents content, edit, help, etc "views". ContainerProvider is the mechanism that manipulates two sets of providers; available providers "can be selected" for presenting content view in client browser.

ContainerProviderAdapter, the supposed to be root of all ContainerProvider implementations, extends ProviderAdapter. The aggregation engine, PS6/7 Desktop logical component, works with the "top level" or "default" container-provider to give back response to client's request. The top level container can contain another container, e.g. SamplePortal has top level container as tab container, and the default selected tab containing a table container. That is, Desktop effectively allows building a tree of collaborating providers ("parts") and container-providers ("whole") to present PS page.

Consider GOF Composite pattern with four collaborators: Component, Composite, Leaf, and Client. With what we have in PS6/7 Desktop, I can say Provider is Leaf, and ContainerProvider is Composite. There is no Component interface per say! Component interface would be what we've in ContainerProviderAdapter class. That's why I can say Desktop uses Composite pattern albeit implicitly or indirectly. Desktop as a Client knows about Leaves, that's all.

<script type="text/javascript" language="javascript"> var sc_project=1731913; var sc_invisible=0; var sc_partition=16; var sc_security="2f7c65d8"; </script> <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script>
Comments:

Have a look at related discussion at Implicit Use of Composite Pattern.

Posted by Ajit Sabnis on August 05, 2006 at 10:30 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

ajitsabnis

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today