Re: Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Dwalu Z. Khasu
On Fri, 11 Feb 2005, Chris Devers wrote:

=>On Fri, 11 Feb 2005, Siegfried Heintze wrote:
=>
=>> I notice there are a lot of frameworks out there for .NET (eg, .NETNUK),
=>> PHP, and Java (eg AppFuse) programmers. These are sets of files that form a
=>> typical starter site (or skeleton) that have the basic common features for a
=>> web site: (1) cookie/password authentication authorization, send email for
=>> forgotten password, (2) file upload, (3) calendar etc...
=>> 
=>> Are there any such frameworks for perl cgi? I googled for perl cgi framework
=>> but could not find any matches.
=>
=>Does Bricolage count? Or Slashcode?
=>
=>Perl mainly offers sets of tools for plugging such things together, 
=>using components like CGI.pm &/or template libraries (Template Toolkit, 
=>Mason, HTML::Template, etc) to build sites.
=>
=>We don't, however, really have any prominent web application frameworks 
=>to compare with, say, Zope (Python's main offering) or the many suites 
=>that are now available with PHP.
=>
=>I'd be delighted to be corrected about this, but it seems like most of 
=>the people that are working on such frameworks are using other languages 
=>these days. 
=>
There are quite a few actually, here's my short list:

Openinteract2 -- see
http://openinteract.org/docs/oi2/OpenInteract2/Manual/Intro.html 

Maypole -- see http://maypole.perl.org/

bOP -- see http://www.bivio.biz/hm/why-bOP


- Dwalu
.peace
--
I am an important person in this world -
Now is the most important time in my life -
My mistakes are my best teachers -
So I will be fearless.
- Student Creed

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Wiggins d'Anconia
Chris Devers wrote:
On Fri, 11 Feb 2005, Siegfried Heintze wrote:

I notice there are a lot of frameworks out there for .NET (eg, .NETNUK),
PHP, and Java (eg AppFuse) programmers. These are sets of files that form a
typical starter site (or skeleton) that have the basic common features for a
web site: (1) cookie/password authentication authorization, send email for
forgotten password, (2) file upload, (3) calendar etc...
Are there any such frameworks for perl cgi? I googled for perl cgi framework
but could not find any matches.

Does Bricolage count? Or Slashcode?
I would count them. There is also TypePad/Moveable Type by Six Apart.
Perl mainly offers sets of tools for plugging such things together, 
using components like CGI.pm &/or template libraries (Template Toolkit, 
Mason, HTML::Template, etc) to build sites.

We don't, however, really have any prominent web application frameworks 
to compare with, say, Zope (Python's main offering) or the many suites 
that are now available with PHP.

I'd be delighted to be corrected about this, but it seems like most of 
the people that are working on such frameworks are using other languages 
these days. 


I have one in development and have been intending to release it under a 
GPL like license but haven't gotten quite that far. Of course it has no 
documentation or testing, why would it need it there are no bugs ;-).

I agree with the other posters about MayPole, and WebGUI.
I will also throw out InterChange since I just started working for a 
company that uses it, but it appears to have a very steep learning curve 
and probably isn't as elegant as the others. It is really geared towards 
e-commerce.

http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Stokes, John
I don't know if this is exactly what you're looking for, but WebGUI by 
PlainBlack (www.plainblack.com) looks like an option.

-John


-Original Message-
From:   Chris Devers [mailto:[EMAIL PROTECTED]
Sent:   Fri 2/11/2005 8:15 AM
To: Siegfried Heintze
Cc: Perl Beginners - CGI List
Subject:Re: Favorite Perl CGI Framework for Web Site Development?

On Fri, 11 Feb 2005, Siegfried Heintze wrote:

> I notice there are a lot of frameworks out there for .NET (eg, .NETNUK),
> PHP, and Java (eg AppFuse) programmers. These are sets of files that form a
> typical starter site (or skeleton) that have the basic common features for a
> web site: (1) cookie/password authentication authorization, send email for
> forgotten password, (2) file upload, (3) calendar etc...
> 
> Are there any such frameworks for perl cgi? I googled for perl cgi framework
> but could not find any matches.

Does Bricolage count? Or Slashcode?

Perl mainly offers sets of tools for plugging such things together, 
using components like CGI.pm &/or template libraries (Template Toolkit, 
Mason, HTML::Template, etc) to build sites.

We don't, however, really have any prominent web application frameworks 
to compare with, say, Zope (Python's main offering) or the many suites 
that are now available with PHP.

I'd be delighted to be corrected about this, but it seems like most of 
the people that are working on such frameworks are using other languages 
these days. 


-- 
Chris Devers

-- 
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]
 


Re: Generating a hierarchy path

2005-02-11 Thread Ovid
Hi Jan,

Apologies in advance if any of this seems too pedantic.

What you are essentially looking for is SQL capable of handling tree
structures so you can pull this data in a single fetch.  You can read
about this in Joe Celko's SQL for Smarties or (more specifically) Joe
Celko's Trees and Hierarchies in SQL for Smarties.

As for your actual code, I didn't change it so much as clean up the
formatting so I could see what was going on (though your formatting
really wasn't too bad) and fix a couple of more obvious issues.  You
can feel free to ignore my formatting.  The new code is below my
signoff.

First, you'll notice that I pass in $dbh and $page_hash.  Good
subroutines are frequently treated like black boxes.  They accept
information and they give a response.  In your subroutine, it's almost
there, but it relies on $dbh and $page_hash being declared globally. 
If those ever get munged, it can be quite difficult to track down the
error.  Plus, if you reuse this code elsewhere, it's harder to do if
those are global.

The more serious problem, though, was how you were using
selectrow_array.  My guess, from how your form was set up, is that
$mutterid was being passed in from the form.  If you've carefully
untainted it, it's probably OK to use it the way you were, but it's
still a tripwire for further maintenance and possibly a serious
security hole due to having it embedded directly in the SQL.  This
leaves the code vulnerable to an SQL injection attack
(http://www.unixwiz.net/techtips/sql-injection.html).

I've converted the code to use bind values to prevent this security
problem.  See "perldoc DBI" and read the section entitled
"Placeholders and Bind Values".

Cheers,
Ovid

sub pathmenu {
  my ($dbh, $page_hash, $mutterid, $page_type) = @_;
  my ($muttertype) = $dbh->selectrow_array(
"SELECT page_type FROM pages WHERE page_id = ?",
undef,
 $mutterid
  );
  return if $page_type == 2 || $muttertype == 2;
  my $mutterpfad = '';
  $mutterpfad   .= qq{
  

  
Pfad
  } unless $page_hash->{mother_id} == 1;
  while ($mutterid) {
my ($mother_title, $uebermutter, $muttertype) 
  = $dbh->selectrow_array(
"SELECT title, mother_id, page_type FROM pages WHERE page_id =
?",
undef,
$mutterid
  );
last if $muttertype == 2;
$mutterpfad .= qq{$mother_title
};
$mutterid= $uebermutter;
  }
  $mutterpfad .= qq{
  

  };
  return $mutterpfad;
}


=
If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Ovid
--- Siegfried Heintze <[EMAIL PROTECTED]> wrote:
> Are there any such frameworks for perl cgi? I googled for perl cgi
> framework
> but could not find any matches.

Hi Siegfried,

First, it's important to consider whether or not you want a framework. 
Sometimes they bind you to a particular set of tools or design
methodology that can be quite difficult to break out of.  Also, they
can frequently be slow or have a steep learning curve.  That being said
...

The framework in Perl that's getting the most press these days would be
Maypole.  You can read some introductory material at
http://www.perl.com/pub/a/2004/04/15/maypole.html.  Maypole also has an
active mailing list and those who get it up and running are quite happy
with it.  In fact, Simon Cozens, the original author, stated that he
was trying to create something similar to Jakarta Struts.  They have a
homepage if you're curious:  http://maypole.perl.org/.

There's also AxKit (http://www.perl.com/pub/a/2002/03/12/axkit.html). 
This is good if you're comfortable with XML and XSLT.  I'm not, but
that's a matter of personal preference.  I've no idea whether or not
AxKit is a good choice, though I've heard good things about it.

There's also OpenInteract (http://www.openinteract.org/).  I know
nothing about it, but it's been around for a while so presumably (?)
it's stable and well-tested.

Cheers,
Ovid

=
If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Generating a hierarchy path

2005-02-11 Thread Jan Eden
Hi,

my database is organized such that every page has a hierarchical superior page 
("mother"). When displaying a page, a little drop-down menu should be displayed 
with all the mother, grandmothers etc. until the loop hits a page of the root 
type (and unless the page itself is a root page).

I currently generate the menu like this:

sub pathmenu {
my ($mutterid, $page_type) = @_;
my ($muttertype) = $dbh->selectrow_array("SELECT page_type FROM pages WHERE 
page_id = $mutterid");
my $mutterpfad;
return $mutterpfad if $page_type == 2 || $muttertype == 2;
$mutterpfad = qq{Pfad} unless $page_hash->{mother_id} 
== 1;
while ($mutterid) {
my ($mother_title, $uebermutter, $muttertype) = 
$dbh->selectrow_array("SELECT title, mother_id, page_type FROM pages WHERE 
page_id = $mutterid");
last if $muttertype == 2;
$mutterpfad .= qq{$mother_title };
$mutterid = $uebermutter;
}
$mutterpfad .= qq{ };
return $mutterpfad;
}

Is there a better way to do this? There certainly is, and I am grateful for 
pointers.

Thanks,

Jan
-- 
Common sense is what tells you that the world is flat.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Chris Devers
On Fri, 11 Feb 2005, Siegfried Heintze wrote:

> I notice there are a lot of frameworks out there for .NET (eg, .NETNUK),
> PHP, and Java (eg AppFuse) programmers. These are sets of files that form a
> typical starter site (or skeleton) that have the basic common features for a
> web site: (1) cookie/password authentication authorization, send email for
> forgotten password, (2) file upload, (3) calendar etc...
> 
> Are there any such frameworks for perl cgi? I googled for perl cgi framework
> but could not find any matches.

Does Bricolage count? Or Slashcode?

Perl mainly offers sets of tools for plugging such things together, 
using components like CGI.pm &/or template libraries (Template Toolkit, 
Mason, HTML::Template, etc) to build sites.

We don't, however, really have any prominent web application frameworks 
to compare with, say, Zope (Python's main offering) or the many suites 
that are now available with PHP.

I'd be delighted to be corrected about this, but it seems like most of 
the people that are working on such frameworks are using other languages 
these days. 


-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Siegfried Heintze
I notice there are a lot of frameworks out there for .NET (eg, .NETNUK),
PHP, and Java (eg AppFuse) programmers. These are sets of files that form a
typical starter site (or skeleton) that have the basic common features for a
web site: (1) cookie/password authentication authorization, send email for
forgotten password, (2) file upload, (3) calendar etc...

Are there any such frameworks for perl cgi? I googled for perl cgi framework
but could not find any matches.

I've been thinking about how to implement authentication and authorization
in cgi. At the beginning of every page I have check for a cookie or hidden
variable and if there is none, jump to the login page to get the user name
and password, post back to login page, to check the username and password,
if it is good, redirect myself back to the original page. Hmmm... seems like
something someone should have encapsulated by now.

And of course, the other pieces are available: I know how to send mail and
had the documentation on uploading files.

Thanks,

Siegfried


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]