horde interapplication conflicts

Nico Galoppo scratch at ace.ulyssis.org
Fri Feb 16 13:19:53 PST 2001


Hi,

I'm trying to understand the general horde framework and attempting to
build a website combining various horde applications together. I'm even
trying to add my own horde application ('engee') that adds my custom
applications. Here's how I had things in mind, please comment on the 
overall structure.

The general idea is to use the Horde as the backend for user prefs,
error handling, logging, authentication, perms ... across all of its
applications (imp, engee, turba, ...). Is that a possible? 

The directory structure could look like this, separating content
(./htdocs), code (./horde) and appearance (various ./template dirs):

/example.com/
    htdocs/
        index.php
        mail.php
        forums.php
        information.php
        user.php
        logs.php
        ...
        documents/
            index.html
            mail.html
            forums.html
    horde/
        engee/
            static_db.php
            static_file.php
            adduser.php
            edituser.php
            viewlog.php
            config/
                conf.php
                html.php
                ...
            lib/
                base.php
            templates/
                static/static.inc
                menu.inc
            graphics/
            ... 
        imp/
            ...
            templates/
                ...
            ...
        turba/
        babel/
        ...

Now, here's how I wanted to handle things. All files in ./htdocs/ include
./horde/engee/lib/base.php (eg. with auto_prepend). 
In here I set up the general Horde libs, as is done in imp. Then, a
specific page handler in ./horde/engee/ is called and variables passed so the page
handler knows what to serve. For example (pseudo-code):

:::::::: ./htdocs/index.php ::::::::
<?php
    $title = 'welcome to example.com';
    $content_file = './documents/index.html'
    
    include ENGEE_BASE . '/static_file.php';
?>

:::::::: ./horde/engee/static_file.php' :::::::
<?php
    // first set up authentication using Horde::Auth
    // and do Horde::Perm checking...
    
    // if user has the perms:
    $content = file($content_file);

    include $conf['paths']['templates'] . '/static/static.inc';
?>

:::::::: ./horde/engee/static_db.php ::::::
<?php
    // Horde::Auth, Horde::Perm, etc...

    // if user has the perms, get the content from the database
    $content = mysql_query(...);

    include $conf['paths']['templates'] . '/static/static.inc';
?>

:::::::: ./horde/engee/adduser.php :::::::
<?php
    // construct forms & pass the necessary data to Horde::User
?>

etc...
        
        

I haven't figured out yet (amongst other things) the following:

    * templates are scattered out over the different application's
      directories. This could be hard to keep up with, and is not very
      logical, as they're all used to implement the same website (and
      thus should look the same)

    * how will preference variables interact? Eg. are there going to be
      conflicts between $conf['paths']['...'] arrays between the imp,
      turba, engee, etc?

    * is the horde going to support overall error logging features soon?
      Logging to a database would be a nice feature ;)

I know this is all still very vague right now, but I need someone to put
me in the right direction :) So feel free to make all comments you want...

--nico

--
nico galoppo   -   tremelo/leuven, belgium
               -   erasmus/socrates student in grenoble, france
---------------------------------------------------------------
[bash]:~$ man woman                 nico at crossbar dot net
No manual entry for woman           debian linux :: vim powered





More information about the horde mailing list