[dev] New HORDE_APP constant?

Jon Parise jon@csh.rit.edu
Thu, 1 Feb 2001 15:30:43 -0500


On Thu, Feb 01, 2001 at 02:24:53PM -0600, Brent J. Nordquist wrote:

> > +/** @const HORDE_APP The application name for the Horde namespace. */
> > +define('HORDE_APP', 'imp');
> > +
> > +/** @const IMP_NAME The full application name. */
> > +define('IMP_NAME', 'Internet Messaging Program (IMP)');
> 
> Yeah, that does sound useful.  But wouldn't you want HORDE_APP_NAME
> (generic) rather than IMP_NAME?
 
IMP_NAME is already there.  It should up in the diff because I did a
little reformatting in there.  I guess we could change that across the
board, too.

-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member


>From chuck@horde.org Date: Thu,  1 Feb 2001 15:37:38 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 63026 invoked from network); 1 Feb 2001 20:38:31 -0000
Received: from r94aag005136.sbo-smr.ma.cable.rcn.com (HELO marina.horde.org) (209.6.192.126)
  by horde.org with SMTP; 1 Feb 2001 20:38:31 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 852B93CA9; Thu,  1 Feb 2001 15:37:38 -0500 (EST)
Received: from 206.243.191.252 ( [206.243.191.252])
	as user chuck@marina by marina.horde.org with HTTP;
	Thu,  1 Feb 2001 15:37:38 -0500
Message-ID: <981059858.3a79c9126bac4@marina.horde.org>
Date: Thu,  1 Feb 2001 15:37:38 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
Subject: Re: [dev] New HORDE_APP constant?

Quoting Jon Parise <jon@csh.rit.edu>:

> IMP_NAME is already there.  It should up in the diff because I did a
> little reformatting in there.  I guess we could change that across the
> board, too.

Hmm... but the only point I can see for making the _NAME constants generic is 
to get at them from within other apps, and if you make them generic, they'll 
override each other if you do that... ?

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"My intuitive grasp of math often leads me astray." -Me


>From chuck@horde.org Date: Thu,  1 Feb 2001 15:45:05 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 63422 invoked from network); 1 Feb 2001 20:45:58 -0000
Received: from r94aag005136.sbo-smr.ma.cable.rcn.com (HELO marina.horde.org) (209.6.192.126)
  by horde.org with SMTP; 1 Feb 2001 20:45:58 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 72A773CA9; Thu,  1 Feb 2001 15:45:05 -0500 (EST)
Received: from 206.243.191.252 ( [206.243.191.252])
	as user chuck@marina by marina.horde.org with HTTP;
	Thu,  1 Feb 2001 15:45:05 -0500
Message-ID: <981060305.3a79cad136372@marina.horde.org>
Date: Thu,  1 Feb 2001 15:45:05 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
Subject: Re: [dev] New HORDE_APP constant?

Quoting Jon Parise <jon@csh.rit.edu>:

> This could be used to identify the application in the Horde namespace
> for things like preferences.  Do you think it's worth creating a
> new constant for this purpose, or should be just hardcode the
> application name everywhere like we've been doing?

I think it could be useful, but I see one problem: if you're doing inter-app 
stuff, and say include some Turba functionality inside IMP, then you need to 
make sure that you a). don't overwrite HORDE_APP constant and leave it set to 
Turba when you're done, and b). don't claim to be IMP if you need to fetch 
turba's preferences.

That might be a bit far-fetched for now, but it's the kind of scenario that I'd 
like to have more possible at some point.

Here's a slightly different idea: what about having $registry->setApp() and 
$registery->getApp() functions? These could be complemented with $registry-
>pushApp() and registry->popApp() for when you switch into another module...

Too complex?

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"My intuitive grasp of math often leads me astray." -Me


>From max@the Date: Thu,  1 Feb 2001 13:02:00 -0800
Return-Path: <max@the-triumvirate.net>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 64552 invoked from network); 1 Feb 2001 21:05:21 -0000
Received: from cx309195-b.santab1.ca.home.com (HELO zion.the-triumvirate.net) (24.21.86.136)
  by horde.org with SMTP; 1 Feb 2001 21:05:21 -0000
Received: (from http@localhost)
	by zion.the-triumvirate.net (8.10.2/8.10.2) id f11L20c25420
	for dev@lists.horde.org; Thu, 1 Feb 2001 13:02:00 -0800
X-Authentication-Warning: zion.the-triumvirate.net: http set sender to max@the-triumvirate.net using -f
Received: from 128.111.222.23 ( [128.111.222.23])
	as user max@imap.the-triumvirate.net by www.the-triumvirate.net with HTTP;
	Thu,  1 Feb 2001 13:02:00 -0800
Message-ID: <981061320.3a79cec827112@www.the-triumvirate.net>
Date: Thu,  1 Feb 2001 13:02:00 -0800
From: Max Kalika <max@the-triumvirate.net>
To: dev@lists.horde.org
References: <20010201152003.B20776@csh.rit.edu>
In-Reply-To: <20010201152003.B20776@csh.rit.edu>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
X-Originating-IP: 128.111.222.23
Subject: Re: [dev] New HORDE_APP constant?

Quoting Jon Parise <jon@csh.rit.edu>:

> +/** @const HORDE_APP The application name for the Horde namespace. */
> +define('HORDE_APP', 'imp');

Did you have in mind not needing to create seperate tables for each app's 
preferences but add another column instead to the pref table definision 
instead?  I, for one, am very supportive on this. :)

--mk23