Re: extended bindings
Re: extended bindings
- Subject: Re: extended bindings
- From: Mike Schrag <email@hidden>
- Date: Fri, 3 Nov 2006 15:50:17 -0500
100% agree w/ Chuck ... Definitely look at Wonder (and join the
mailing list) before you undertake anything. WOOGNL does what you're
talking about with arbitrary method calls in bindings. I'm pretty
sure I've seen a conditional like what you're talking about in
Wonder, too, but I can't seem to find it at the moment.
Additionally, Project Wonder has gotten a bunch of a new enhancements
to template and declaration parsing:
* Rails-inspired "helper functions", so you can do things like:
value = entity.entityName|pluralize, or title = person|displayName so
you can make more easily reusable "view chunks" of java code
* <wo> tags in addition to <webobject> tags
* Inline binding syntax so you can mix and match .wod bindings with
<wo:string value = "$person.name"/> tags
And Timo is working on a cool dynamic template tag as well using
inline bindings. All kinds of fun new technologies to play w/ in
there. And with Anjo's recent work, it's much easier to include
pieces of Wonder without necessarily committing to using everything.
ms
On Nov 3, 2006, at 3:02 PM, Chuck Hill wrote:
One word. Wonder.
See the WOOGNL framework, for what it can do see http://www.ognl.org/
I am pretty sure that I have written some things like your
XYConditional. I just can't recall where they are now...
Chuck
On Nov 3, 2006, at 11:47 AM, YL wrote:
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:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com
This email sent to email@hidden
_______________________________________________
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