A configuration framework

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

A configuration framework

Damien Cassou
Hi,

I need a framework that will help me make my application configurable.
This framework must save and load the application's configuration
to/from a file. I'm not happy with the System-Settings framework (that
I'm currently using for the Pharo Launcher) that saves executable code
because, when the application evolves, the old code in the
configuration file might not work with the new application.

Is there something around already?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill

Reply | Threaded
Open this post in threaded view
|

Re: A configuration framework

philippeback
Yes, there is Sebastian Sastre's ConfigurationFiles which work very well.


On Tue, Nov 4, 2014 at 5:15 PM, Damien Cassou <[hidden email]> wrote:
Hi,

I need a framework that will help me make my application configurable.
This framework must save and load the application's configuration
to/from a file. I'm not happy with the System-Settings framework (that
I'm currently using for the Pharo Launcher) that saves executable code
because, when the application evolves, the old code in the
configuration file might not work with the new application.

Is there something around already?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill


Reply | Threaded
Open this post in threaded view
|

Re: A configuration framework

Esteban A. Maringolo
In reply to this post by Damien Cassou
I use JSON for that purpose.
Then it's a tree of nested dictionaries. No more than two levels though.

You could also use STON.

I know you asked for a framework, but unless you need something very
specific, JSON is, IMO, the simplest thing that could possibly work.
Esteban A. Maringolo


2014-11-04 13:15 GMT-03:00 Damien Cassou <[hidden email]>:

> Hi,
>
> I need a framework that will help me make my application configurable.
> This framework must save and load the application's configuration
> to/from a file. I'm not happy with the System-Settings framework (that
> I'm currently using for the Pharo Launcher) that saves executable code
> because, when the application evolves, the old code in the
> configuration file might not work with the new application.
>
> Is there something around already?
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without
> losing enthusiasm."
> Winston Churchill
>

Reply | Threaded
Open this post in threaded view
|

Re: A configuration framework

fstephany
In reply to this post by philippeback
It loads a JSON files in the "config/" directory sitting next to the image. It handles multi-environment with the "PHARO_ENV" env var.

We use this to have a different configuration in development/staging/production

Check the DUEnvironment class for usage.



On Tue, Nov 4, 2014 at 9:01 AM, [hidden email] <[hidden email]> wrote:
Yes, there is Sebastian Sastre's ConfigurationFiles which work very well.


On Tue, Nov 4, 2014 at 5:15 PM, Damien Cassou <[hidden email]> wrote:
Hi,

I need a framework that will help me make my application configurable.
This framework must save and load the application's configuration
to/from a file. I'm not happy with the System-Settings framework (that
I'm currently using for the Pharo Launcher) that saves executable code
because, when the application evolves, the old code in the
configuration file might not work with the new application.

Is there something around already?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



Reply | Threaded
Open this post in threaded view
|

Re: A configuration framework

fstephany

On Tue, Nov 4, 2014 at 9:41 AM, François Stephany <[hidden email]> wrote:
It loads a JSON files in the "config/" directory sitting next to the image. It handles multi-environment with the "PHARO_ENV" env var.

We use this to have a different configuration in development/staging/production

Check the DUEnvironment class for usage.



On Tue, Nov 4, 2014 at 9:01 AM, [hidden email] <[hidden email]> wrote:
Yes, there is Sebastian Sastre's ConfigurationFiles which work very well.


On Tue, Nov 4, 2014 at 5:15 PM, Damien Cassou <[hidden email]> wrote:
Hi,

I need a framework that will help me make my application configurable.
This framework must save and load the application's configuration
to/from a file. I'm not happy with the System-Settings framework (that
I'm currently using for the Pharo Launcher) that saves executable code
because, when the application evolves, the old code in the
configuration file might not work with the new application.

Is there something around already?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill




Reply | Threaded
Open this post in threaded view
|

Re: A configuration framework

Thierry Goubier
In reply to this post by Damien Cassou
Hi Damien,

I use a small extension to SystemSettings which handles checking that the target class exist before executing the setting. However you lose the runOnce ability.

Thierry

2014-11-04 17:15 GMT+01:00 Damien Cassou <[hidden email]>:
Hi,

I need a framework that will help me make my application configurable.
This framework must save and load the application's configuration
to/from a file. I'm not happy with the System-Settings framework (that
I'm currently using for the Pharo Launcher) that saves executable code
because, when the application evolves, the old code in the
configuration file might not work with the new application.

Is there something around already?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill