You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Richard Lewis-Shell <rl...@mac.com> on 2003/12/23 10:16:37 UTC

To enhance or not?

OK, I've now done a little testing with not enhancing custom parameter
binding properties...

By changing ComponentClassFactory so it only enhances custom parameters IF
they are genuinely abstract (as opposed to missing which is how the current
code works), and reverting AbstractComponent.get/setBinding() so they no
longer assume there will always be binding properties, but instead checks
for such a property first, it works.  Classes do not require enhancing just
because they have a custom parameter, and ALL Tapestry's tests pass (and so
do all our app's tests to boot).

To my mind this is a big improvement, especially for large Tapestry
applications.  eg. our app has over 550 components, so by making this
change, there are around 550 classes that do not require enhancing, thus
around 550 less classes requiring loading/tracking, and 550 classes that are
easier to debug.

The drawback?  Apart from adding a little extra complexity to the framework
as Harish raises, technically it's a teeny weeny API change (because some
classes no longer have set/getXYZBinding methods) and I think at this late
beta stage we're not supposed to be making those.  However, it is only the
property for the binding itself, not the actual parameter value, so I think
it unlikely to have a significant effect.  And did I mention teeny/weeny?
:-)

As always, let me know your thoughts...

R




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


Re: To enhance or not?

Posted by Richard Lewis-Shell <rl...@mac.com>.
Custom parameters already get ignored by the property enhancer - it is only
their respective bindings that are currently enhanced.  Tapestry has always
made use of binding properties if they are available, so I would suggest
sticking with this moving forward, even for custom bindings (and changing
that would break a LOT of code I'm sure).  The prototype implementation I
have so far will enhance abstract binding property methods only, but I am
not fussed on this.  Though Tapestry itself actually has some abstract
binding property methods already (eg. Form.get/setStatefulBinding()), so
it's quite conceivable other apps will have these also, so I figure the
safest approach for now is to enhance a binding property if abstract,
otherwise leave alone.

R

----- Original Message ----- 
From: "Harish Krishnaswamy" <hk...@comcast.net>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, December 24, 2003 7:45 AM
Subject: Re: To enhance or not?


> I am aboard with your proposal for 3.0. But are we going to continue to
enhance custom parameters if
> not manually implemented or should we just leave custom parameters alone,
always, going forward?
>
> -Harish
>
> Richard Lewis-Shell wrote:
>
> > OK, I've now done a little testing with not enhancing custom parameter
> > binding properties...
> >
> > By changing ComponentClassFactory so it only enhances custom parameters
IF
> > they are genuinely abstract (as opposed to missing which is how the
current
> > code works), and reverting AbstractComponent.get/setBinding() so they no
> > longer assume there will always be binding properties, but instead
checks
> > for such a property first, it works.  Classes do not require enhancing
just
> > because they have a custom parameter, and ALL Tapestry's tests pass (and
so
> > do all our app's tests to boot).
> >
> > To my mind this is a big improvement, especially for large Tapestry
> > applications.  eg. our app has over 550 components, so by making this
> > change, there are around 550 classes that do not require enhancing, thus
> > around 550 less classes requiring loading/tracking, and 550 classes that
are
> > easier to debug.
> >
> > The drawback?  Apart from adding a little extra complexity to the
framework
> > as Harish raises, technically it's a teeny weeny API change (because
some
> > classes no longer have set/getXYZBinding methods) and I think at this
late
> > beta stage we're not supposed to be making those.  However, it is only
the
> > property for the binding itself, not the actual parameter value, so I
think
> > it unlikely to have a significant effect.  And did I mention
teeny/weeny?
> > :-)
> >
> > As always, let me know your thoughts...
> >
> > R
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>



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


Re: To enhance or not?

Posted by Harish Krishnaswamy <hk...@comcast.net>.
I am aboard with your proposal for 3.0. But are we going to continue to enhance custom parameters if 
not manually implemented or should we just leave custom parameters alone, always, going forward?

-Harish

Richard Lewis-Shell wrote:

> OK, I've now done a little testing with not enhancing custom parameter
> binding properties...
> 
> By changing ComponentClassFactory so it only enhances custom parameters IF
> they are genuinely abstract (as opposed to missing which is how the current
> code works), and reverting AbstractComponent.get/setBinding() so they no
> longer assume there will always be binding properties, but instead checks
> for such a property first, it works.  Classes do not require enhancing just
> because they have a custom parameter, and ALL Tapestry's tests pass (and so
> do all our app's tests to boot).
> 
> To my mind this is a big improvement, especially for large Tapestry
> applications.  eg. our app has over 550 components, so by making this
> change, there are around 550 classes that do not require enhancing, thus
> around 550 less classes requiring loading/tracking, and 550 classes that are
> easier to debug.
> 
> The drawback?  Apart from adding a little extra complexity to the framework
> as Harish raises, technically it's a teeny weeny API change (because some
> classes no longer have set/getXYZBinding methods) and I think at this late
> beta stage we're not supposed to be making those.  However, it is only the
> property for the binding itself, not the actual parameter value, so I think
> it unlikely to have a significant effect.  And did I mention teeny/weeny?
> :-)
> 
> As always, let me know your thoughts...
> 
> R
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


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


Re: To enhance or not?

Posted by Richard Lewis-Shell <rl...@mac.com>.
Here are the clover reports for the two modified classes.  Look for
scanForBindingProperty() in ComponentClassFactory and get/setBinding() in
AbstractComponent.  The changes get 100% coverage through Tapestry's
existing tests.

http://idisk.mac.com/nog/Public/Tapestry/ComponentClassFactory.html
http://idisk.mac.com/nog/Public/Tapestry/AbstractComponent.html

Note - this code is just a hack to test if it works - I'll be putting some
effort into tidying it up before it hits CVS!

R

----- Original Message ----- 
From: "Howard M. Lewis Ship" <hl...@comcast.net>
To: "'Tapestry development'" <ta...@jakarta.apache.org>
Sent: Wednesday, December 24, 2003 5:57 AM
Subject: RE: To enhance or not?


Here's where I wish we had a bit of corporate backing behind Tapestry.

The correct approach here would be to compare the performance of the two
approaches --- memory usage
and throughput.

Given that tests pass I'm ok either way. I would prefer to verify, using
Clover or other code
coverage tool, that we get high (preferably 100%) coverage of the changed
code. That would, to me,
mitigate the risk.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Richard Lewis-Shell [mailto:rlewisshell@mac.com]
> Sent: Tuesday, December 23, 2003 4:17 AM
> To: tapestry-dev@jakarta.apache.org
> Subject: To enhance or not?
>
>
> OK, I've now done a little testing with not enhancing custom parameter
> binding properties...
>
> By changing ComponentClassFactory so it only enhances custom
> parameters IF
> they are genuinely abstract (as opposed to missing which is
> how the current
> code works), and reverting AbstractComponent.get/setBinding()
> so they no
> longer assume there will always be binding properties, but
> instead checks
> for such a property first, it works.  Classes do not require
> enhancing just
> because they have a custom parameter, and ALL Tapestry's
> tests pass (and so
> do all our app's tests to boot).
>
> To my mind this is a big improvement, especially for large Tapestry
> applications.  eg. our app has over 550 components, so by making this
> change, there are around 550 classes that do not require
> enhancing, thus
> around 550 less classes requiring loading/tracking, and 550
> classes that are
> easier to debug.
>
> The drawback?  Apart from adding a little extra complexity to
> the framework
> as Harish raises, technically it's a teeny weeny API change
> (because some
> classes no longer have set/getXYZBinding methods) and I think
> at this late
> beta stage we're not supposed to be making those.  However,
> it is only the
> property for the binding itself, not the actual parameter
> value, so I think
> it unlikely to have a significant effect.  And did I mention
> teeny/weeny?
> :-)
>
> As always, let me know your thoughts...
>
> R
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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




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


Re: To enhance or not?

Posted by Richard Lewis-Shell <rl...@mac.com>.
Assuming you have implemented the properties yourself, Tapestry is most
likely enhancing the binding properties.  The current version of Tapestry
(b3 + CVS) assumes that there is a binding property for EVERY FORMAL
parameter, and if there isn't, it will enhance them for you.  If you don't
want this you'll have to implement the binding properties yourself...

R

----- Original Message ----- 
From: "Adam Greene" <ag...@romulin.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, December 24, 2003 6:28 AM
Subject: RE: To enhance or not?


> Is there a switch that says "don't enhance."  I am trying to debug an
> component, but the debugger keeps telling me (there is no line numbers,
> cannot debug) and I'm not even using property-specifications, just three
> parameters (two in, one custom) and it's not working working and I cannot
> debug it...
>
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@comcast.net]
> Sent: Tuesday, December 23, 2003 12:58 PM
> To: 'Tapestry development'
> Subject: RE: To enhance or not?
>
>
> Here's where I wish we had a bit of corporate backing behind Tapestry.
>
> The correct approach here would be to compare the performance of the two
> approaches --- memory usage
> and throughput.
>
> Given that tests pass I'm ok either way. I would prefer to verify, using
> Clover or other code
> coverage tool, that we get high (preferably 100%) coverage of the changed
> code. That would, to me,
> mitigate the risk.
>
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
> http://jakarta.apache.org/commons/sandbox/hivemind/
> http://javatapestry.blogspot.com
>
> > -----Original Message-----
> > From: Richard Lewis-Shell [mailto:rlewisshell@mac.com]
> > Sent: Tuesday, December 23, 2003 4:17 AM
> > To: tapestry-dev@jakarta.apache.org
> > Subject: To enhance or not?
> >
> >
> > OK, I've now done a little testing with not enhancing custom parameter
> > binding properties...
> >
> > By changing ComponentClassFactory so it only enhances custom
> > parameters IF
> > they are genuinely abstract (as opposed to missing which is
> > how the current
> > code works), and reverting AbstractComponent.get/setBinding()
> > so they no
> > longer assume there will always be binding properties, but
> > instead checks
> > for such a property first, it works.  Classes do not require
> > enhancing just
> > because they have a custom parameter, and ALL Tapestry's
> > tests pass (and so
> > do all our app's tests to boot).
> >
> > To my mind this is a big improvement, especially for large Tapestry
> > applications.  eg. our app has over 550 components, so by making this
> > change, there are around 550 classes that do not require
> > enhancing, thus
> > around 550 less classes requiring loading/tracking, and 550
> > classes that are
> > easier to debug.
> >
> > The drawback?  Apart from adding a little extra complexity to
> > the framework
> > as Harish raises, technically it's a teeny weeny API change
> > (because some
> > classes no longer have set/getXYZBinding methods) and I think
> > at this late
> > beta stage we're not supposed to be making those.  However,
> > it is only the
> > property for the binding itself, not the actual parameter
> > value, so I think
> > it unlikely to have a significant effect.  And did I mention
> > teeny/weeny?
> > :-)
> >
> > As always, let me know your thoughts...
> >
> > R
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>



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


RE: To enhance or not?

Posted by Adam Greene <ag...@romulin.com>.
Is there a switch that says "don't enhance."  I am trying to debug an
component, but the debugger keeps telling me (there is no line numbers,
cannot debug) and I'm not even using property-specifications, just three
parameters (two in, one custom) and it's not working working and I cannot
debug it...

-----Original Message-----
From: Howard M. Lewis Ship [mailto:hlship@comcast.net]
Sent: Tuesday, December 23, 2003 12:58 PM
To: 'Tapestry development'
Subject: RE: To enhance or not?


Here's where I wish we had a bit of corporate backing behind Tapestry.

The correct approach here would be to compare the performance of the two
approaches --- memory usage
and throughput.

Given that tests pass I'm ok either way. I would prefer to verify, using
Clover or other code
coverage tool, that we get high (preferably 100%) coverage of the changed
code. That would, to me,
mitigate the risk.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Richard Lewis-Shell [mailto:rlewisshell@mac.com]
> Sent: Tuesday, December 23, 2003 4:17 AM
> To: tapestry-dev@jakarta.apache.org
> Subject: To enhance or not?
>
>
> OK, I've now done a little testing with not enhancing custom parameter
> binding properties...
>
> By changing ComponentClassFactory so it only enhances custom
> parameters IF
> they are genuinely abstract (as opposed to missing which is
> how the current
> code works), and reverting AbstractComponent.get/setBinding()
> so they no
> longer assume there will always be binding properties, but
> instead checks
> for such a property first, it works.  Classes do not require
> enhancing just
> because they have a custom parameter, and ALL Tapestry's
> tests pass (and so
> do all our app's tests to boot).
>
> To my mind this is a big improvement, especially for large Tapestry
> applications.  eg. our app has over 550 components, so by making this
> change, there are around 550 classes that do not require
> enhancing, thus
> around 550 less classes requiring loading/tracking, and 550
> classes that are
> easier to debug.
>
> The drawback?  Apart from adding a little extra complexity to
> the framework
> as Harish raises, technically it's a teeny weeny API change
> (because some
> classes no longer have set/getXYZBinding methods) and I think
> at this late
> beta stage we're not supposed to be making those.  However,
> it is only the
> property for the binding itself, not the actual parameter
> value, so I think
> it unlikely to have a significant effect.  And did I mention
> teeny/weeny?
> :-)
>
> As always, let me know your thoughts...
>
> R
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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



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


RE: To enhance or not?

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Here's where I wish we had a bit of corporate backing behind Tapestry.

The correct approach here would be to compare the performance of the two approaches --- memory usage
and throughput.

Given that tests pass I'm ok either way. I would prefer to verify, using Clover or other code
coverage tool, that we get high (preferably 100%) coverage of the changed code. That would, to me,
mitigate the risk.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Richard Lewis-Shell [mailto:rlewisshell@mac.com] 
> Sent: Tuesday, December 23, 2003 4:17 AM
> To: tapestry-dev@jakarta.apache.org
> Subject: To enhance or not?
> 
> 
> OK, I've now done a little testing with not enhancing custom parameter
> binding properties...
> 
> By changing ComponentClassFactory so it only enhances custom 
> parameters IF
> they are genuinely abstract (as opposed to missing which is 
> how the current
> code works), and reverting AbstractComponent.get/setBinding() 
> so they no
> longer assume there will always be binding properties, but 
> instead checks
> for such a property first, it works.  Classes do not require 
> enhancing just
> because they have a custom parameter, and ALL Tapestry's 
> tests pass (and so
> do all our app's tests to boot).
> 
> To my mind this is a big improvement, especially for large Tapestry
> applications.  eg. our app has over 550 components, so by making this
> change, there are around 550 classes that do not require 
> enhancing, thus
> around 550 less classes requiring loading/tracking, and 550 
> classes that are
> easier to debug.
> 
> The drawback?  Apart from adding a little extra complexity to 
> the framework
> as Harish raises, technically it's a teeny weeny API change 
> (because some
> classes no longer have set/getXYZBinding methods) and I think 
> at this late
> beta stage we're not supposed to be making those.  However, 
> it is only the
> property for the binding itself, not the actual parameter 
> value, so I think
> it unlikely to have a significant effect.  And did I mention 
> teeny/weeny?
> :-)
> 
> As always, let me know your thoughts...
> 
> R
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


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