You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jonathan O'Connor <ni...@eircom.net> on 2009/02/13 14:38:48 UTC

AppModule conventions

Hi,
I've been looking for documentation about how the AppModule class works. 
Sadly, I have only found a few examples of bind/contribute and build 
methods, but nothing that explains when and what to use.

I would like to know:
1. Which methods should be static and which non-static? Does it matter?
2. If I write a method "contributeXXX()" what does the XXX refer to? A 
Service? Also, why do some contribute methods take a Map, and others a 
list? Who decides?
3. Are there other prefixes that are magic, apart from bind, contribute 
and build?

If I missed this in the standard documentation, then apologies, and a 
link to where to look is fine,
Jonathan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: AppModule conventions

Posted by Jonathan O'Connor <ni...@eircom.net>.
Robert,
thanks, somehow I missed this, and it didn't show up in a google search 
either.
Jonathan

On 13/02/2009 14:05, Robert Zeigler wrote:
> Hi,
> The AppModule is an IOC module, so, I would start with:
>
> I would start at 
> http://tapestry.apache.org/tapestry5/tapestry-ioc/index.html.
>
> And read the "Modules", "Services", "Decorators" and "Configuration" 
> pages, at a bare minimum.
>
> Robert
>
> On Feb 13, 2009, at 2/137:38 AM , Jonathan O'Connor wrote:
>
>> Hi,
>> I've been looking for documentation about how the AppModule class 
>> works. Sadly, I have only found a few examples of bind/contribute and 
>> build methods, but nothing that explains when and what to use.
>>
>> I would like to know:
>> 1. Which methods should be static and which non-static? Does it matter?
>> 2. If I write a method "contributeXXX()" what does the XXX refer to? 
>> A Service? Also, why do some contribute methods take a Map, and 
>> others a list? Who decides?
>> 3. Are there other prefixes that are magic, apart from bind, 
>> contribute and build?
>>
>> If I missed this in the standard documentation, then apologies, and a 
>> link to where to look is fine,
>> Jonathan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: AppModule conventions

Posted by Robert Zeigler <ro...@scazdl.org>.
Hi,
The AppModule is an IOC module, so, I would start with:

I would start at http://tapestry.apache.org/tapestry5/tapestry-ioc/index.html 
.

And read the "Modules", "Services", "Decorators" and "Configuration"  
pages, at a bare minimum.

Robert

On Feb 13, 2009, at 2/137:38 AM , Jonathan O'Connor wrote:

> Hi,
> I've been looking for documentation about how the AppModule class  
> works. Sadly, I have only found a few examples of bind/contribute  
> and build methods, but nothing that explains when and what to use.
>
> I would like to know:
> 1. Which methods should be static and which non-static? Does it  
> matter?
> 2. If I write a method "contributeXXX()" what does the XXX refer to?  
> A Service? Also, why do some contribute methods take a Map, and  
> others a list? Who decides?
> 3. Are there other prefixes that are magic, apart from bind,  
> contribute and build?
>
> If I missed this in the standard documentation, then apologies, and  
> a link to where to look is fine,
> Jonathan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: AppModule conventions

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
hi jonathan,

1) you can use either way. some methods must be static: binder() and 
contributeAlias.
by using static methods you can avoid circular dependencies

2) the XXX refers to the service name. the implementation of that service 
can hav
the follownig parameters

Collection -> maps to Configuration
List -> maps to OrderedConfiguration
Map -> maps to MappedConfiguration

... so the service decides how he expects the contribution

3) yes, "decorate" for decorating services. 5.1.0.0-SNAPSHOT also comes 
with
a "advice" prefix

its all documented, but scattered in several documents. 

g,
kris




Jonathan O'Connor <ni...@eircom.net> 
13.02.2009 14:38
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
Tapestry users <us...@tapestry.apache.org>
Kopie

Thema
AppModule conventions







Hi,
I've been looking for documentation about how the AppModule class works. 
Sadly, I have only found a few examples of bind/contribute and build 
methods, but nothing that explains when and what to use.

I would like to know:
1. Which methods should be static and which non-static? Does it matter?
2. If I write a method "contributeXXX()" what does the XXX refer to? A 
Service? Also, why do some contribute methods take a Map, and others a 
list? Who decides?
3. Are there other prefixes that are magic, apart from bind, contribute 
and build?

If I missed this in the standard documentation, then apologies, and a 
link to where to look is fine,
Jonathan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org