NAME

Uttu::Manual::Intro - Introduction to Uttu

DESCRIPTION

Uttu provides a web-site driver that, together with a suitable framework, makes creating an interactive web-site easy and painless. Uttu provides support for internationalization, URI mapping, configuration as well as HTML::Mason as one of the content providers.

HISTORY

Unlike Venus, Uttu did not spring fully-formed from anyone's head. The design is based on several different applications, mainly TWIG and, as it took form, MudOS and the LPC environment.

Initially, it was a simple rewrite of our web-based administrative interface from PHP into Perl. PHP had proven too limiting for us. We were much more experienced in Perl and were making simple mistakes in PHP that lead to security holes. For example, instead of comparing two strings with ==, we had to move to using strcmp since some of our strings began with numbers. PHP also had poor support for object oriented programming, which is making our life much easier in Perl.

We chose HTML::Mason because it offered separation of logic from presentation, though not perfectly. It also gave us components and per-component caching. When we are serving a community of 70,000 customers, this allows for greater scalability.

After doing some initial coding and seeing where the project was headed, we decided to develop a core module that could act as a coordinator, or driver (in LPC terminology). Around this would be built a framework with Mason and auxiliary code that would correspond to the mudlib of an LPC-based Mud. Again, this seemed best at the time since it allowed for greater flexibility. Uttu itself does not dictate a look or feel for an application. It just coordinates the various pieces.

Just as a mud has rooms and objects and players, so an Uttu-based site would have modules, or sets of functionalities that could be added or subtracted as the site designer wished. These became the function sets that can be installed in conjunction with a framework.

INSTALLATION

Required Modules

Uttu requires the following modules. If installing via the CPAN module, you will have the option of having these installed automatically for you.

AppConfig
Cache::Cache
Module::Require
mod_perl

It is suggested that you install HTML::Mason as well since the only content handler currently available requires HTML::Mason.

If you want internationalization support, you will also need to install Locale::Maketext.

Installing Uttu

Uttu is installed just as any other Perl module.

% make [UTTU_PREFIX=...]
% make install

The optional UTTU_PREFIX option can be used to change the default installation directory for frameworks and function sets. By default, it is set to the local installation prefix with uttu appended. For example, if the default prefix is /usr/local, then UTTU_PREFIX defaults to /usr/local/uttu.

There are no tests defined at present, though they are in progress and will use the Apache::Test framework when they are done. See the Apache test project for more information about Apache::Test.

Installing a Framework

To get the most use out of Uttu, you will want to install a framework. Download one that seems to do what you need (for example, authentication, authorization, sessions, ...) or, if the framework is available on CPAN and you have already installed Uttu, use the CPAN shell.

If you download and unpack the framework distribution, then you can do the following:

% make
% make test  (optional)
% make install

This will install the framework in the standard location as determined by UTTU_PREFIX when Uttu was installed.

If you are using the CPAN shell, you should be able to install the framework by requesting the Uttu::Framework::$framework module be installed (and if the framework is actually on CPAN). Fill in an appropriate value for $framework.

To install the uri-to-filename mapping, you will need to create a configuration file containing the database parameters. This is the same information that will be needed for the site to access the mapping, so you only have to figure this part out once.

% make install_map CONFIG_FILE=/path/to/uttu.conf

The following is a sample configuration file that could be used for this.

[global]
  db_database database=uttu:host=localhost
  db_username uttu
  db_password xxxxxxxx
  db_driver mysql

See Uttu::Manual::Framework for information on writing a framework.

Installing a Function Set

Installing a function set is not any different than installing Uttu or a framework.

The module to install via the CPAN shell is Uttu::Framework::$framework::$function_set, filling in appropriate values for $framework and $function_set.

If the function set is not available on CPAN or you are installing outside the CPAN shell, then you can again use the standard sequence for installation:

% make
% make test (optional)
% make install

You will need to install the uri-to-filename mapping for each site that is using this function set.

% make install_map CONFIG_FILE=/path/to/uttu.conf

See Uttu::Manual::FunctionSet for information on writing a funtion set.

AUTHOR

James Smith <jgsmith@cpan.org>

COPYRIGHT

Copyright (C) 2002 Texas A&M University. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.