savannah-hackers-public
[Top][All Lists]
Advanced

[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:
 o 
http://sourceforge.net/projects/localmtasendmail/files/perl-savane-0.002.tar.gz/download
 o 
http://sourceforge.net/projects/localmtasendmail/files/Perl-Savane-Modules-0.002.tar.gz/download

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 ("Template.pm") 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/{Const.pm,DB.pm,Forum.pm} modules written. The 
proof of concept uses these three modules. Forum.pm manages "forum data" 
fetched from the database using DB.pm, and the forum.pl 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 DBI.pm 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 
today.
 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.

EOF



reply via email to

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