Very good research.

On Jan 11, 2008 2:13 PM, Daniel Jue <[EMAIL PROTECTED]> wrote:
> I wanted to throw together a list of naming peculiarities (I hesitate
> to call them pitfalls), to put on the wiki.
> Some are documented on the API website, some of these are mailing list
> documented, some are only documented if you look into the code.
>
> Use of underscore prefixes for fields, but not in accessors
>    Some people just grew into doing it this way.  Eclipse's
> getter/setter autogeneration keeps the underscore.
>

As you found, Eclipse can adapt to this.  It's not a requirement of
Tapestry, just a coding style.

> Non case sensitivity of page names in URL
>    This is just a nice feature in Tapestry, documented in the code
>
> URL shortening of page names under a similarly named directory.
>    A documented feature intended to make things nice for users.
> For example:
>    A page named "Report" under a directory named "Report" will not resolve.

This should be fixed in 5.0.7, is it not?

>    A page named "StatusReport" under a directory named "Report" will
> resolve to "Status" (i.e. report/status in the url)

To me, this seems sensible.

>    A page named "ReportStatus" under a directory named "Report" will
> resolve to "Status" (i.e. report/status in the url)

Again, seems sensible.

>    A page named "StatusReport1" under a directory named "Report" will
> resolve to "StatusReport1" (i.e. report/statusreport1 in the url)

When a package name is replicated as a prefix or suffix of the
unqualified class name, it is stripped out (unless that would reduce
the name to the empty string).

>
> Case sensitivity in @OnEvent and similar annotations
>   This is just a Java case sensitivity rule.  Those unfamiliar with
> annotations before working with Tapestry (as I was) may forget that
> case matters in annotations!  @onEvent is not the same, and your IDE
> should tell you this.

A concern of the Java compiler, not of Tapestry, of course.

>
> Non case sensitive for value of OnEvent
>    @OnEvent(value="SUBMIT")
>    @OnEvent(value="submit")
>
> Form event methods without annotations:
> Besides typos in the name of the method, there is a case sensitivity
> issue to be aware of: the "on" prefix must be lower case. i.e.
> "OnSubmit" will not get called, but "onSubmit" will. T5's extensive
> case insensitivity can cause us to be lazy sometimes.
>

This could be considered a bug, if you feel it is, submit a bug.

> Tapestry XML DTD's and their keys are case sensitive
>

Again, this is in accord with XML, a concern that goes beyond Tapestry.

> Injected Assets are case sensitive
>    This is a Servlet API /Java runtime rule.

This could be overcome with some effort and expense.

>
> Names of *.properties files are case sensitive


Again, could be overcome with some effort and expense.

> Names of properties inside the *.properties files are not case sensitive

Yes, by intention.

>
>
> Are there more?  Does this list sound right?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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

Reply via email to