Yes... basically it "wraps" the TransferDecorator using CF8's
onMissingMethod() functionality.... I would suggest that if you
haven't yet, go check out the work Peter Bell did with the coldfusion
IBO on riaforge.org.. The TIBO started as a slightly modified IBO, it
now has a fairly similar api, but extends my BaseObject and also
incorporates my own Paginator and Filter objects, its implementation
in Transfer is all is based on the abstract transfer service/gateway/
decorator ideas that Bob S. and Paul M. and others have been
graciously sharing with us for a while (great work!!!)....
At the moment, I am using the TIBO mainly in my UI while i develop it
rather then for things going on in my service layer, but I don't see
any reason I couldn't or shouldn't also be able to use it anywhere i
need to as well..
However, right now I am in the middle of fleshing out the basic filter/
paginator functionality when it comes to user sessions & other caching
issues...... I think I have it mostly licked, but I need to do some
more work.
Another topic for another day maybe.
Basically, It all looks something kinda like this...
__________________________
AbstractDecorator:
getDisplayTitle() : string
return getTransferObject().getName();
__________________________
UserDecorator -> AbstractDecorator
getDisplayTitle(); //overrides abstractdecorator,
return getTransferObject().getUsername();
__________________________
BaseObject:
init(args);
configure();
get(val);
set(val);
new(object);
add(scope,val);
exists(val);
onMissingMethod() :
get[PropertyName] or get[InstanceVar]
set[PropertyName] or set[InstanceVar]
new[Transient] // (Paginator/Filter)
__________________________
TIBO -> BaseObject
configure();
load(gateway,paginator,filter);
loadStruct(pos);
filter(string);
reset();
next();
populate();
moveTo(pos);
getPKValue()
getIsPersisted() : Always TRUE
getIsDirty()
getPosition();
getCount();
getPage();
getPaginator();
getFilter();
__________________________
Controller:
ibo = userService.getIterator();
__________________________
View:
ibo.reset();
#ibo.getPaginator().render()#
if (ibo.next()) {
#ibo.getPKValue()#
#ibo.getDisplayTitle()#
#ibo.getIsPersisted()#
}
Hope that helps you visualize it a little bit.. its a lot more
complicated .. so you should start by checking out the work by Peter,
Bob, and Paul on riaforge if you haven't already....
Please excuse any typos and psudo code, been a busy day..
Regards,
-adam
On Mar 13, 12:34 pm, John Whish <[email protected]> wrote:
> @Adam, that TIBO sounds interesting. Does it pick up the 'custom' behaviour
> from the decorator or do you end up duplicating code?
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" 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/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---