Re: New module: CGI::Tooltip

2004-06-22 Thread Becky Alcorn
Thank you all with your advice.  We have decided to use the name
HTML::Tooltip::Javascript.  Most people agreed on HTML::Tooltip, and by
using Javascript we could leave HTML::Tooltip open for other types of HTML
Tooltips.  The module is up on CPAN now.  Please let us know if you have any
suggestions for changes.

Thanks again!
Becky



Re: New module: CGI::Tooltip

2004-06-21 Thread A. Pagaltzis
* Orton, Yves <[EMAIL PROTECTED]> [2004-06-21 13:43]:
> Er, actually I think it is pretty trivial. [snip example]
> 
> For a pure OO module its even easier.

Of course, if the programmer made sure to avoid "dirty" coding
practices (or the module is trivial enough that s/he didn't
consider those), then it's trivial.

Problem is getting the edge cases right -- can you assume you can
do that with any random package pulled from CPAN and have it
still work?

That's the kind of ground coverage I was thinking about. In
Perl5, that's decidedly nontrivial if the module author doesn't
cooperate.

It would be nice if in Perl6, he wouldn't have to -- if it would
Just Work, without anyone having to do anything special.

Regards,
-- 
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."


RE: New module: CGI::Tooltip

2004-06-21 Thread Orton, Yves
Title: RE: New module: CGI::Tooltip





> Unfortunately, while it is possible in Perl5 to write code 
> such that it works under multiple package names (or better 
> yet, would work in any package regardless of the name), it is 
> a not trivially supported scenario. It might be a good idea 
> to think about these issues before Perl6 starts taking shape.


Er, actually I think it is pretty trivial. Here is code that aliases the package DDS to the package Data::Dump::Streamer

 ##This all has to be one line for MakeMaker version scanning.
 use Data::Dump::Streamer (); BEGIN{ *DDS:: = \%Data::Dump::Streamer:: } $VERSION=$DDS::VERSION;
 1;


For a pure OO module its even easier.


So I don't actually think this problem is with Perl, more like its an issue for CPAN.


Yves





Re: New module: CGI::Tooltip

2004-06-21 Thread A. Pagaltzis
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2004-06-19 20:35]:
> Seems like a really good example of a module that could benifit
> from meta data, and multi-category placement. If it weren't for
> existing categories, and still needed a category structure, I'd
> personally think something like the following would be more
> suitable:
>   UI::ToolTip
> With UI::ToolTip::HTML::JavaScript implementing a UI::ToolTip class.

This is a really good point. It reminds me of a quote I always
have to think about:

Intertwingularity is not generally acknowledged -- people
keep pretending they can make things deeply hierarchical,
categorizable and sequential when they can't. Everything is
deeply intertwingled.

-- Ted Nelson

Unfortunately, while it is possible in Perl5 to write code such
that it works under multiple package names (or better yet, would
work in any package regardless of the name), it is a not
trivially supported scenario. It might be a good idea to think
about these issues before Perl6 starts taking shape.

Regards,
-- 
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."


Re: New module: CGI::Tooltip

2004-06-21 Thread khemir nadim
This is exactly wht I wanted to say in my previous post but my post was not
phrased as good.

I also think the abstract/real hierarchy is a good idea.

My last point would be about the library that is used. Is it JavaCscript or
something more specific?

Cheers, Nadim.

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> This has been one of the best examples I've seen on the difficulties of
> module naming. Many of the suggestions have valid reasons, and precidence
> to back up the theory.
>
> Seems like a really good example of a module that could benifit from meta
> data, and multi-category placement. If it weren't for existing categories,
> and still needed a category structure, I'd personally think something like
> the following would be more suitable:
> UI::ToolTip
> With UI::ToolTip::HTML::JavaScript implementing a UI::ToolTip class.
>
> It seems that the problem is that you could have ToolTip's implemented for
> an HTML, or SVG, or Java, or GTK, or whatever type of display toolkit, and
> they could be implemented using some other technology like JavaScript,
> CSS, etc. Personally, I'm more a fan of listing the interface the tooltip
> applies to first. If I were looking for a ToolTip module for GTK, I'd
> expect to find GTK::ToolTip or ToolTip::GTK, not Python::ToolTip::GTK or
> JavaScript::ToolTip::GTK.
> But, to each his own.
>
> This has been an interesting thread. My vote's for "HTML::ToolTip". If
> possible, it'd be nice if it was an abstract class, and
> HTML::ToolTip::Javascript was an implementation of that class.
>
> --
> Josh I.
>




Re: New module: CGI::Tooltip

2004-06-21 Thread khemir nadim
My two modest cents,

It seems to me that we'll never find __THE__ perfect name. The proposed
names all have something right. Isn't the problem somewhere else? Why can't
we name the same module differently? or (this might exist already) where do
we put description strings for the module (like at the library)?

Cheers, Nadim.




Re: New module: CGI::Tooltip

2004-06-19 Thread unrtst

This has been one of the best examples I've seen on the difficulties of
module naming. Many of the suggestions have valid reasons, and precidence
to back up the theory.

Seems like a really good example of a module that could benifit from meta
data, and multi-category placement. If it weren't for existing categories,
and still needed a category structure, I'd personally think something like
the following would be more suitable:
UI::ToolTip
With UI::ToolTip::HTML::JavaScript implementing a UI::ToolTip class.

It seems that the problem is that you could have ToolTip's implemented for
an HTML, or SVG, or Java, or GTK, or whatever type of display toolkit, and
they could be implemented using some other technology like JavaScript,
CSS, etc. Personally, I'm more a fan of listing the interface the tooltip
applies to first. If I were looking for a ToolTip module for GTK, I'd
expect to find GTK::ToolTip or ToolTip::GTK, not Python::ToolTip::GTK or
JavaScript::ToolTip::GTK.
But, to each his own.

This has been an interesting thread. My vote's for "HTML::ToolTip". If
possible, it'd be nice if it was an abstract class, and
HTML::ToolTip::Javascript was an implementation of that class.

--
Josh I.



Re: New module: CGI::Tooltip

2004-06-19 Thread A. Pagaltzis
* Smylers <[EMAIL PROTECTED]> [2004-06-19 14:42]:
> That makes the mistake of emphasizing implementation over
> purpose (as with so many of the modules in the Tie::
> namespace).  If somebody wants HTML tooltips then they aren't
> necessarily bothered how they are implemented.

> [...]

> Putting this in the JavaScript:: namespace because it uses
> JavaScript for its implementation would be like putting all
> object-oriented modules in the Class:: namespace, or saying
> that Net::SSH::Perl should be in the Perl:: namespace becase
> it's implemented in Perl, or ...

Does not compute.

The modules in the Tie:: namespace are implemented using tie()
*themselves*. The object oriented modules are implemented using
object orientation *themselves*. Net::SSH::Perl is implemented in
Perl *itself*.

By your analogy, that would mean the modules in JavaScript::
would be implemented using Javascript.

Javascript & HTML (or HTML & Javascript) is not an implementation
detail. It's the output format.

Should Net::SMTP be called Mail::Internet::Transport?

> Or, the module could be called HTML::Tooltip::JavaScript,
> allowing for somebody else to create HTML::Tooltip::CSS in the
> future.  That puts the purpose first and the implementation
> last.

But why is "HTML" less of an implementation detail than
"Javascript"? If there is to be no mention of such details,
shouldn't it really be called WWW::Tooltip or WebPage::Tooltip or
something?

Regards,
-- 
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."


Re: New module: CGI::Tooltip

2004-06-19 Thread Smylers
A. Pagaltzis writes:

> The HTML generation code in CGI.pm is misplaced.

Agreed.

> > CGI::Tooltip
> 
> I vote against this.

I'm not sure that there's a poll going on ... but using the CGI::
namespace would just seem to be making the problem worse.

> > HTML::Tooltip
> 
> Could (barely) live with that,

That's rather an extreme reaction -- it can be annoying when so many
modules are badly named, but I don't think it's ever been the cause of
death.

> if you must pick this, but it would IMHO be mistaken.

I think it's the best name anybody's suggested -- it's a module for
generating HTML tooltips, so HTML::Tooltip describes exactly what it
does on the tin.

> > JavaScript::Tooltip::HTML
> 
> See previous mail and above explanation: this is perfect.

That makes the mistake of emphasizing implementation over purpose (as
with so many of the modules in the Tie:: namespace).  If somebody wants
HTML tooltips then they aren't necessarily bothered how they are
implemented.

Or, the module could be called HTML::Tooltip::JavaScript, allowing for
somebody else to create HTML::Tooltip::CSS in the future.  That puts the
purpose first and the implementation last.

Putting this in the JavaScript:: namespace because it uses JavaScript
for its implementation would be like putting all object-oriented modules
in the Class:: namespace, or saying that Net::SSH::Perl should be in the
Perl:: namespace becase it's implemented in Perl, or ...

Smylers



Re: New module: CGI::Tooltip

2004-06-18 Thread A. Pagaltzis
* Daniel Staal <[EMAIL PROTECTED]> [2004-06-19 00:25]:
> Javascript::Tooltip::HTML seems good for that, and would be
> logical enough for me to find.

Remember that if you ask search.cpan.org for "html tooltip", it
will find JavaScript::Tooltip::HTML. I don't anticipate there
ever to be all that many "tooltip" modules of any variety on
CPAN, so you'll get few hits, and JS::TT::HTML would stand out
perfectly. I don't think it's much of a concern whether you'd
look for HTML::Tooltip first -- you'll find the other anyway.


Regards,
-- 
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."


Re: New module: CGI::Tooltip

2004-06-18 Thread Daniel Staal
--As of Friday, June 18, 2004 2:35 PM -0400, Randy W. Sims is alleged to 
have said:

I like HTML::Tooltip. That would be the first place I would look. It has
nothing to do with CGI and Javascript is an implementation detail.
HTML::Tooltip describes the module perfectly IMHO.
--As for the rest, it is mine.
It would probably be the first place I would look too, but I would rather 
Javascript was in there someplace, since I can do tooltips (at least) two 
different ways with HTML/CSS alone.  If this module took the HTML::Tooltip 
spot then there would be no good place to put a module that implemented one 
of those methods.  (Unless Becky is wanting to keep adding new methods to 
her module, making it more and more complex...)

Better to not get into that situation in the first place, and put 
Javascript in the name.  Javascript::Tooltip::HTML seems good for that, and 
would be logical enough for me to find.

Daniel T. Staal
---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---


Re: New module: CGI::Tooltip

2004-06-18 Thread A. Pagaltzis
* Becky Alcorn <[EMAIL PROTECTED]> [2004-06-18 10:57]:
> At this point the module is HTML specific.

That's why the suggestion includes a ::HTML specifier.

> The javascript library that we're using only works in browsers
> as far as we know,

Yes, but even if it might not be possible to use *this* library
in SVG, that doesn't mean JavaScript::Tooltip is the wrong place,
because that name does not make any assertions about the library
in use (or indeed, if one is used at all). I don't believe that
is important either, so

JavaScript::Tooltip::HTML

is perfectly fine. If for some reason it was important, then that
piece of information does not generalize the name somehow, rather
it is a specialization of the module and so would require
*further* specification of the name:

JavaScript::Tooltip::HTML::Frobnitzer

so a conceivable alternative HTML-specific JS tooltip library
called Veeblefitzer would lead to

JavaScript::Tooltip::HTML::Veeblefitzer

> and as far as our development goes we think of this kind of
> functionality as a natural extension of what the CGI module
> does for us.

The HTML generation code in CGI.pm is misplaced. I remember even
Licoln Stein saying that much himself; he wrote somewhere that
CGI.pm really shouldn't have been a huge monolithic module with
all sorts of only indirectly related functionality, but that it
was too late to change that now. Unfortunately, I can't find a
reference right now -- if someone knows, please help me out here.

Anyway, my point is that there's no need to perpetuate the
mistakes made with CGI.pm (of which there are a lot; except at
the time, noone knew any better. Now we do).

> It seems that there is some overlap between the Javascript,
> HTML and CGI namespaces.  The suggestions we have so far are:
> 
> CGI::Tooltip

I vote against this.

> HTML::Tooltip

Could (barely) live with that, if you must pick this, but it
would IMHO be mistaken.

> JavaScript::Tooltip::HTML

See previous mail and above explanation: this is perfect.

> There is even a HTML::Widget and a HTML::Widgets namespace
> which might apply also (although which would you use?).

Those have very different goals from your module. The idea is to
get away from generating HTML directly, and think in higher level
terms in the app. They're attempts an an entire paradigm of
writing a Web app UI. Their goals are orthogonal to those of your
module.

Regards,
-- 
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."


Re: New module: CGI::Tooltip

2004-06-18 Thread Randy W. Sims
Becky Alcorn wrote:
The javascript library that we're using only works in browsers as far as we
know, and as far as our development goes we think of this kind of
functionality as a natural extension of what the CGI module does for us.
It seems that there is some overlap between the Javascript, HTML and CGI
namespaces.  The suggestions we have so far are:
CGI::Tooltip
HTML::Tooltip
Javascript::Tooltip::HTML
There is even a HTML::Widget and a HTML::Widgets namespace which might apply
also (although which would you use?).
I like HTML::Tooltip. That would be the first place I would look. It has 
nothing to do with CGI and Javascript is an implementation detail. 
HTML::Tooltip describes the module perfectly IMHO.

Randy.


Re: New module: CGI::Tooltip

2004-06-18 Thread Becky Alcorn

> On Thu, Jun 17, 2004 at 08:13:08AM -0500, Ken Williams wrote:
> >
> > Yeah, HTML::Tooltip and CGI::Tooltip seem like the obvious names.  I
> > don't think you need to put "Javascript" into the name, that's too much
> > information.
>
> Actually, I like JavaScript::Tooltip. If the the code is not
> HTML-specific, it may well be useful in other places JavaScript is used.
> It's my understanding that JavaScript also is used with SVG, PDF and
> Scribus documents.

At this point the module is HTML specific.  Our proposed usage of this
module is:

use CGI::Tooltip;

my $tt = CGI::Tooltip->new(
javascript_dir => '/javascript/',
options => \%default_options,
);

# In HTML output ...

my $tip1 = $tt->tooltip("Tip", \%options);
print qq(Example);

# Output the script tag that refers to the Javascript tooltip
# library.  It's essential that this is printed after all other
# tooltip related output.

print $tt->at_end;

# Output end html here

The javascript library that we're using only works in browsers as far as we
know, and as far as our development goes we think of this kind of
functionality as a natural extension of what the CGI module does for us.

It seems that there is some overlap between the Javascript, HTML and CGI
namespaces.  The suggestions we have so far are:

CGI::Tooltip
HTML::Tooltip
Javascript::Tooltip::HTML

There is even a HTML::Widget and a HTML::Widgets namespace which might apply
also (although which would you use?).

We'd value any feedback.

Regards
Becky



Re: New module: CGI::Tooltip

2004-06-17 Thread A. Pagaltzis
* Mark Stosberg <[EMAIL PROTECTED]> [2004-06-17 16:15]:
> So I think a good name might be JavaScript::Tooltip::HTML.

I put in another vote for this.

Regards,
-- 
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."


Re: New module: CGI::Tooltip

2004-06-17 Thread Mark Stosberg
On Thu, Jun 17, 2004 at 08:13:08AM -0500, Ken Williams wrote:
> 
> Yeah, HTML::Tooltip and CGI::Tooltip seem like the obvious names.  I 
> don't think you need to put "Javascript" into the name, that's too much 
> information.

Actually, I like JavaScript::Tooltip. If the the code is not
HTML-specific, it may well be useful in other places JavaScript is used.
It's my understanding that JavaScript also is used with SVG, PDF and
Scribus documents.

So I think a good name might be JavaScript::Tooltip::HTML.
Then people could implement the same API with different backends:

JavaScript::Tooltip::SVG
JavaScript::Tooltip::PDF

(I'm not even sure that PDF would support this kind of tooltip, but
I imagine SVG would.)

Mark


RE: New module: CGI::Tooltip

2004-06-17 Thread Chris Josephes
I'm 50/50 on this.

Just because a module name mentions "Javascript" doesn't mean it would
immediately be discounted by other developers.  If people need something
to handle Tooltips, they'll use it, or at least read the pod
documentation.

Also, there are lots of other tooltip implementations out there in
browsers.  Some people implement tooltips purely in CSS.

On Thu, 17 Jun 2004, Pearce, Martyn wrote:

> I am not convinced of this.  As I read it, the developer using CGI::Tooltip
> needs no Javascript knowledge; I think I would see CGI::Javascript::Tooltip
> and immediately exclude it as I have no knowledge of Javascript.  It should
> be made clear in the docs of the module that javascript is required at the
> client end, but clearly tooltips are meaningless without a gui, and very few
> GUI browsers are not javascript-enabled.  I'm all for meaningful names, but
> they don't have to carry all the documentation in one line.
>
> Becky, this seems to me to be a very useful module.
>
> Mx.
>


Christopher Josephes
[EMAIL PROTECTED]


Re: New module: CGI::Tooltip

2004-06-17 Thread Ken Williams
On Jun 17, 2004, at 7:36 AM, darren chamberlain wrote:
* Becky Alcorn  [2004/06/17 12:25]:
We're looking at releasing our new module CGI::Tooltip onto CPAN.  
This
module provides a simple perl interface to Walter Zorn's elegant 
Javascript
tooltip library (http://www.walterzorn.com/tooltip/tooltip_e.htm).  
This
library provides a flexible way of adding good looking tooltips
(onmouseovers or popup boxes) to web pages.  How appropriate is the 
name
CGI::Tooltip?
Is the interface and intended usage CGI specific or HTML specific?
Perhaps HTML::Tooltip?
Yeah, HTML::Tooltip and CGI::Tooltip seem like the obvious names.  I 
don't think you need to put "Javascript" into the name, that's too much 
information.

 -Ken


Re: New module: CGI::Tooltip

2004-06-17 Thread darren chamberlain
* Becky Alcorn  [2004/06/17 12:25]:
> We're looking at releasing our new module CGI::Tooltip onto CPAN.  This
> module provides a simple perl interface to Walter Zorn's elegant Javascript
> tooltip library (http://www.walterzorn.com/tooltip/tooltip_e.htm).  This
> library provides a flexible way of adding good looking tooltips
> (onmouseovers or popup boxes) to web pages.  How appropriate is the name
> CGI::Tooltip?

Is the interface and intended usage CGI specific or HTML specific?
Perhaps HTML::Tooltip?

(darren)

-- 
Words are also deeds.
-- Lugwig Wittgenstein


pgpMUkOL9Z3kB.pgp
Description: PGP signature


RE: New module: CGI::Tooltip

2004-06-17 Thread Pearce, Martyn
Yeah, that makes sense to me.

>-Original Message-
>From: khemir nadim [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, June 17, 2004 11:52 AM
>To: [EMAIL PROTECTED]
>Subject: Re: New module: CGI::Tooltip
>
>
>OK that was the first part of my proposal (and I find your 
>explication for its dismissa fine) but as was explained in the 
>original posting, this module needs a library to be installed. 
>Wouldn't it be nice for the people browsing around to get that 
>information right away?
>
>Would CGI::Tooltip::Whateverlibrary be acceptable?
>
>N.
>
>
>"Martyn Pearce" <[EMAIL PROTECTED]> wrote in message 
>news:[EMAIL PROTECTED]
e.corp.gs.com...
> I am not convinced of this.  As I read it, the developer using
CGI::Tooltip
> needs no Javascript knowledge; I think I would see
CGI::Javascript::Tooltip
> and immediately exclude it as I have no knowledge of Javascript.  It
should
> be made clear in the docs of the module that javascript is required at 
> the client end, but clearly tooltips are meaningless without a gui, 
> and very
few
> GUI browsers are not javascript-enabled.  I'm all for meaningful 
> names,
but
> they don't have to carry all the documentation in one line.

> >-Original Message-
> >From: khemir nadim [mailto:[EMAIL PROTECTED]
> >I think it would be appropriate to further catalogue the module name 
> >under "Java" or the name od the specific library you interface with.



Re: New module: CGI::Tooltip

2004-06-17 Thread khemir nadim
OK that was the first part of my proposal (and I find your explication for
its dismissa fine) but as was explained in the original posting, this module
needs a library to be installed. Wouldn't it be nice for the people browsing
around to get that information right away?

Would CGI::Tooltip::Whateverlibrary be acceptable?

N.


"Martyn Pearce" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am not convinced of this.  As I read it, the developer using
CGI::Tooltip
> needs no Javascript knowledge; I think I would see
CGI::Javascript::Tooltip
> and immediately exclude it as I have no knowledge of Javascript.  It
should
> be made clear in the docs of the module that javascript is required at the
> client end, but clearly tooltips are meaningless without a gui, and very
few
> GUI browsers are not javascript-enabled.  I'm all for meaningful names,
but
> they don't have to carry all the documentation in one line.

> >-Original Message-
> >From: khemir nadim [mailto:[EMAIL PROTECTED]
> >I think it would be appropriate to further catalogue the
> >module name under "Java" or the name od the specific library
> >you interface with.




RE: New module: CGI::Tooltip

2004-06-17 Thread Pearce, Martyn
I am not convinced of this.  As I read it, the developer using CGI::Tooltip
needs no Javascript knowledge; I think I would see CGI::Javascript::Tooltip
and immediately exclude it as I have no knowledge of Javascript.  It should
be made clear in the docs of the module that javascript is required at the
client end, but clearly tooltips are meaningless without a gui, and very few
GUI browsers are not javascript-enabled.  I'm all for meaningful names, but
they don't have to carry all the documentation in one line.

Becky, this seems to me to be a very useful module.

Mx.

>-Original Message-
>From: khemir nadim [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, June 17, 2004 11:25 AM
>To: [EMAIL PROTECTED]
>Subject: Re: New module: CGI::Tooltip
>
>
>I think it would be appropriate to further catalogue the 
>module name under "Java" or the name od the specific library 
>you interface with.
>
>"Becky Alcorn" <[EMAIL PROTECTED]> wrote in message 
>news:[EMAIL PROTECTED]
>> We're looking at releasing our new module CGI::Tooltip onto CPAN.  
>> This module provides a simple perl interface to Walter Zorn's elegant
>Javascript
>> tooltip library (http://www.walterzorn.com/tooltip/tooltip_e.htm).  
>> This library provides a flexible way of adding good looking tooltips 
>> (onmouseovers or popup boxes) to web pages.  How appropriate is the 
>> name CGI::Tooltip?
>>
>> Regards
>> Becky
>>
>
>


Re: New module: CGI::Tooltip

2004-06-17 Thread khemir nadim
I think it would be appropriate to further catalogue the module name under
"Java" or the name od the specific library you interface with.

"Becky Alcorn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> We're looking at releasing our new module CGI::Tooltip onto CPAN.  This
> module provides a simple perl interface to Walter Zorn's elegant
Javascript
> tooltip library (http://www.walterzorn.com/tooltip/tooltip_e.htm).  This
> library provides a flexible way of adding good looking tooltips
> (onmouseovers or popup boxes) to web pages.  How appropriate is the name
> CGI::Tooltip?
>
> Regards
> Becky
>