PET introduction

This is the “official” documentation for PET -- a (web) programming framework and application server for Perl 5.

Summary
This is the “official” documentation for PET -- a (web) programming framework and application server for Perl 5.
PET is a WEB programming framework / application server written in Perl, which means it is a software that helps programmers to create web-based applications.
PET will later be distributed as a standard CPAN module.
At the time of writing this (May the 9th, 2006) PET is approximately one year old.
Obviously, you can help making PET succesful and evolve! 
PET was created by Csongor Fagyal (CPAN author-id : FAGZAL -- http://search.cpan.org/~fagzal/).

What is PET anyway?

PET is a WEB programming framework / application server written in Perl, which means it is a software that helps programmers to create web-based applications.  It usually runs as a separate process (daemon).  Request reaching a PET website are (at least partially) served by the webserver (these are mostly request for static files, e.g. images), and partially by the PET application server (dynamic content -- (X)HTML pages).

If you know Tomcat for Java (http://tomcat.apache.org), for example, then you can imagine what PET is mostly good for and look like -- or you can think of the language PHP (http://www.php.net), the Python application server Zope (http://www.zope.org) or more likely the CPAN module Apache::ASP (http://www.apache-asp.org).  However, if all the above description did not make any sense to you, don’t worry : instead, take a look at Hello, World! which pretty much shows how a basic program looks like running under PET.  (Actually you should check out Hello, World! even if you know what an application server looks like.)

PET can be used in two ways

  • Using the linear programming model (see: Hello, World!) you simply embed Perl and TT (see: http://templatetoolkit.org) commands in your HTML files, which this way can become dynamic (this is very similar to using PHP, Apache::ASP, JSP -- and so on -- please refer to http://en.wikipedia.org- /wiki- /Server-side_scripting).  This is the most basic and easiest way to use and learn PET.  Actually, you do not even need to know Perl to use PET this way.
  • Using the MVC model (see: <MVC-style programming>) uses your .pet files as simple templates, and gives you the extraordinary power of a full-blown application server, making you to be able to quickly create professional, modular, high speed web applications with reuseable components.

PET provides many helping functions for developers, such as :

  • request resolution (automatic method invocation)
  • templating (using Template Toolkit -- other template engines will come later)
  • debugging and testing aid (logs, command line execution, testing)
  • profiling (by measuring wallclock and cpu execution times)
  • utility functions (form fillin, SQL handling, image manipulation, etc.)
  • increased security (running as a low privileged user, even chrooting in extreme cases)
  • dynamic runtime reloading (no need to restart your application while developing)
  • multilingual support (one that actually works!)
  • session handling (with session-plugins)
  • more than a hundred configuration options (do not subclass -- configure!)
  • ...and much more

PET is FREE.  (See the PET license).

Getting PET

PET will later be distributed as a standard CPAN module.  However, that distribution is not yet ready.  For the time beeing, you can check out PET from our SVN repository at :

svn://ns1.hunreg.com/PET/trunk

See more on getting, configuring and installing PET here : Installing PET.

Current stage of development

At the time of writing this (May the 9th, 2006) PET is approximately one year old.  It has been powering some high traffic, high availability, multilingual commercial websites for quite some time now (e.g.  http://www.hungirly.com and http://www.coolcamels.com are some good examples), so it is relatively robust and error free.  However, releasing PET was not out first priority before, so this distribution should be regarded as the first alpha version.  It is only an early release, which is provided here in order to help those who already use or want to try PET.  We are currently aiming towards a beta release, but that will not happen very soon, as many parts of PET still have to be constructed -- most importantly, interface (method) names and configuration parameters must be finalized and documented first (once “officially” released, PET will try to be as compatible with older releases as possible).  Some (not too much) refractoring of the codebase is also needed.  (It is very important to add here that during its history, PET has never had to be rewritten -- only tuned, extended, some parts refractored, which shows that the original design and conception are pretty much good.)

Contribute!

Obviously, you can help making PET succesful and evolve!  Take a look at the TODOs, and volunteer!  If you know some Perl, and has a few free hours, there are definetely many small (and not so small) items where you can provide some help -- even telling the developers your experiences and feature requests would be great.

Author(s)

PET was created by Csongor Fagyal (CPAN author-id : FAGZAL -- http://search.cpan.org/~fagzal/).

Please see : http://www.conceptoline.com

This documentation was created using NaturalDocs : http://www.naturaldocs.org

So how does PET actually look like from the eye of the programmer?
The most important thing is : PET is FREE.
Getting PET using SVN and creating an install.
There are many parts of PET that needs finishing, rewriting or fine-tuning.