I don't think it needs to 'standardized' per se - of course, having a
Configuration interface allows an implementor to use use any format
imaginable.
But I think Jeremy wants for the dev team a 'preferred' mechanism to use in
examples so we don't have to write all our config examples twice. Whatever
that preferred choice is however, it would naturally steer new members of
our community in whatever direction we prefer - i.e. path of least
resistence.
I don't know that I have an opinion one way or the other. I think I'm
leaning toward json at the moment as the 'preferred' format, only because it
makes more sense to me in what it represents. But the .ini format is
probably easier to read if your configuration is trivial, as most configs
probably will be.
The json format is probably easier to read in the cases where the config is
more complicated. It is certainly less verbose in either case. But I don't
mind if .ini stays the preferred format either.
I feel 'pick what works best for you'. Its kinda like XML vs Annotations -
sometimes some people just have preferences....
On Fri, Aug 29, 2008 at 3:48 PM, Alan D. Cabrera <[EMAIL PROTECTED]>wrote:
> I like the JSON syntax.
>
> Why does the project need to standardize on a few configuration mechanisms?
>
>
> Regards,
> Alan
>
>
>
> On Aug 29, 2008, at 11:48 AM, Jeremy Haile wrote:
>
> My fear is that the JSON syntax is bordering on writing our own "Spring
>> framework config" - I'd rather standardize on being able to embed spring
>> than invent our own syntax that no one is familiar with. I'm not against
>> options, but personally I think most users will be fine either using the
>> simple INI (properties-looking) format or just using Spring for more complex
>> situations.
>>
>> J
>>
>>
>> On Aug 29, 2008, at 2:40 PM, Les Hazlewood wrote:
>>
>> Hi JSecurity Community,
>>>
>>> I'd like to get your thoughts on something.
>>>
>>> Currently, JSecurity's only text-based configuration option (in web.xml
>>> or
>>> jsecurity.ini) is the INI file format.
>>>
>>> This format works well enough and seems clean, but it doesn't
>>> particularly
>>> handle object graph definitions all that well. But JSecurity
>>> configuration
>>> is essentially just that - an object graph of the JSecurity
>>> SecurityManager
>>> and all of its dependencies (realms, etc).
>>>
>>> JSON might be a better format for object graph definitions, and might be
>>> more succinct than even INI. Would it be worth having this as the
>>> preferred
>>> configuration syntax instead?
>>>
>>> Consider the following definitions:
>>>
>>> INI:
>>>
>>> bar = some.domain.package.Bar
>>> bar.name = ABar
>>> bar.amount = 50.00
>>>
>>> foo = some.domain.package.Foo
>>> foo.something = Some value
>>> foo.bar = $bar
>>> foo.anotherThing = 52
>>>
>>> JSON:
>>>
>>> foo: some.domain.package.Foo {
>>> something: Some value,
>>> bar: some.domain.package.Bar {
>>> name: ABar,
>>> amount: 50.00
>>> },
>>> anotherThing: 52
>>> }
>>>
>>> What do you think? Which one would you prefer?
>>>
>>> --
>>> Les
>>>
>>
>>
>>
>