but you can see some mechanism in JPA (Java Persistence API).
here you just Annotate a class with @Entity for using it as a Entity in
application.
I'm no JPA expert, but I use hibernate as my JPA/ORM implementation and I /still/ have to tell hibernate which classes are entities through a configuration (either xml or programmatically). You have to do this because there's no other way for the system to know where to find the classes - just like T5.
i think number of entities in a application  is not much less then number of
pages.but i have no  performance problem in my apps using JPA.
I'm not comparing the number of pages to entities. I'm saying that if T5 isn't told what java packages contain page classes, then it would not be able to load them unless it somehow scanned the entire collection of loaded classes in the JVM. Keep in mind that there are hundreds or thousands of loaded classes in the JVM, and then assuming you could do something like System.getLoadedClasses() .... you get the idea.



On Dec 26, 2007 4:44 PM, Chris Lewis <[EMAIL PROTECTED]> wrote:

Aside from the reason I just mentioned, T5 has to know where to look to
find pages (meaning a java package). With your suggested annotation only
half the work is done. If I'm not mistaken there is no clean way to
aggregate all loaded classed in the JVM. If there was, then T5 would
have to scan *all* of them for your annotation. I'd bet a good deal of
money that that would cause a performance hit ;-). Having a known set of
locations to look in solves the performance issue and answers the
generally unimportant question of where pages should live.

Mohammad Shamsi wrote:
i just know that Tapestry use this location for looking up pages.
how about a simple Annotation for page classes instead of ?
just with using a simple Annotation (for exmaple @Page) for a Page Class
we code place classes every where that we like.


On Dec 26, 2007 3:16 PM, Chris Lewis <[EMAIL PROTECTED]> wrote:


Because it removes the necessity to think about something that
generally
doesn't deserve thought. If you want them elsewhere, make a
contribution
in your app module.

chris

Mohammad Shamsi wrote:

Hi,

i want to know that why i should place my pages and components in

special

folder ?

any idea ?


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







Reply via email to