You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Cameron Fieber <cf...@selkirksystems.com> on 2004/04/21 00:10:25 UTC

Re: Suggestion: Separate Java code from configuration in the developm ent

Is there a particular reason you want the .x* files separated, or just
personal preference?

The way I use these files, they are part of the source of the
component.  The .xinfo file doesn't actually exist except as an artifact
of the build, generated via the meta plugin and javadoc tags.

I use the .xconfig as reasonable configuration defaults for the
component, but not for any configuration that is related to deployment
in a particular environment.  I view the .xconfig as the next step past
setting static final default configuration values inside the class, but
I wouldn't set default values for configuration such as database urls,
host names, etc.

-Cameron

On Tue, 2004-04-20 at 14:56, Nader Aeinehchi wrote:
> Hello
> In the Merlin documentation and OpenIM, I observer that configuration
> files (*.xinfo, *.xconfig,...) are bundled in the same directory as
> the Java source code.
> 
> IMHO it should be "motivated" to separate Java source code and
> configuration files in different directories in the development
> phase.  For example,
> 
> DEVELOPMENT
> ==============================================
> conf/
>     acme/
>             myclass.xinfo
> src/
>     java/
>     acme/
>             myclass.java
> EXECUTION
> ================================================
> bin/
>     acme/
>             myclass.xinfo
>             myclass.java
> Best Regards
>  
> --
> Nader Aeinehchi
> Aasenhagen 66 E
> 2020 Skedsmokorset
> NORWAY
> Direct and Mobile +47 41 44 29 57
> Tel (private): +47 64 83 09 08
> Fax +47 64 83 08 07
> www.aeinehchi.com
> 


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


Re: Suggestion: Separate Java code from configuration in thedevelopm ent

Posted by Nader Aeinehchi <na...@aeinehchi.com>.
> Is there a particular reason you want the .x* files separated, or just
> personal preference?


Separation of concerns.

Best Regards

--
Nader Aeinehchi
Aasenhagen 66 E
2020 Skedsmokorset
NORWAY
Direct and Mobile +47 41 44 29 57
Tel (private): +47 64 83 09 08
Fax +47 64 83 08 07
www.aeinehchi.com

----- Original Message -----
From: "Cameron Fieber" <cf...@selkirksystems.com>
To: "Avalon Developers List" <de...@avalon.apache.org>
Sent: Wednesday, April 21, 2004 12:10 AM
Subject: Re: Suggestion: Separate Java code from configuration in
thedevelopm ent


> Is there a particular reason you want the .x* files separated, or just
> personal preference?
>
> The way I use these files, they are part of the source of the
> component.  The .xinfo file doesn't actually exist except as an artifact
> of the build, generated via the meta plugin and javadoc tags.
>
> I use the .xconfig as reasonable configuration defaults for the
> component, but not for any configuration that is related to deployment
> in a particular environment.  I view the .xconfig as the next step past
> setting static final default configuration values inside the class, but
> I wouldn't set default values for configuration such as database urls,
> host names, etc.
>
> -Cameron
>
> On Tue, 2004-04-20 at 14:56, Nader Aeinehchi wrote:
> > Hello
> > In the Merlin documentation and OpenIM, I observer that configuration
> > files (*.xinfo, *.xconfig,...) are bundled in the same directory as
> > the Java source code.
> >
> > IMHO it should be "motivated" to separate Java source code and
> > configuration files in different directories in the development
> > phase.  For example,
> >
> > DEVELOPMENT
> > ==============================================
> > conf/
> >     acme/
> >             myclass.xinfo
> > src/
> >     java/
> >     acme/
> >             myclass.java
> > EXECUTION
> > ================================================
> > bin/
> >     acme/
> >             myclass.xinfo
> >             myclass.java
> > Best Regards
> >
> > --
> > Nader Aeinehchi
> > Aasenhagen 66 E
> > 2020 Skedsmokorset
> > NORWAY
> > Direct and Mobile +47 41 44 29 57
> > Tel (private): +47 64 83 09 08
> > Fax +47 64 83 08 07
> > www.aeinehchi.com
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


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


Re: Suggestion: Separate Java code from configuration in the developm ent

Posted by Stephen McConnell <mc...@apache.org>.
Cameron Fieber wrote:
> Is there a particular reason you want the .x* files separated, or just
> personal preference?

Partly personal preference and partly the historical process.

The xfiles evolved as Merlin evolved.  Initially we had the xinfo that 
you created by hand.  The xconfig file came along shortly after for the 
objective of providing exactly what you describe below - static defaults 
primarily aimed at enabling the deployment of components implicitly. 
Version 2 introduced the xprofile that enabled selectable deployment models.

> The way I use these files, they are part of the source of the
> component.  The .xinfo file doesn't actually exist except as an artifact
> of the build, generated via the meta plugin and javadoc tags.
> 
> I use the .xconfig as reasonable configuration defaults for the
> component, but not for any configuration that is related to deployment
> in a particular environment.  I view the .xconfig as the next step past
> setting static final default configuration values inside the class, but
> I wouldn't set default values for configuration such as database urls,
> host names, etc.

This is precisely the .xconfig intended usage scenario.

Cheers, Steve.


> -Cameron
> 
> On Tue, 2004-04-20 at 14:56, Nader Aeinehchi wrote:
> 
>>Hello
>>In the Merlin documentation and OpenIM, I observer that configuration
>>files (*.xinfo, *.xconfig,...) are bundled in the same directory as
>>the Java source code.
>>
>>IMHO it should be "motivated" to separate Java source code and
>>configuration files in different directories in the development
>>phase.  For example,
>>
>>DEVELOPMENT
>>==============================================
>>conf/
>>    acme/
>>            myclass.xinfo
>>src/
>>    java/
>>    acme/
>>            myclass.java
>>EXECUTION
>>================================================
>>bin/
>>    acme/
>>            myclass.xinfo
>>            myclass.java
>>Best Regards
>> 
>>--
>>Nader Aeinehchi
>>Aasenhagen 66 E
>>2020 Skedsmokorset
>>NORWAY
>>Direct and Mobile +47 41 44 29 57
>>Tel (private): +47 64 83 09 08
>>Fax +47 64 83 08 07
>>www.aeinehchi.com
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
> 
> 


-- 

|---------------------------------------|
| Magic by Merlin                       |
| Production by Avalon                  |
|                                       |
| http://avalon.apache.org              |
|---------------------------------------|

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