website development and maintenance, using Perl. Please help!

A

Andrew

Dear Perl gurus and enthusiasts

I appeal to you because I seem to be at a significant crossroads as a
web developer and consultant for a nonprofit educational institution
who has been, for several years, kindly entrusting me with developing
web-based database applications, and I have been fairly accommodating,
with Perl CGI scripts and mostly MySQL backend (sometimes illiciting
"wow!"s with the power and agility of Perl), and other goodies
available with Linux and OSS.

Currently, however, there is mounting discussion and pressure in the
organization to produce a "serious" and comprehensive website, with
robust and modular design, consistent look and feel, as well as an
efficient maintenance scheme.

Having mainly focused on database apps, i don't seem to be up-to-date
on what the latest and greatest web-development strategies implementing
Perl/OSS are.

The organization is vaguely considering ColdFusion. I dread the idea,
for several reasons (won't elaborate on them here, for brevity's sake)

Is there a Perl/OSS alternative to ColdFusion? What is the best way to
"templatize" web-page creation, with non-redundant (yet, possibly,
user-identity-sensitive) header/footer/navigation bars/etc.?
(Server-side includes? Or is that yesteryear?) Being more or less
comfortable with database backends (rectangular tables as well as
trees), I think I can build any data component we would need myself, to
plug into whatever is suggested. I also have enough web tools for
web-based database maintenance (by others)... so, essentially, what's
missing, is efficient maintenance of static and quasi-static
(template-merged) web pages, by non-programmers.

What is the best way to involve a team of, say, 10 content developers,
in maintaining static pages?

I am apt at creating custom solutions/algorithms, by means of Linux +
Perl + [whatever interlocking OSS component] Back in 1997, still a
Perl novice, I wrote and implemented my own website-generating Perl
script that merged a tree database of content with an HTML template, to
"spontaneously generate" an entire website in a few seconds (with
things like breadcrumb trails on each page, etc). Except, that does not
seem to suffice for involving a team of content maintainers and a
variety of dynamic components. I love to create and/or express
complex and powerful algorithms - most of all in Perl (I haven't found
anything that beats Perl's thorough, comprehensive and coherent
syntax), so suggestions entailing extra perl coding and innovation on
my part are welcome.

A little devil of a detail: ColdFusion server offers embedded http
login and session variables - don't know how to produce the equivalent
with OSS (an apache and/or perl module?)

Also, why this craze over PHP? To me PHP seems to be an inferior
imposter bullying its way into the sphere of influence, unscrupulously
shoving aside the real McCoy (Perl) - or did I miss something? (some of
my colleagues, who may be involved in the said website project, who
have heard for years that I am a Perl enthusiast, and have witnessed
Perl's fruitfulness - just a few days ago "slapped me in the face" by
producing a list of tools they would like to explore for the job -
which included PHP but not Perl! ?#$!? )

TIA

andrew
 
A

A. Sinan Unur

Dear Perl gurus and enthusiasts

Oh, please don't.
I appeal to you because I seem to be at a significant crossroads as a
web developer and consultant for a nonprofit educational institution
who has been, for several years, kindly entrusting me with developing
web-based database applications, and I have been fairly accommodating,
with Perl CGI scripts and mostly MySQL backend (sometimes illiciting

Hmmmm ...
"wow!"s with the power and agility of Perl), and other goodies
available with Linux and OSS.

Currently, however, there is mounting discussion and pressure in the
organization to produce a "serious" and comprehensive website, with
robust and modular design, consistent look and feel, as well as an
efficient maintenance scheme.

Having mainly focused on database apps, i don't seem to be up-to-date
on what the latest and greatest web-development strategies implementing
Perl/OSS are.

I think you have put the cart before the horse.

....
Also, why this craze over PHP? To me PHP seems to be an inferior
imposter bullying its way into the sphere of influence, unscrupulously
shoving aside the real McCoy (Perl) - or did I miss something? (some of
my colleagues, who may be involved in the said website project, who
have heard for years that I am a Perl enthusiast, and have witnessed
Perl's fruitfulness - just a few days ago "slapped me in the face" by
producing a list of tools they would like to explore for the job -
which included PHP but not Perl! ?#$!? )

From the long-winded and imprecise description that I have snipped, I see
no indcation that you (or the others on your team) know what the
requirements are. You each have a pet issue, and you want to win.

Search Google for CMS. Search the archive of this newsgroup for CMS.

See what you come up with.

Sinan
 
B

Brian Wakem

Andrew said:
Is there a Perl/OSS alternative to ColdFusion? What is the best way to
"templatize" web-page creation, with non-redundant (yet, possibly,
user-identity-sensitive) header/footer/navigation bars/etc.?
(Server-side includes? Or is that yesteryear?) Being more or less
comfortable with database backends (rectangular tables as well as
trees), I think I can build any data component we would need myself, to
plug into whatever is suggested. I also have enough web tools for
web-based database maintenance (by others)... so, essentially, what's
missing, is efficient maintenance of static and quasi-static
(template-merged) web pages, by non-programmers.


You should use mod_perl rather than plain old cgi/perl if the site is likely
to get some reasonable traffic.

I still use SSI's for headers, footer and menus. Can't think of any reason
not to.
 
A

Andrew

Andrew said:
@f14g2000cwb.googlegroups.com:


Oh, please don't.

Not sure what you mean by the above. If you're not an enthusiast at
least, then my post wasn't addressed to you and you could have
abstained from your dampening cynicism. If you feel I am in some way
mischaracterizing this newsgroup, then say so. I have advocated Perl
for years, to people who otherwise had no exposure to Perl. And I have
done this with utter conviction and enthusiasm about its excellence.
Not to mention, building things with Perl which made people appreciate
computer technology... (all the while reminding my colleagues and
friends about the real geniuses behind it all - Wall, Schwartz,
Christiansen, and the many others.) And I was expecting allies here in
this respect.
Hmmmm ...

a rather meaningless and unhelpful response (ambiguous at best)
I think you have put the cart before the horse.

My organization's priorities have been with data collection. Such were
the circumstances at that time, that building a website was second
priority to developing web-based data tools.
From the long-winded and imprecise description that I have snipped, I see
no indcation that you (or the others on your team) know what the
requirements are.

I regret the longwindedness. However, apparently, you paid more
attention to the length of my message than to the details therein: it
is long precisely because I explain my objectives. And if you think my
objectives are not viable, then you could have had the curtesy to tell
me how/why they are not.
You each have a pet issue, and you want to win.

Oh, please don't.
Search Google for CMS. Search the archive of this newsgroup for CMS.

See what you come up with.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Verbose statement, superfluous to the previous one.

andrew
 
A

Andrew Raines

Andrew said:
Is there a Perl/OSS alternative to ColdFusion?

There isn't a Perl application server like
ColdFusion, JBoss, etc. You can use Apache/mod_perl
for the foundation, and then, depending on how much
abstraction you want, build on that with modules.
As usual, Perl lets you decide what you need.

Template Toolkit[1] is PHP-done-right. If you want
more maintainable, MVC applications, check out
Maypole[2]. It amalgamates Class::DBI[3] and TT
into a J2EE/Rails-ish framework.

Footnotes:
[1] http://www.template-toolkit.org/

[2] http://maypole.perl.org/

[3] http://www.perl.com/pub/a/2002/11/27/classdbi.html
 
S

Sherm Pendley

Andrew said:
I was expecting allies here in this respect.

Perl is just a tool, nothing more nor less. If you're expecting allies on
some sort of religious crusade, I think you're going to be disappointed.
I regret the longwindedness. However, apparently, you paid more
attention to the length of my message than to the details therein: it
is long precisely because I explain my objectives.

Your objectives are quite clear: You want to use Perl.

But your organization's objectives are not at all clearly defined, at least
in your message here. Without knowing *what* it is you hope to accomplish,
there's no way to know if Perl is even the right tool for the job, much less
what the right way to use it might be.
Oh, please don't.

That was my take on the situation as well. You prefer Perl, your coworker
likes PHP, and someone has mentioned ColdFusion. Have any of you objectively
assessed the capabilities of each platform, and comparee them to the require-
ments of the project? What about the relative short- and long-term costs of
each? What about the political situation within your org - does the ColdFusion
advocate have enough pull to push his agenda, and if so could disagreeing with
him have repercussions that might come back to haunt you?

There's a *lot* more to this kind of decision than simplistic "Perl's number
one, rah, rah" cheerleading. If that's not what you're doing, you need to
clarify your message, because that's what your message sounds like.

sherm--
 
R

Richard Gration

I haven't read any other replies here, so I apologise in advance for
repetition.

A templating system is essential for a maintainable website.
HTML::Template is the one I use, there are others. Templating means that
there is no HTML in the code. This alone simplifies maintenance tenfold.

Make a database abstraction layer and stick to it. I can't stress how much
I wish this had been a feature of my website from the word go. When (not
if) you have to migrate you will know why. OO can help here. My app is a
hybrid - the best bits are the objects :)

Get to know CSS and use it. Ban all tag attributes apart from class and
style ;-) CSS is absolutely, positively the best way to enforce a
consistent look and feel. It's what it was designed for. You still need
developers who are sympathetic, but CSS is an essential link in the chain.
Don't use SSI or frames. I firmly believe that if you can't do everything
with SSI, don't do anything with it.

Persistent logins are easy to manage. You set a cookie on login, you read
it on all subsequent requests. You use it to initialise a user context
from your database.

As a final note, I'd like to sing the praises of Apache + mod_perl. It
*is* old, but it just works.

Rich
 
A

Alan J. Flavell

Get to know CSS and use it. Ban all tag attributes apart from class
and style ;-)

a good philosophy, and increasingly tenable...
CSS is absolutely, positively the best way to enforce a
consistent look and feel.

"force" doesn't work on the WWW, and CSS is, by design, optional.

A "consistent look and feel" on (let's say) Mozilla, IBM HPR (or other
speaking browser), a brailler, and Lynx, would not be useful or
desirable. So I agree with your advice, but for the exact opposite
reason than you give: CSS (properly used) can be usefully applied when
it's helpful, and harmlessly disregarded when it isn't. The problem
with frames, table-based layout and all the other crud that went with
presentational quasi-HTML is that it's hard to disregard it when it's
causing difficulties (how *do* you render frames in a speaking
browser?).
Persistent logins are easy to manage.

....and, judging from the many cookies that get hurled at me by random
web sites, unannounced by the site - and consistently refused by me,
unless and until the site offers some convincing explanation of what
benefit they are going to be to *me* - they are attempted far more
often than they're ever really needed. With negative consequences for
cacheability.

But if we're going to discuss any of these points, let's do it
somewhere where it's on-topic.

regards
 
C

ChrisO

Andrew said:
[much impassioned verbage snipped]

Is there a Perl/OSS alternative to ColdFusion?

I'll throw in my 2 cents and let anyone that wants to have at it. I'll
give some credence to your obvious partiality to Perl since I suspect
that others here while attempting to provide you and guide you toward a
more "objective view" are themselves somewhat partial to Perl and
somewhat discriminating of other solutions such as PHP... :)

As another Andrew stated, there is no Perl application server like
ColdFusion. This being the case, you can and should draw up a list of
approaches in the Perl world and map these solutions to your problem.
You'll need to do this for a couple of reasons:

(1) A lot of people involved in "buy in" decisions at the upper level
aren't familiar with Perl or robust Perl solutions. Their impression of
it may be that it's a "toy" and not suitable for serious web solutions
development. They will point the fact that there is no "wrapped
solution" like PHP or ColdFusion (or .Net or J2EE, etc.) In this regard
they appear to be "right" unless you've already ironed out your
requirements and mapped out a clear solution using a Perl approach.
Your superiors are going to be looking for this and with the many
approaches you could take using Perl, so you owe it to yourself to do
this. I'm only pointing out an approach I feel you are going to have to
take to win a Perl crusade. :) (And I see nothing wrong with a Perl
crusade as long as a cursory glance doesn't prove it to be pointless to
undertake based on requirements.)

(2) BECAUSE there is no "packaged solution" in Perl -- and I count this
as axiomatic in the Perl world no matter what level of development, even
a simple single script -- you HAVE to pin yourself down to a consistent
method of development and approach when using it. The "blessing" of
Perl (no pun intended) can also be it's curse. It's like a good
survivalist knife: You can do much more than simply survive with it, but
if you don't know how to use it properly, you can get into some rather
large messes or find yourself morooned. (I see a whole lot more Perl
messes than I do proper uses personally.) So in your case, mapping out
a solution not only provides your decision making counter-parts with
something they can compare with other solutions (which they are bound to
do), it also proves you, if that solution is chosen, with a development
road map, which, it appears from your earlier description, is EXACTLY
why the question was raised in the first place.

Many of the Perlish solution paths have already been thrown at you:

* Maypole
* mod_perl (a HUGE percentage of the world's commercial web sites run
using mod_perl; many, many more than most people would imagine)
* Mason (has not been mentioned yet, I don't think; maybe as close to a
PHP counterpart as you can get in Perl?)
* Template Toolkit
* HTML::Template
* CGI::Application (has not been mentioned)
* CGI::Session (has not been mentioned)

But again, a lot out of that list needs to be mapped out farther and a
real solution and approach mapped out because those are all just tools
to help you to some end. I see a PHP or ColdFusion solution to be not
much different (eg. how would you do templating under PHP for instance?
Smarty? Other solutions?), but unfortunately the perception of PHP or
ColdFusion is that it's more "packaged" when in reality it's no
different insofar as approach goes. (How many managers and decision
makers feel into this trap with Windows, IIS and ASP as another example?
How many sites ran Windows classic ASP solutions? There wasn't even a
templating solution with classic ASP and *still* isn't. It's no
different...)

I personally built my own framework that is very much like
CGI::Application, and use HTML::Template for the presentation layer and
Class::DBI for the backend connect. HTML::Template, with a little
instruction, allows presentation layer people (designers and HTML
coders) do their work separate and apart from backend development for
the most part. This is my own personal approach. I do some freelancing
in mod_perl. One large international and very well known French company
I consult for uses a mod_perl/Text::Templating solution. You have to
map out and settle on your own approach in Perl and then market that as
a wrapped solution is the bottom line.

There are also case studies out there on Perl solutions and approaches
companies have used. You can go to the mod_perl web site and read about
some companies that have used mod_perl and even a list of WHAT companies
are using it. Maypole and Mason may have something similar.

-ceo
 
P

phal

Hi ChrisO

Thank very much for your essay ChrisO, myself also very new to Perl, I
had learned Perl basic, and now I do my project with Perl, it is going
well, and everything very organize.
I do not have any experience in Scripting language, but I feel Perl can
fulfil me lots of tasks. I have also few questions with Perl. I had
read though essay PhP Vs Perl.

Does Google/Hotmail/Yahoo using Perl RegExp for search engine? Does it
use Perl?

As I know from the forum, google mostly using javascript, and yahoo
likes Php, hotmail marry Asp. It is true, isn't it? Explan if you know
why they use that langauge?

Sorry if my questions out of topic, but I am very serious about the
Powerful RegExp in Perl, and even C/C++ can not fulfil RegExp as Perl
does.

Thank

Phal
 
R

Richard Gration

On Sat, 1 Oct 2005, Richard Gration wrote, offtopic:
But if we're going to discuss any of these points, let's do it
somewhere where it's on-topic.

Fair enough, but I stand by what I said:

CSS is a very good way to give a website consistent presentation.

For a website where users login with a username and password, placing a
cookie is reasonable. Persistent logins are easily managed this way. I
agree with you about unnecessary cookies, however some are necessary.
 
A

Andrew

Thank you, guys; your responses are superb. Exactly the guidance i was
looking for, to define the scope of my research and begin road-mapping.


ChrisO's discussion of ColdFusion, PHP, .NET, etc., as _perceived_
"wrapped solutions" is quite keen and does, indeed, reflect the reality
i am facing here at work. Although mod_perl was already on my
to-implement list, i shall now move it up to the very top...

It's now a race against time for me.

As an aside, I wonder how the CPAN search engine could be improved a
bit, in terms of relevance scoring. Searching for "website development"
turns up thousands of entries, but I don't see any of the modules
suggested in this thread among the first hundred. (Perhaps deliberate
key words, entered by the modules' authors...)

Andrew
 
A

A. Sinan Unur

@o13g2000cwo.googlegroups.com:

Searching for "website development" turns up thousands of entries,
but I don't see any of the modules suggested in this thread among
the first hundred. (Perhaps deliberate key words, entered by the
modules' authors...)

Are you really accusing CPAN authors of spamming CPAN?

My guess is your organization will adopt PHP.

Maybe, instead of searching, you should go to http://search.cpan.org/ and
explore by category.

Sinan
 
A

Andrew

Searching for "website development" turns up thousands of entries,
Are you really accusing CPAN authors of spamming CPAN?

No. I'm very thankful to all who have contributed to CPAN.
My guess is your organization will adopt PHP.

That would, indeed, be sad.
Maybe, instead of searching, you should go to http://search.cpan.org/ and
explore by category.

I was trying to be constructive in my comment - to make a great thing
even better. If this is not the place to make such suggestions, i do
apologize.

andrew
 
A

A. Sinan Unur

No. I'm very thankful to all who have contributed to CPAN.

Well, I must have misunderstood. I don't know how else to read that
last sentence though.
I was trying to be constructive in my comment - to make a great thing
even better. If this is not the place to make such suggestions, i do
apologize.

CPAN search works best when you search by module name. Or, by words
can conceivably appear in the module name.

The words website and development are unlikely to occur in such places.
They are too generic. You would not expect Google to return anything
useful from such a generic query as

http://www.google.com/search?q=perl+website+development

On the other hand, you could do:

http://www.google.com/search?as_q=website+development&as_sitesearch=cpan.org

which should provide some more useful hits.

Still, website development is too generic to be useful.

Sinan
 
A

Alan J. Flavell

but I stand by what I said:

CSS is a very good way to give a website consistent presentation.

Er, no, what you *said* was:

|| CSS is absolutely, positively the best way to
|| enforce a consistent look and feel.
^^^^^^^ ^^^^^^^^^^^^^

to which I still think it was not unreasonable to respond as I did:

| "force" doesn't work on the WWW, and CSS is, by design, optional.

*If* you were pointing to the benefit of CSS from the point of view of
promoting consistency across pages on the same *web site*, then I
could agree with you.

But what you said could equally be interpreted (as indeed all too many
folk - present company, one hopes, excepted - want to interpret it) as
claiming that CSS will enforce the same "look and feel" on all
browsers. Which is neither true in fact - nor was it ever an aim of
the WWW, whose whole motivation was to make the same content available
to a range of fundamentally different presentation situations.

And *that*, indeed, is where CSS rates to bring additional benefits,
if well applied.

Apologies for the OT, but IMHO there was an important principle here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top