> Stop on ognl, prop is not powerful.
>
> Creating java method
> public boolean isSufficientPlayers() { return playersOnline > 100; }
> instead
> ognl:playersOnline > 100
> is not good idea
>
> 1. You move presentation in to java code
> 2. You lost control on viewable presentation code, 100 or 50 or 1000 
> palyersOnline...
> 3. Less usability
> 4. Don't wait future release of tapestry, maybe it will be in 2010 or
> 2011 :), but feature have needed yesterday


Hmm... I have to disagree. The method is a much better idea than using
inline expressions.

1. "playersOnline > 100" sounds a lot like business logic that may get
used elsewhere and changed in the next release. Do you want that
floating around in the template?

2. You now have central control of a number that is likely to change.
magic numbers should be avoided in your all of your code, including
your templates.

3. <t:if test="sufficientPlayers"> takes much less brain power to
process than the inline expression. Almost like you are documenting
what playersOnline > 100 is supposed to mean (was that the bonus chips
magic number?)

4. Ok, here I agree. Don't wait to code until all the features you
want are in the product. That's just silly...

Josh

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

Reply via email to