extended bindings
extended bindings
- Subject: extended bindings
- From: "YL" <email@hidden>
- Date: Fri, 3 Nov 2006 12:47:56 -0700
I can see two reasons to extend binding conventions. Once we can do such, WO
can really beat other web solutions. Because WO is almost there and others
are not. The whole motivation is to make web application evolvable at
runtime so that people can use the app doing business without too many
upgrading requests for developers, and also make the app more managable by
business people.
(1)reduce coding efforts.
In wod file, instead of saying
UseBatching: WOConditional { condition = useBatching; } // and
implement method "useBatching"
We can do (more handy binding sugestions are welcome)
UseBatching: XYConditional {
testingValueOne = searchingResults.count;
testingValueTwo = session.sessionUser.userPreferences.batchSize;
operator = ">";
}
// So that we don't need to write method "useBatching", which is an
ugly method anyway
Instead of doing
MyImage: WOImage { src = myImageSource; ...}
.....
We can do
MyImage XYImage { src =
contentEO.@imageUrlWithImageName?ofType?_apple|jpg; }
expect url from method call
[contentEO imageUrlWithImageName:@"apple" ofType: @"jpg"]
or contentEO.imageUrlWithImageName("apple","jpg")
will be assigned to src
(2)support runtime manageable contents and more.
MayImage: XYField { dataDict = aDataDict; }
// Where XYField is a WOSwitchComponent, the component name is specified in
aDataDict:
{
WOComponentName = XYImage;
sourceObjectKeyPath = contentEO;
fieldKey = src;
valueKeyPath = "@imageUrlWithImageName?ofType?_apple|jpg:";
border = 0;
width = 135;
...
}
And aDataDict can be from database, etc. that way one can have a meta page
(WOComponent) to handle various contentEOs and those EOs are editable at
runtime.
I hope to be able to make some changes at WOAssociation level to solve most
of the issues towards the featues I like. Any advises are greatly
appreciated.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden