You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Geoff Longman <gl...@gmail.com> on 2005/03/29 17:18:22 UTC

Spindle & Tap 3.1 - pointed questions

So my last message was a bit too general, eh?

Here are specific questions, more will follow for sure..

Initially these are derived from the changes.html file in the 3.1 docs

1. add Hivemind binding prefix?

What is this?

2. add lookup to determine page class from page name.

Am I correct to assume that this feature comes into play only for
specless pages?

Geoff

PS. the docs didn't build correctly using "ant site". Looks like all
the content was built but the links like "Quick Start", "Users Guide"
etc on the tab bar across the top take me to garbage pages.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Spindle & Tap 3.1 - pointed questions

Posted by Richard Lewis-Shell <rl...@mac.com>.
Geoff Longman wrote:
 > BTW, I'm curious as to how everyone else works day to day with these
 > lookup rules. Does it ever cause confusion?

We don't work with these lookup rules - we just put specifications and 
templates on the classpath, reasoning that they are very closely related 
to the page/component class, so it is most useful when developing to 
have all the files together.  It does mean we have to list each 
page/component in the .application but we're coping with that (it's a 
brief one-off pain vs the ongoing pain of trying to find the 
template/specification/class when they are not right beside each other). 
  We are not using a web designer so we don't need to worry about giving 
or explaining access to a non-developer 3rd party, and we are creating 
web-applications, rather than dynamic web sites so we don't think about 
our application as a set of HTML files.

> I have an opinion which is biased of course and not aligned with
> trench dwelling Tap users anyhow.
>
 > Geoff

Do tell!

Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Spindle & Tap 3.1 - pointed questions

Posted by Geoff Longman <gl...@gmail.com>.
BTW, I'm curious as to how everyone else works day to day with these
lookup rules. Does it ever cause confusion?

I have an opinion which is biased of course and not aligned with
trench dwelling Tap users anyhow.

Geoff

> For a page called "admin/Menu" the lookup would proceed (for app namespace):
> 
> 1. as defined in .application - how does that work with a <page> tag
> that allows extra path info in the name attr but still (according to
> Tap 3.1 DTD) requires a specification-path?
> i.e. <page name="admin/Menu" specification-path="app/extra/Menu.page"/>
> 
> Ah, I think I understand. In this case Tapestry uses the path to
> locate the spec and if it's template is no co-located it uses the path
> info in the name to check if the template exists relative to the
> context root. no?
> 
> 2. context/WEB-INF/path to .application/admin/Menu.page
> 3. context/WEB-INF/servlet-name/admin/Menu.page
> 4. context/WEB-INF/admin/Menu.page
> 5. context/admin/Menu.html
> (omitting the spec resolver delegate option).
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Spindle & Tap 3.1 - pointed questions

Posted by Geoff Longman <gl...@gmail.com>.
Oops, my last was intended for the list.

I'm trying to get my head around:
http://wiki.apache.org/jakarta-tapestry/Tapestry31

"Update: This has started, and page names can now have one or more
folder names, i.e., admin/threads/ThreadAdmin. This would locate a
page specification as /WEB-INF/admin/threads/ThreadAdmin.page and an
HTML template in the same folder, or as
/admin/threads/ThreadAdmin.html. The Shell component now renders a
<base> tag."

If the page name will now carry around the extra path information I
see how this would work. But, the PageSpecificationResolver's lookup
algorithm remains (as yet?) unchanged from 3.0 and according to that
code the statement "This would locate a page specification as
/WEB-INF/admin/threads/ThreadAdmin.page " is incomplete.

For a page called "admin/Menu" the lookup would proceed (for app namespace):

1. as defined in .application - how does that work with a <page> tag
that allows extra path info in the name attr but still (according to
Tap 3.1 DTD) requires a specification-path?
i.e. <page name="admin/Menu" specification-path="app/extra/Menu.page"/>

Ah, I think I understand. In this case Tapestry uses the path to
locate the spec and if it's template is no co-located it uses the path
info in the name to check if the template exists relative to the
context root. no?


2. context/WEB-INF/path to .application/admin/Menu.page
3. context/WEB-INF/servlet-name/admin/Menu.page
4. context/WEB-INF/admin/Menu.page
5. context/admin/Menu.html
(omitting the spec resolver delegate option).

--------
All this extra-path-info-in-the-name guff does *not* apply to components, right?

And, what happens when a user does this? 

page="myLib:stuff/Menu"?
-------

It's all becoming clear as mud.

Geoff

On Wed, 30 Mar 2005 10:21:59 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> The page name can now inlcude the slash character, i.e., "admin/Menu";
> the folder name ("admin/") carries through during all the searches for
> specifications.
> 
> Need to update the specificaiton parser to allow slashes inside the
> <page> element.
> 
> 
> On Wed, 30 Mar 2005 10:12:06 -0500, Geoff Longman <gl...@gmail.com> wrote:
> > A new question:
> >
> > On the wiki there is the statement that pages can be referred to via
> > path relative to the context root. Where in the code is this kind of
> > lookup handled? I looked at the javadoc for
> > PageSpecificationResolverImpl and the lookup algorithm appears to be
> > unchanged from Tap 3.0
> >
> > Also, will this path quilified lookup also apply for .jwc files?
> >
> > Geoff
> >
> >
> > On Tue, 29 Mar 2005 18:38:49 -0600, Geoff Longman <gl...@gmail.com> wrote:
> > > That particular case is not a problem for me. I don't really care who
> > > contributed what prefix as long as I can validate a user string
> > > against the list.
> > >
> > > Plus, having read the Tapestry 3.1 docs and tap hivemodule stuff I can
> > > deduce that for "engine-service:X", X comes from another list and I
> > > can find that list.
> > >
> > > Geoff
> > >
> > >
> > > On Tue, 29 Mar 2005 15:41:23 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> > > > So much of HiveMind is defined in itself, this is likely to be a
> > > > problem for tools.  For example, the list of valid prefixes is a
> > > > configuration point (hivemind.ObjectProviders) and Tapestry adds a
> > > > couple to the default list (infrastructure:, engine-service:).  It's
> > > > wheels within wheels and was not designed for tooling, alas.
> > > >
> > > >
> > > > On Tue, 29 Mar 2005 14:27:38 -0500, Geoff Longman <glongman@gmail.com > wrote:
> > > > > That would be cool!
> > > > >
> > > > >  I'd like to be able to confirm that a given service id exists:
> > > > >
> > > > > <inject property="service-ref" object="service:myModuleId.MyService"/>
> > > > >
> > > > > To be complete I would need to confirm the validity user strings
> > > > > against prefixes contributed to hivemind.ObjectProviders
> > > > >
> > > > > and I guess to be really complete if the prefix is "engine-service"
> > > > > would need to lookup the valid service names registered with
> > > > > apestry.services.ApplicationServices (is that right?)
> > > > >
> > > > > Same kinda stuff would be needed for the <inject-state> ,<set> and
> > > > > <binding> tags no?
> > > > >
> > > > > Geoff
> > > > >
> > > > >
> > > > > On Tue, 29 Mar 2005 13:30:24 -0500, Howard Lewis Ship <hlship@gmail.com > wrote:
> > > > > > Perhaps we could change HiveMind's RegistryBuilder class to have an
> > > > > > additional method that returns some intermediate object that can be
> > > > > > queried for this kind of information.
> > > > > >
> > > > > >
> > > > > > On Tue, 29 Mar 2005 13:15:10 -0500, Geoff Longman <glongman@gmail.com > wrote:
> > > > > > > > Guess I missed the prior message.  Kinda busy!
> > > > > > >
> > > > > > > Thanks for answering. Anything you (or anyone) can add will help speed
> > > > > > > things along!
> > > > > > >
> > > > > > > > >
> > > > > > > > > 1. add Hivemind binding prefix?
> > > > > > > > >
> > > > > > > > > What is this?
> > > > > > > >
> > > > > > > > There's a whole suite of new prefixes for binding, in addition to
> > > > > > > > "ognl:" and "message:".  And its extensible!
> > > > > > > >
> > > > > > > > hivemind: refers to an object defined within HiveMind, for example:
> > > > > > > >
> > > > > > > > hivemind:service:tapestry.Infrastructure
> > > > > > > >
> > > > > > > > This saves you the trouble of injecting a HiveMind object into a
> > > > > > > > property and then accessing that property via OGNL.
> > > > > > >
> > > > > > > ok, that's what I thought.  Whew it takes a lot of drilling around the
> > > > > > > code to figure out how this all works!
> > > > > > >
> > > > > > > I think that bringing Spindle up to date will be a bigger job than
> > > > > > > usual ;-). Any chance that it is possible now to build a meta hivemind
> > > > > > > registry? ie. one that doesn't try and instantiate services etc? i.e
> > > > > > > lightweight.
> > > > > > >
> > > > > > > Things that this would be useful for:
> > > > > > >
> > > > > > > ask HM does this service id exist?
> > > > > > > ask HM, for service X, what is expected iface
> > > > > > > ask HM, what are contributions to point X?
> > > > > > >
> > > > > > > The ideal solution would be to model HM as completely as Spindle does
> > > > > > > now. Would like to do that at some point (opens doors to design time
> > > > > > > validation and editors for HM!) but I think it would delay my current
> > > > > > > task too much.
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > 2. add lookup to determine page class from page name.
> > > > > > > > >
> > > > > > > > > Am I correct to assume that this feature comes into play only for
> > > > > > > > > specless pages?
> > > > > > > >
> > > > > > > > And for pages that omit the class attribute.
> > > > > > >
> > > > > > > ahh I didn't notice that the class attribute was now optional.
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > Howard M. Lewis Ship
> > > > > > Independent J2EE / Open-Source Java Consultant
> > > > > > Creator, Jakarta Tapestry
> > > > > > Creator, Jakarta HiveMind
> > > > > >
> > > > > > Professional Tapestry training, mentoring, support
> > > > > > and project work.  http://howardlewisship.com
> > > > > >
> > > > >
> > > >
> > > > --
> > > > Howard M. Lewis Ship
> > > > Independent J2EE / Open-Source Java Consultant
> > > > Creator, Jakarta Tapestry
> > > > Creator, Jakarta HiveMind
> > > >
> > > > Professional Tapestry training, mentoring, support
> > > > and project work.  http://howardlewisship.com
> > > >
> > >
> >
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Spindle & Tap 3.1 - pointed questions

Posted by Howard Lewis Ship <hl...@gmail.com>.
So much of HiveMind is defined in itself, this is likely to be a
problem for tools.  For example, the list of valid prefixes is a
configuration point (hivemind.ObjectProviders) and Tapestry adds a
couple to the default list (infrastructure:, engine-service:).  It's
wheels within wheels and was not designed for tooling, alas.


On Tue, 29 Mar 2005 14:27:38 -0500, Geoff Longman <gl...@gmail.com> wrote:
> That would be cool!
> 
>  I'd like to be able to confirm that a given service id exists:
> 
> <inject property="service-ref" object="service:myModuleId.MyService"/>
> 
> To be complete I would need to confirm the validity user strings
> against prefixes contributed to hivemind.ObjectProviders
> 
> and I guess to be really complete if the prefix is "engine-service"
> would need to lookup the valid service names registered with
> apestry.services.ApplicationServices (is that right?)
> 
> Same kinda stuff would be needed for the <inject-state> ,<set> and
> <binding> tags no?
> 
> Geoff
> 
> 
> On Tue, 29 Mar 2005 13:30:24 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> > Perhaps we could change HiveMind's RegistryBuilder class to have an
> > additional method that returns some intermediate object that can be
> > queried for this kind of information.
> >
> >
> > On Tue, 29 Mar 2005 13:15:10 -0500, Geoff Longman <gl...@gmail.com> wrote:
> > > > Guess I missed the prior message.  Kinda busy!
> > >
> > > Thanks for answering. Anything you (or anyone) can add will help speed
> > > things along!
> > >
> > > > >
> > > > > 1. add Hivemind binding prefix?
> > > > >
> > > > > What is this?
> > > >
> > > > There's a whole suite of new prefixes for binding, in addition to
> > > > "ognl:" and "message:".  And its extensible!
> > > >
> > > > hivemind: refers to an object defined within HiveMind, for example:
> > > >
> > > > hivemind:service:tapestry.Infrastructure
> > > >
> > > > This saves you the trouble of injecting a HiveMind object into a
> > > > property and then accessing that property via OGNL.
> > >
> > > ok, that's what I thought.  Whew it takes a lot of drilling around the
> > > code to figure out how this all works!
> > >
> > > I think that bringing Spindle up to date will be a bigger job than
> > > usual ;-). Any chance that it is possible now to build a meta hivemind
> > > registry? ie. one that doesn't try and instantiate services etc? i.e
> > > lightweight.
> > >
> > > Things that this would be useful for:
> > >
> > > ask HM does this service id exist?
> > > ask HM, for service X, what is expected iface
> > > ask HM, what are contributions to point X?
> > >
> > > The ideal solution would be to model HM as completely as Spindle does
> > > now. Would like to do that at some point (opens doors to design time
> > > validation and editors for HM!) but I think it would delay my current
> > > task too much.
> > >
> > > >
> > > >
> > > > >
> > > > > 2. add lookup to determine page class from page name.
> > > > >
> > > > > Am I correct to assume that this feature comes into play only for
> > > > > specless pages?
> > > >
> > > > And for pages that omit the class attribute.
> > >
> > > ahh I didn't notice that the class attribute was now optional.
> > >
> >
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Spindle & Tap 3.1 - pointed questions

Posted by Geoff Longman <gl...@gmail.com>.
That would be cool!

 I'd like to be able to confirm that a given service id exists:

<inject property="service-ref" object="service:myModuleId.MyService"/>

To be complete I would need to confirm the validity user strings
against prefixes contributed to hivemind.ObjectProviders

and I guess to be really complete if the prefix is "engine-service"
would need to lookup the valid service names registered with
apestry.services.ApplicationServices (is that right?)

Same kinda stuff would be needed for the <inject-state> ,<set> and
<binding> tags no?

Geoff





On Tue, 29 Mar 2005 13:30:24 -0500, Howard Lewis Ship <hl...@gmail.com> wrote:
> Perhaps we could change HiveMind's RegistryBuilder class to have an
> additional method that returns some intermediate object that can be
> queried for this kind of information.
> 
> 
> On Tue, 29 Mar 2005 13:15:10 -0500, Geoff Longman <gl...@gmail.com> wrote:
> > > Guess I missed the prior message.  Kinda busy!
> >
> > Thanks for answering. Anything you (or anyone) can add will help speed
> > things along!
> >
> > > >
> > > > 1. add Hivemind binding prefix?
> > > >
> > > > What is this?
> > >
> > > There's a whole suite of new prefixes for binding, in addition to
> > > "ognl:" and "message:".  And its extensible!
> > >
> > > hivemind: refers to an object defined within HiveMind, for example:
> > >
> > > hivemind:service:tapestry.Infrastructure
> > >
> > > This saves you the trouble of injecting a HiveMind object into a
> > > property and then accessing that property via OGNL.
> >
> > ok, that's what I thought.  Whew it takes a lot of drilling around the
> > code to figure out how this all works!
> >
> > I think that bringing Spindle up to date will be a bigger job than
> > usual ;-). Any chance that it is possible now to build a meta hivemind
> > registry? ie. one that doesn't try and instantiate services etc? i.e
> > lightweight.
> >
> > Things that this would be useful for:
> >
> > ask HM does this service id exist?
> > ask HM, for service X, what is expected iface
> > ask HM, what are contributions to point X?
> >
> > The ideal solution would be to model HM as completely as Spindle does
> > now. Would like to do that at some point (opens doors to design time
> > validation and editors for HM!) but I think it would delay my current
> > task too much.
> >
> > >
> > >
> > > >
> > > > 2. add lookup to determine page class from page name.
> > > >
> > > > Am I correct to assume that this feature comes into play only for
> > > > specless pages?
> > >
> > > And for pages that omit the class attribute.
> >
> > ahh I didn't notice that the class attribute was now optional.
> >
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Spindle & Tap 3.1 - pointed questions

Posted by Howard Lewis Ship <hl...@gmail.com>.
Perhaps we could change HiveMind's RegistryBuilder class to have an
additional method that returns some intermediate object that can be
queried for this kind of information.


On Tue, 29 Mar 2005 13:15:10 -0500, Geoff Longman <gl...@gmail.com> wrote:
> > Guess I missed the prior message.  Kinda busy!
> 
> Thanks for answering. Anything you (or anyone) can add will help speed
> things along!
> 
> > >
> > > 1. add Hivemind binding prefix?
> > >
> > > What is this?
> >
> > There's a whole suite of new prefixes for binding, in addition to
> > "ognl:" and "message:".  And its extensible!
> >
> > hivemind: refers to an object defined within HiveMind, for example:
> >
> > hivemind:service:tapestry.Infrastructure
> >
> > This saves you the trouble of injecting a HiveMind object into a
> > property and then accessing that property via OGNL.
> 
> ok, that's what I thought.  Whew it takes a lot of drilling around the
> code to figure out how this all works!
> 
> I think that bringing Spindle up to date will be a bigger job than
> usual ;-). Any chance that it is possible now to build a meta hivemind
> registry? ie. one that doesn't try and instantiate services etc? i.e
> lightweight.
> 
> Things that this would be useful for:
> 
> ask HM does this service id exist?
> ask HM, for service X, what is expected iface
> ask HM, what are contributions to point X?
> 
> The ideal solution would be to model HM as completely as Spindle does
> now. Would like to do that at some point (opens doors to design time
> validation and editors for HM!) but I think it would delay my current
> task too much.
> 
> >
> >
> > >
> > > 2. add lookup to determine page class from page name.
> > >
> > > Am I correct to assume that this feature comes into play only for
> > > specless pages?
> >
> > And for pages that omit the class attribute.
> 
> ahh I didn't notice that the class attribute was now optional.
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Spindle & Tap 3.1 - pointed questions

Posted by Howard Lewis Ship <hl...@gmail.com>.
Guess I missed the prior message.  Kinda busy!


On Tue, 29 Mar 2005 10:18:22 -0500, Geoff Longman <gl...@gmail.com> wrote:
> So my last message was a bit too general, eh?
> 
> Here are specific questions, more will follow for sure..
> 
> Initially these are derived from the changes.html file in the 3.1 docs
> 
> 1. add Hivemind binding prefix?
> 
> What is this?

There's a whole suite of new prefixes for binding, in addition to
"ognl:" and "message:".  And its extensible!

hivemind: refers to an object defined within HiveMind, for example:

hivemind:service:tapestry.Infrastructure

This saves you the trouble of injecting a HiveMind object into a
property and then accessing that property via OGNL.



> 
> 2. add lookup to determine page class from page name.
> 
> Am I correct to assume that this feature comes into play only for
> specless pages?


And for pages that omit the class attribute.



> 
> Geoff
> 
> PS. the docs didn't build correctly using "ant site". Looks like all
> the content was built but the links like "Quick Start", "Users Guide"
> etc on the tab bar across the top take me to garbage pages.

Very sensitive to Forrest version; you need the latest SVN checkout I think.

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org