I agree - I found it confusing when I first read about it. It isn't an
"encoder" as it also "decodes".

Much prefer your term "mapper".



-----Original Message-----
From: Geoff Callender [mailto:[EMAIL PROTECTED] 
Sent: 06 November 2008 12:42
To: Tapestry users
Subject: T5: The other misleading term is "encoder"?

Has anyone else found the "encoder" concept in Loop misleading?  I'd  
suggest renaming it to "mapper".

I see a "mapper" as being something that maps between one thing and  
another, eg. between a key and an object.
An "encoder" is something that converts data between formats without  
loss - all the data is there and only its format has changed (eg. from  
chars to binhex).

In fact, the Loop component actually uses both - it asks our "mapper"  
to give it the key of the data, then it uses its own internal  
"encoder" to encode the keys into a hidden field. On submit, its  
internal "encoder" decodes the hidden field, then gives the keys to  
our "mapper" which has to return the corresponding object, possibly by  
going to the database.

I raise this thought because I found the name "encoder" blurred my  
understanding of what I really had to provide and how it would affect  
what went to the client.  I'd suggest "encoder" becomes "mapper", and  
(even more controversial?) PrimaryKeyEncoder becomes PrimaryKeyMapper.

Has anyone else found confusion in this?

G.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

**************************************************************************
 
Experience the British Library online at www.bl.uk
 
The British Library's new interactive Annual Report and Accounts 2007/08 : 
www.bl.uk/knowledge
 
Help the British Library conserve the world's knowledge. Adopt a Book. 
www.bl.uk/adoptabook
 
The Library's St Pancras site is WiFi - enabled
 
*************************************************************************
 
The information contained in this e-mail is confidential and may be legally 
privileged. It is intended for the addressee(s) only. If you are not the 
intended recipient, please delete this e-mail and notify the [EMAIL PROTECTED] 
: The contents of this e-mail must not be disclosed or copied without the 
sender's consent. 
 
The statements and opinions expressed in this message are those of the author 
and do not necessarily reflect those of the British Library. The British 
Library does not take any responsibility for the views of the author. 
 
*************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to