avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Order of Lifecycle Interfaces
Date Mon, 04 Feb 2002 10:15:12 GMT
On Sun, 3 Feb 2002 10:44, Christian Heller wrote:
> 1 Configurations
> Normally, a system has more than just one configuration, e.g. a
> SystemConfiguration and a UserConfiguration. Do you mean to configure all
> things in Lifecycle point 4 "configure"? Setting system parameters first
> and then user parameters, having a higher priority and so overwriting some
> system params?

In this case it would be recomended that you merge the system properties into 
the user properties.

> 2 Login dialog - GUI
> But to get to know the user, the system has to ask per "Login Dialog" for a
> login + password etc. Only then the user config can be determined from
> his/her home directory.
> Problem: To open up a login dialog, the system has to know whether it works
> with a Swing or a Servlet/JSP GUI. So, at least this "gui parameter" has to
> be read from a config before, the system config.
> 2.1 Do you think it would make sense to split up the various config
> concerns for system, user etc. into new concerns?
> 2.2 Would it make sense to introduce a new concern "authorizable" or
> "authenticable" (I always mix them up) which would have to be placed before
> "configure" as the user config has to be read after authentication per
> login.

I would not architecture my software that way. I would instead design it such 
that the "system" config is used to startup application. Then later on it can 
merge user and system configs and configure new objects that way.

> 3 SystemConfig as command line parameter
> Our components are prepared to run standalone and from a container.
> To give them at least some very basic settings, I thought about handing
> over the location of the SystemConfiguration on command line/from the
> container? (Before I open the login dialog to get to know the user and
> determine the UserConfig, I need to know at least, if Swing or Servlet GUI
> is used.)

Often we use the Parameters object to store this sort of information. A few 
projects based on Avalon lifecycles create an "embeddor" which launches the 
rest of the application. The embeddor is generally passed command line 
arguments via Parameters object.

> 4 Some of your interfaces don't appear in the life-cycle, such as
> Executable. Where to place execute then?

Usually Execute replaces Startable in lifecycle stages.

> 5 Your description of "initialize" is "to allocate memory" etc. Similarly,
> "dispose" is to free memory. So what about "finalize" then? Shouldn't the
> names of "dispose" be "finalize"?

We wanted to name it that but finalize is already used by java to indicate a 
method that is called when object is just about to be garbage collected.



Clarke's Third Law: "Any technology distinguishable from 
magic is insufficiently advanced".

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message