[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] Porting Savane to Perl: A proof of concept

From: socketpro
Subject: [Savannah-hackers-public] Porting Savane to Perl: A proof of concept
Date: Sun, 12 Oct 2014 22:24:06 -0400

I have a model for porting Savane ("savane") from PHP to Perl, and I also have 
a working model made of Template input files, .pl, sample DB data for running 
the .pl script on the "savane" database, and httpd.conf files, else this post 
would not be of much interest.

All files to install can be dowloaded with these links:

Here are some aspects of the plan:
 o the DB schema currently used by savane can be re-used by "Perl savane"
 o the "backend" will work w/o modification(s)
 o bug trackers, forums, news, mailing lists, "the frontend", etc., will work 
w/ data currently in the DB; schema can be re-used
 o the "frontend" and all pages constructed by the application will still use 
the themes and images under frontend/php/{css,images}, therefore pages 
generated will look the same (using same images and CSS), thus users will not 
even know they are using a Savane written in Perl rather than PHP
 o Template Toolkit ("") will be given data to generate HTML pages 
for clients. Thus, most of the Perl Savane API will just be functions that 
manage data and pass it off to Template to be displayed in some CGI script (or 
modperlv2)--your choice.

Currently I have lib/Perl/Savane/{,,} modules written. The 
proof of concept uses these three modules. manages "forum data" 
fetched from the database using, and the script calls "print 
Template->process()" to display the webpage. Instructions for this are at the 
end of this document.

Perl will run savane better than PHP because:
 o perlsavane will be able to be run on other httpds (nginx, Apache2, lighttpd, 
etc.) via CGI and/or modperlv2
 o Perl is a better programming language: faster, flexible, reflects the *NIX 
traditions (Perl is a "super set" of awk(1)), and better thought out than PHP
 o Perl has the module, Savane will be able to use more than one 
database system (Postgres, MySQL, SQLITE, etc.). I plan to use different 
"CREATE TABLE" syntax w/ common SQL statements in the code. People forget that 
SQL is an ANSI standard. This way, a savane install can be on any common RDBMS 
 o Since most of the backend is written in Perl (or should be because Perl is 
the best tool for the job, aka, "duct-tape of the Internet"), it is a benefit 
for the application, i.e less bugs, and the developers for most parts of the 
application to be written in the same language.
 o And lots of other reasons ....

See INSTALL in perlsavane-VERSION.tar.gz for installation instructions.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]