I'm with Scott on this one. I think that less auto-magic, not more,
makes the framework infinitely simpler for new users to understand. One of
my long-term usability complaints about tapestry 3.0.3 has been the
inconstient use of the "ognl" prefix in an effort to save keystrokes because
tapestry should just "know" that I mean the litteral "foo" instead of the
derived value getFoo().
I'd hate to see the same confusion make its way into Tapestry 4.0 as
well. To my way of thinking the additional keystrokes required to annotate
everything the same way is more than offset by the shorter learning curve of
a system that has one, and only one, consistent way of injecting things into
pages.
--- Pat
> -----Original Message-----
> From: Konstantin Ignatyev [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 11, 2005 9:05 PM
> To: Tapestry users
> Subject: Re: Less annotation is a GOOD THING
>
> I think that those 'little' efforts could and should
> be required precisely in the cases you have mentioned.
> Most of the time there is no ambiguity and therefore
> efforts should not be wasted.
>
> In addition to the convenience of the auto wiring such
> approach will help to avoid typos like
>
> @InjectObject("service:tapestry.globals.Webrequest")
> or
> @InjectObject("service:tapestry.global.WebRequest")
>
>
>
> --- Scott Russell <[EMAIL PROTECTED]> wrote:
>
> > I'm not sure giving the Tapestry engine the power to
> > guess what objects needs
> > injecting is a good idea. What if you specified one
> > of the properties you
> > specified below, but wanted to set it manually from
> > pageBeginRender? Or
> > inject a ServletContext or WebRequest from a
> > different service location?
> >
> > I think that the little effort it takes to clearly
> > define exactly what gets
> > injected, and avoid potential ambiguities, overrides
> > any need for automagical
> > dependecy injection.
> >
> > regards,
> > Scott
> >
> > >
> > > Lets look at the common stuff:
> > >
> > @InjectObject("service:tapestry.globals.WebRequest")
> > > public abstract WebRequest getWebRequest();
> > >
> > >
> >
> @InjectObject("service:tapestry.globals.ServletContext")
> > > public abstract ServletContext
> > getServletContext();
> > >
> > > Is there any ambiguity in what we want to inject?
> > I do
> > > not think so.
> > >
> > > I am pretty sure that having just abstract methods
> > in
> > > the page/component class should be enough for
> > Tapestry
> > > to inject necessary objects:
> > > public abstract WebRequest getWebRequest();
> > > public abstract ServletContext
> > getServletContext();
> > >
> > >
> > > Any comments Howard?
> > >
> > > --- Paolo DonĂ <[EMAIL PROTECTED]> wrote:
> > > > I'm writing an xdoclet2 plugin to avoid writing
> > > > .page and .jwc files.
> > > > Don't know if that can help... you write xdoclet
> > > > tags instead of jdk5
> > > > annotations.
> > > > go to
> > http://xdoclet.codehaus.org/Tapestry+plugin if
> > > > interested.
> > > >
> > > > Paolo
> > > >
> > > > However, this is a repetitive piece of code that
> > I
> > > > want to avoid.
> > > >
> > > > [cut]
> > > >
> > > > > However, I can not use JDK 1.5 yet and the
> > only
> > > >
> > > > way to do this, as I
> > > >
> > > > > understand, is to inject Page Class properties
> > in
> > > >
> > > > the page
> > > >
> > > > > specification.
> > > > >
> > > > > Since I am lazy ;-) and want to avoid this
> > > >
> > > > repetitive pieces of XML,
> > > >
> > > > [cut]
> > >
> > > Konstantin Ignatyev
> > >
> > >
> > >
> > >
> > > PS: If this is a typical day on planet earth,
> > humans will add fifteen
> > > million tons of carbon to the atmosphere, destroy
> > 115 square miles of
> > > tropical rainforest, create seventy-two miles of
> > desert, eliminate between
> > > forty to one hundred species, erode seventy-one
> > million tons of topsoil,
> > > add 2,700 tons of CFCs to the stratosphere, and
> > increase their population
> > > by 263,000
> > >
> > > Bowers, C.A. The Culture of Denial: Why the
> > Environmental Movement Needs
> > > a Strategy for Reforming Universities and Public
> > Schools. New York: State
> > > University of New York Press, 1997: (4) (5)
> > (p.206)
> >
>
>
> Konstantin Ignatyev
>
>
>
>
> PS: If this is a typical day on planet earth, humans will add fifteen
> million tons of carbon to the atmosphere, destroy 115 square miles of
> tropical rainforest, create seventy-two miles of desert, eliminate between
> forty to one hundred species, erode seventy-one million tons of topsoil,
> add 2,700 tons of CFCs to the stratosphere, and increase their population
> by 263,000
>
> Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs
> a Strategy for Reforming Universities and Public Schools. New York:
> State University of New York Press, 1997: (4) (5) (p.206)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]