You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Nathan Bubna <na...@esha.com> on 2003/02/18 03:36:37 UTC

[veltools] Proposal to fold tools/tools into tools/view

Ok, since the original proposal i made for this was rather buried in a
separate conversation, i want to give this proposal a thread of its own
before i take action on it.
---------------------------------------------
The gist of the proposal is this:

    Move the generic (i.e. non-struts) tools from the tools/tools package
into the tools/view package and drop the tools/tools package altogether.

    The new package designation for these tools would be:
org.apache.velocity.tools.view.tools.*

    One thing not mentioned as yet:  I'd also like to move the
MultiViewsTool
from org.apache.velocity.tools.view.i18n.* to
org.apache.velocity.tools.view.tools.i18n.*.  I think that would be a more
consistent organization.  Daniel, does that work for you?
---------------------------------------------
So far the responses are:
    - Committers in favor:  Nathan
    - Contributors in favor:  Tim Colson
    - Ambivalent or Opposed:  none
---------------------------------------------
For those wondering why this has been proposed here's a recap of the
discussion so far:

<nathan>
you know, as i think about it, i'm not really sure why we even have a
separate folder tree/jar/et. al. for the non-struts tools.  there's all of
three useful classes in there, and one of them is already dependent on the
view package.  i'm seriously thinking we ought to fold them into the view
tree/package.  i think it'd be nice to cut things down to just VelocityView
and VelocityStruts (or whatever you want to call them).

can anyone give a really good reason to maintain a separate library just for
these tools?  after all, they are "view tools."
</nathan>

<tim>
Aren't the tools supposed to be able to live without
VelocityViewServlet, so folks using other frameworks can leverage them
without the extra baggage?
</tim>

<nathan>
yes, that's the idea.  but as i said, one of the four tools in there
(ParameterParser) is already dependent on the view package (the home of the
VVS).  so, if they want to compile the tools library or use the
ParameterParser, they already need the view package.  so what's the harm in
combining the two?  if they don't want to use the servlet-tied stuff, then
they can just ignore it and use only the tools they want.
</nathan>

I'll probably give this a week or so, and if there's still no opposition,
i'll start making the switch.  I really think this is a good move to
simplify things.

Nathan Bubna
nathan@esha.com


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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by Gabriel Sidler <si...@teamup.com>.
+1

Gabe

Nathan Bubna wrote:

> Ok, since the original proposal i made for this was rather buried in a
> separate conversation, i want to give this proposal a thread of its own
> before i take action on it.
> ---------------------------------------------
> The gist of the proposal is this:
> 
>     Move the generic (i.e. non-struts) tools from the tools/tools package
> into the tools/view package and drop the tools/tools package altogether.
> 
>     The new package designation for these tools would be:
> org.apache.velocity.tools.view.tools.*
> 
>     One thing not mentioned as yet:  I'd also like to move the
> MultiViewsTool
> from org.apache.velocity.tools.view.i18n.* to
> org.apache.velocity.tools.view.tools.i18n.*.  I think that would be a more
> consistent organization.  Daniel, does that work for you?
> ---------------------------------------------
> So far the responses are:
>     - Committers in favor:  Nathan
>     - Contributors in favor:  Tim Colson
>     - Ambivalent or Opposed:  none
> ---------------------------------------------
> For those wondering why this has been proposed here's a recap of the
> discussion so far:
> 
> <nathan>
> you know, as i think about it, i'm not really sure why we even have a
> separate folder tree/jar/et. al. for the non-struts tools.  there's all of
> three useful classes in there, and one of them is already dependent on the
> view package.  i'm seriously thinking we ought to fold them into the view
> tree/package.  i think it'd be nice to cut things down to just VelocityView
> and VelocityStruts (or whatever you want to call them).
> 
> can anyone give a really good reason to maintain a separate library just for
> these tools?  after all, they are "view tools."
> </nathan>
> 
> <tim>
> Aren't the tools supposed to be able to live without
> VelocityViewServlet, so folks using other frameworks can leverage them
> without the extra baggage?
> </tim>
> 
> <nathan>
> yes, that's the idea.  but as i said, one of the four tools in there
> (ParameterParser) is already dependent on the view package (the home of the
> VVS).  so, if they want to compile the tools library or use the
> ParameterParser, they already need the view package.  so what's the harm in
> combining the two?  if they don't want to use the servlet-tied stuff, then
> they can just ignore it and use only the tools they want.
> </nathan>
> 
> I'll probably give this a week or so, and if there's still no opposition,
> i'll start making the switch.  I really think this is a good move to
> simplify things.
> 
> Nathan Bubna
> nathan@esha.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 
> 
> 
> 



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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by Nathan Bubna <na...@esha.com>.
Geir said,
> On Monday, February 17, 2003, at 09:36 PM, Nathan Bubna wrote:
...
> >     Move the generic (i.e. non-struts) tools from the tools/tools
> > package
> > into the tools/view package and drop the tools/tools package
> > altogether.
>
> Why?
> The point is to have a place for stuff that isn't just for use in
> servlets.  Doesn't that make sense?

yes, but does that place have to be devoid of servlet-tied stuff? in other
words, how does it hurt to have servlet stuff in the same package?

basically, at this point, the only non-servlet tools are MathTool, DateTool,
and the ToolLoader.  beyond that, i can only think of only two more
non-web/servlet-tied tools that might go there.  this project has been
around for over a year now, and i've seen very few proposed or contributed
"generic" tools.

if we only pull the ParameterParser into the view (the least we should do),
then we're maintaining an extra jar and tree for a very small handful of
tools.  so, i have to wonder if it isn't more work for more people to do it
this way, rather than folding the two trees.

(more below)

...
> > can anyone give a really good reason to maintain a separate library
> > just for
> > these tools?  after all, they are "view tools."
> > </nathan>
>
> I guess we'd have to figure out what a 'view tool' is.  I use velocity
> in all sorts of places that has nothing to do with a UI, and thus
> having a toolset decoupled from a web-oriented view kit is what the
> original purpose was for that part of the project.
>
> I think that you are right taking view-centric or web centric stuff
> into the view project, but keeping things clear and decoupled is the
> right thing, IMO.

theory is great and all, but in practice, "clear and decoupled" is not
always best.  simplicity and convenience are factors to be considered as
well.  a balance here would be good.  at this point, if we're looking at
maintaining three trees/jars for such a young/small project, i really feel
that theory has had more consideration than it warrants.

...
> > what's the harm in
> > combining the two?  if they don't want to use the servlet-tied stuff,
> > then they can just ignore it and use only the tools they want.
> > </nathan>
>
> How?  Don't you need to drag around servlet.jar?

huh?  if someone downloads a binary of a velocity-tools-view.jar that
includes a non-servlet tied MathTool, and they only use that class, why
would they need to have servlet.jar?

yes, they would need servlet.jar to compile the library right now, but i
assume we're headed toward having binary releases at some point.  further,
even if they really do want to compile the library themselves, we already
keep the servlet.jar in CVS.  they wouldn't have to drag anything.

also, let's talk numbers a bit.  how many out there are exclusively using
the few generic tools we have in a non-web environment?  i'm pretty darn
sure that the drastic majority of velocity-tools users are pulled in by the
view servlet and/or struts functions.  and i find it hard to believe that
the theoretical few who are here for generic tools will be very
inconvenienced by finding them amongst servlet-tied classes.

to really get to it, i might not even be disappointed to see us fold the
tools/struts tree in as well.  one velocity-tools.jar would be nice...  :-)

Nathan Bubna
nathan@esha.com


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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by Nathan Bubna <na...@esha.com>.
Bill said:
> Geir said:
> > The point is to have a place for stuff that isn't just for use in
> > servlets.  Doesn't that make sense?
>
> Yes.  Come to think of it, there have been requests to solve some
> problem for which the reply has been to write an evaluator tool that
> calls Velocity.evaluate.  This doesn't exist but if it did would go in
> tools/tools as would any tools for formatting dates, etc.

heh.  it kinda does exist.  i wrote a RenderTool to do both an evaluate()
and a recursiveEval() the other day.  i've been holding it back until this
debate was resolved.  (not much point in checking it in and moving it right
away.)

and actually, for it to be truly convenient to those using the VVS and co.,
it needs to implement ViewTool (so it can automatically be fed the current
context).  if this were put in tools/tools, then it would either not do that
(thus probably creating a demand for one that does) or else it would again
cause a dependency on tools/view.

now, some might take that as argument for moving all the generic toolbox
management stuff out of tools/view and into tools/tools, but i see it as one
more blurring of the line between the two and one more good reason to
combine them.

(btw, since ViewTool is not servlet-tied.  a RenderTool living in tools/view
would be just as usable for non-web stuff as MathTool and DateTool)

Nathan Bubna
nathan@esha.com


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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On Thursday, February 20, 2003, at 02:56 PM, Bill Burton wrote:

> Hello,
>
> Geir Magnusson Jr. wrote:
>> On Monday, February 17, 2003, at 09:36 PM, Nathan Bubna wrote:
>>> Ok, since the original proposal i made for this was rather buried in 
>>> a
>>> separate conversation, i want to give this proposal a thread of its 
>>> own
>>> before i take action on it.
>>> ---------------------------------------------
>>> The gist of the proposal is this:
>>>
>>>     Move the generic (i.e. non-struts) tools from the tools/tools 
>>> package
>>> into the tools/view package and drop the tools/tools package 
>>> altogether.
>> Why?
>> The point is to have a place for stuff that isn't just for use in 
>> servlets.  Doesn't that make sense?
>
> Yes.  Come to think of it, there have been requests to solve some 
> problem for which the reply has been to write an evaluator tool that 
> calls Velocity.evaluate.  This doesn't exist but if it did would go in 
> tools/tools as would any tools for formatting dates, etc.

Right :)

>
> -Bill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-956-2604(w)
Adeptra, Inc.                                       203-247-1713(m)
geirm@adeptra.com


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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by Bill Burton <bi...@progress.com>.
Hello,

Geir Magnusson Jr. wrote:
> 
> On Monday, February 17, 2003, at 09:36 PM, Nathan Bubna wrote:
> 
>> Ok, since the original proposal i made for this was rather buried in a
>> separate conversation, i want to give this proposal a thread of its own
>> before i take action on it.
>> ---------------------------------------------
>> The gist of the proposal is this:
>>
>>     Move the generic (i.e. non-struts) tools from the tools/tools package
>> into the tools/view package and drop the tools/tools package altogether.
> 
> 
> Why?
> 
> The point is to have a place for stuff that isn't just for use in 
> servlets.  Doesn't that make sense?

Yes.  Come to think of it, there have been requests to solve some 
problem for which the reply has been to write an evaluator tool that 
calls Velocity.evaluate.  This doesn't exist but if it did would go in 
tools/tools as would any tools for formatting dates, etc.

-Bill


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


RE: [veltools] Proposal to fold tools/tools into tools/view

Posted by Tim Colson <tc...@cisco.com>.
> > 1) Move Struts tools into tools/struts
> ??  they're already there.
Sorry, yeah - all good there.

> :-)  now argument has gone from theoretical to practical to 
> aesthetic...
heh heh. Aren't all discussions aesthetic at some level?

> but yes, doing at least this might ease my angst if i can't 
> win geir over on the combining proposal.
Heck - I gotta say I'm on the fence. The arguments back and forth keep
swaying me. 

It might be nice and clean if I wasn't building a webapp to have just the
generic tools package like Geir says. But then, Nathan's right in that there
are only 3 generic tools despite all the talk on the list. 

And the latest idea of combining the whole darn thing into one jar holds
appeal too. Afterall, velocity-struts depends on both velocity-tools-struts
and velocity-tools-view jar's to function anyway, eh?

BTW - the combined weight of all three packages would be a paltry 42Kb.

I'm hip to whatever solution gets us closer to a binary release so I can
start heavily pimpin' VelocityStruts to anyone who'll listen. :-)

Timo

 

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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by Nathan Bubna <na...@esha.com>.
Tim said:
...
> So howabout this for an amendment to the proposal:
>
> 1) Move Struts tools into tools/struts

??  they're already there.

> 2) Move "webview" tools into tools/view (ex. ParamParser)

yes, this at least we all seem to agree on.

> 3) Rename tools/tools to tools/generic to avoid the freakin' annoying
> "tools/tools/tools/tools/" naming, and stick DateTool, MathTool, EvalTool,
> etc. into there.
...

:-)  now argument has gone from theoretical to practical to aesthetic...

but yes, doing at least this might ease my angst if i can't win geir over on
the combining proposal.

Nathan Bubna
nathan@esha.com


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


RE: [veltools] Proposal to fold tools/tools into tools/view

Posted by Tim Colson <tc...@cisco.com>.

> The point is to have a place for stuff that isn't just for use in 
> servlets.  Doesn't that make sense?
I agree. I didn't word it so elegantly, and confused the issue by mentiong
"other frameworks". My brain thinks webapps by default. Sorry.

> > <tim>
> > Aren't the tools supposed to be able to live without 
> > VelocityViewServlet, so folks using other frameworks can 
> > leverage them without the extra baggage? </tim>

So howabout this for an amendment to the proposal:

1) Move Struts tools into tools/struts 
2) Move "webview" tools into tools/view (ex. ParamParser)
3) Rename tools/tools to tools/generic to avoid the freakin' annoying
"tools/tools/tools/tools/" naming, and stick DateTool, MathTool, EvalTool,
etc. into there. 
4) create tools/macros for generic macros and tools/view/macros +
tools/struts/macros for webapp and struts macros respectively.

timo

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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On Monday, February 17, 2003, at 09:36 PM, Nathan Bubna wrote:

> Ok, since the original proposal i made for this was rather buried in a
> separate conversation, i want to give this proposal a thread of its own
> before i take action on it.
> ---------------------------------------------
> The gist of the proposal is this:
>
>     Move the generic (i.e. non-struts) tools from the tools/tools 
> package
> into the tools/view package and drop the tools/tools package 
> altogether.

Why?

The point is to have a place for stuff that isn't just for use in 
servlets.  Doesn't that make sense?

Am I missing the plot here?

>
[SNIP]

> <nathan>
> you know, as i think about it, i'm not really sure why we even have a
> separate folder tree/jar/et. al. for the non-struts tools.  there's 
> all of
> three useful classes in there, and one of them is already dependent on 
> the
> view package.  i'm seriously thinking we ought to fold them into the 
> view
> tree/package.  i think it'd be nice to cut things down to just 
> VelocityView
> and VelocityStruts (or whatever you want to call them).
>
> can anyone give a really good reason to maintain a separate library 
> just for
> these tools?  after all, they are "view tools."
> </nathan>

I guess we'd have to figure out what a 'view tool' is.  I use velocity 
in all sorts of places that has nothing to do with a UI, and thus 
having a toolset decoupled from a web-oriented view kit is what the 
original purpose was for that part of the project.

I think that you are right taking view-centric or web centric stuff 
into the view project, but keeping things clear and decoupled is the 
right thin, IMO.

>
> <tim>
> Aren't the tools supposed to be able to live without
> VelocityViewServlet, so folks using other frameworks can leverage them
> without the extra baggage?
> </tim>
>
> <nathan>
> yes, that's the idea.  but as i said, one of the four tools in there
> (ParameterParser) is already dependent on the view package (the home 
> of the
> VVS).  so, if they want to compile the tools library or use the
> ParameterParser, they already need the view package.  so what's the 
> harm in
> combining the two?  if they don't want to use the servlet-tied stuff, 
> then
> they can just ignore it and use only the tools they want.
> </nathan>

How?  Don't you need to drag around servlet.jar?


>
> I'll probably give this a week or so, and if there's still no 
> opposition,
> i'll start making the switch.  I really think this is a good move to
> simplify things.
>


Consider this opposition.  It could be because I missed something, but 
I just don't undertand why the non-servlet-ish stuff should move.

geir


-- 
Geir Magnusson Jr                                   203-956-2604(w)
Adeptra, Inc.                                       203-247-1713(m)
geirm@adeptra.com


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


Re: [veltools] Proposal to fold tools/tools into tools/view

Posted by Anthony Kay <aw...@yahoo.com>.
Hey Nathan,

Glad you pulled this stuff out, I hadn't seen it.

+1

--- Nathan Bubna <na...@esha.com> wrote:
> Ok, since the original proposal i made for this was rather buried in
> a
> separate conversation, i want to give this proposal a thread of its
> own
> before i take action on it.
> ---------------------------------------------
> The gist of the proposal is this:
> 
>     Move the generic (i.e. non-struts) tools from the tools/tools
> package
> into the tools/view package and drop the tools/tools package
> altogether.
> 
>     The new package designation for these tools would be:
> org.apache.velocity.tools.view.tools.*
> 
>     One thing not mentioned as yet:  I'd also like to move the
> MultiViewsTool
> from org.apache.velocity.tools.view.i18n.* to
> org.apache.velocity.tools.view.tools.i18n.*.  I think that would be a
> more
> consistent organization.  Daniel, does that work for you?
> ---------------------------------------------
> So far the responses are:
>     - Committers in favor:  Nathan
>     - Contributors in favor:  Tim Colson
>     - Ambivalent or Opposed:  none
> ---------------------------------------------
> For those wondering why this has been proposed here's a recap of the
> discussion so far:
> 
> <nathan>
> you know, as i think about it, i'm not really sure why we even have a
> separate folder tree/jar/et. al. for the non-struts tools.  there's
> all of
> three useful classes in there, and one of them is already dependent
> on the
> view package.  i'm seriously thinking we ought to fold them into the
> view
> tree/package.  i think it'd be nice to cut things down to just
> VelocityView
> and VelocityStruts (or whatever you want to call them).
> 
> can anyone give a really good reason to maintain a separate library
> just for
> these tools?  after all, they are "view tools."
> </nathan>
> 
> <tim>
> Aren't the tools supposed to be able to live without
> VelocityViewServlet, so folks using other frameworks can leverage
> them
> without the extra baggage?
> </tim>
> 
> <nathan>
> yes, that's the idea.  but as i said, one of the four tools in there
> (ParameterParser) is already dependent on the view package (the home
> of the
> VVS).  so, if they want to compile the tools library or use the
> ParameterParser, they already need the view package.  so what's the
> harm in
> combining the two?  if they don't want to use the servlet-tied stuff,
> then
> they can just ignore it and use only the tools they want.
> </nathan>
> 
> I'll probably give this a week or so, and if there's still no
> opposition,
> i'll start making the switch.  I really think this is a good move to
> simplify things.
> 
> Nathan Bubna
> nathan@esha.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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