Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Michael Gerzabek
You could implement your own SymbolProvider [1] that reads a properties 
file with all your runtime-stuff. You can implement a reloadable 
mechanism so that the values can be altered at runtime (or not).


In your Module you contribute this provider to the SymbolSource service. 
You can even decide at what position (there's a hirarchie of 
SymbolProviders) you want your provider at.


To retrieve configs in your services and pages you just inject 
SymbolSource and voila global access to all config info should be in place.


Total time to implement a first draft for a rather unexperienced 
programmer (like me) 10 minutes.


Regards,
Michael

[1] 
http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/ioc/services/SymbolProvider.html



Patrick Moore schrieb:

Hi there --

I am looking to move from T4 to T5.

In T4/hivemind  configuration configuration was in xml files. This was great
because:

   1. is easily modifiable by non-Java programmers.
   2. By only allowing non-java types to change xml files, there was limited
   ways that damage could be done.
   3. Config changes did not require a rebuild/retest/redeploy cycle.
   4. non-programmer types could alter how modules were hooked together.

Moving to T5,

   1. some inner plumbing modules do make better sense to be hidden away
   from non-programmer type's fingers.
   2. For other modules, we want to allow things like directory paths and
   other text configuration to be exposed.  (properties file??)
   3. Other modules we do want to continue to leave "exposed" ala T4

Obviously, we do not want to be "fighting" T5 conventions. So what are
people's suggestions?

Is there a way to hook hivemind into T5?

Is there a standard way to read properties files and match property names to
java bean getter/setters?

Something I missed?

Patrick Moore
Amplafi
http://amplafi.com
650-207-9792
"Put your front window on your website"
corp blog : http://amplafi.com/blog
personal blog : http://www.sworddance.com/blog




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Patrick Moore
Hi --

For most things, I agree that the java-based configuration approach is best.
For us the exception is that we DO want some stuff exposed in a way that
does not involve editing java code. Changing java code requires a full
build/test/verification process, which should not be necessary for something
like configuration changes.

Sysadmins / product managers should be able to change configurations without
needing an IDE or a java developer. ( output directories, which background
tasks are enabled )

Everything else... absolutely hands-off!

While chenille-hivemind is a good intermediate step, we obviously would like
a pure T5 solution at some point.

P.S. before someone suggests system properties... No! system properties are
only used for temporary changes not permanent decisions. ( + does not work
for random multi-line text )

On Wed, Sep 30, 2009 at 4:00 PM, Kalle Korhonen
wrote:

> Yes, Hivemind had great concepts but tapestry-ioc provides all of the
> same in a much simplified package (building pipelines comes to mind as
> one of the good examples). But this integration offers a very nice way
> to transition at your own pace.
>
> Kalle
>
>


Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Kalle Korhonen
Yes, Hivemind had great concepts but tapestry-ioc provides all of the
same in a much simplified package (building pipelines comes to mind as
one of the good examples). But this integration offers a very nice way
to transition at your own pace.

Kalle


On Wed, Sep 30, 2009 at 3:26 PM, Patrick Moore  wrote:
> Oh sweet!
>
> This is an EXCELLENT intermediate solution...
>
> obviously we will use this as transition.
>
> equally obviously, we would like to get rid of hivemind.
>
> Patrick Moore
> Amplafi
> http://amplafi.com
> 650-207-9792
> "Amplafi enables businesses, professional organizations, bands, and other
> organizations to replicate their joint marketing efforts on the internet."
> corp blog : http://amplafi.com/blog
> personal blog : http://www.sworddance.com/blog
>
>
> On Wed, Sep 30, 2009 at 3:21 PM, Kalle Korhonen
> wrote:
>
>> http://chenillekit.codehaus.org/chenillekit-hivemind/index.html
>>
>> Kalle
>>
>>
>> On Wed, Sep 30, 2009 at 3:09 PM, Patrick Moore 
>> wrote:
>> > Hi there --
>> >
>> > I am looking to move from T4 to T5.
>> >
>> > In T4/hivemind  configuration configuration was in xml files. This was
>> great
>> > because:
>> >
>> >   1. is easily modifiable by non-Java programmers.
>> >   2. By only allowing non-java types to change xml files, there was
>> limited
>> >   ways that damage could be done.
>> >   3. Config changes did not require a rebuild/retest/redeploy cycle.
>> >   4. non-programmer types could alter how modules were hooked together.
>> >
>> > Moving to T5,
>> >
>> >   1. some inner plumbing modules do make better sense to be hidden away
>> >   from non-programmer type's fingers.
>> >   2. For other modules, we want to allow things like directory paths and
>> >   other text configuration to be exposed.  (properties file??)
>> >   3. Other modules we do want to continue to leave "exposed" ala T4
>> >
>> > Obviously, we do not want to be "fighting" T5 conventions. So what are
>> > people's suggestions?
>> >
>> > Is there a way to hook hivemind into T5?
>> >
>> > Is there a standard way to read properties files and match property names
>> to
>> > java bean getter/setters?
>> >
>> > Something I missed?
>> >
>> > Patrick Moore
>> > Amplafi
>> > http://amplafi.com
>> > 650-207-9792
>> > "Put your front window on your website"
>> > corp blog : http://amplafi.com/blog
>> > personal blog : http://www.sworddance.com/blog
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Patrick Moore
On Wed, Sep 30, 2009 at 3:35 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

>
>
>2. For other modules, we want to allow things like directory paths and
>>   other text configuration to be exposed.  (properties file??)
>>
>
>
> Nothing prevents you to have some service pull configuration data from a
> file or any other source.


Ah the curse of open-source

I was asking if there was a standard *existing* T5 mechanism.

>
>
>  Is there a standard way to read properties files and match property names
>> to java bean getter/setters?
>>
>
> There's no such thing out-of-the-box, in Tapestry, but this can be easily
> implemented with reflection or, better yet, Tapestry's PropertyConduits. :)
>


But I guess not

Thanks for the reference to PropertyConduits ... seems to have no
documentation but from the name PropertyConduit does sound promising.



> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Thiago H. de Paula Figueiredo
Em Wed, 30 Sep 2009 19:09:49 -0300, Patrick Moore   
escreveu:



Hi there --


Hi!


   1. some inner plumbing modules do make better sense to be hidden away
   from non-programmer type's fingers.


I would say that the almost everyting regarding plumbing should be only  
touched by programmers.



   2. For other modules, we want to allow things like directory paths and
   other text configuration to be exposed.  (properties file??)


Nothing prevents you to have some service pull configuration data from a  
file or any other source.


Is there a standard way to read properties files and match property  
names to java bean getter/setters?


There's no such thing out-of-the-box, in Tapestry, but this can be easily  
implemented with reflection or, better yet, Tapestry's PropertyConduits. :)


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Patrick Moore
Oh sweet!

This is an EXCELLENT intermediate solution...

obviously we will use this as transition.

equally obviously, we would like to get rid of hivemind.

Patrick Moore
Amplafi
http://amplafi.com
650-207-9792
"Amplafi enables businesses, professional organizations, bands, and other
organizations to replicate their joint marketing efforts on the internet."
corp blog : http://amplafi.com/blog
personal blog : http://www.sworddance.com/blog


On Wed, Sep 30, 2009 at 3:21 PM, Kalle Korhonen
wrote:

> http://chenillekit.codehaus.org/chenillekit-hivemind/index.html
>
> Kalle
>
>
> On Wed, Sep 30, 2009 at 3:09 PM, Patrick Moore 
> wrote:
> > Hi there --
> >
> > I am looking to move from T4 to T5.
> >
> > In T4/hivemind  configuration configuration was in xml files. This was
> great
> > because:
> >
> >   1. is easily modifiable by non-Java programmers.
> >   2. By only allowing non-java types to change xml files, there was
> limited
> >   ways that damage could be done.
> >   3. Config changes did not require a rebuild/retest/redeploy cycle.
> >   4. non-programmer types could alter how modules were hooked together.
> >
> > Moving to T5,
> >
> >   1. some inner plumbing modules do make better sense to be hidden away
> >   from non-programmer type's fingers.
> >   2. For other modules, we want to allow things like directory paths and
> >   other text configuration to be exposed.  (properties file??)
> >   3. Other modules we do want to continue to leave "exposed" ala T4
> >
> > Obviously, we do not want to be "fighting" T5 conventions. So what are
> > people's suggestions?
> >
> > Is there a way to hook hivemind into T5?
> >
> > Is there a standard way to read properties files and match property names
> to
> > java bean getter/setters?
> >
> > Something I missed?
> >
> > Patrick Moore
> > Amplafi
> > http://amplafi.com
> > 650-207-9792
> > "Put your front window on your website"
> > corp blog : http://amplafi.com/blog
> > personal blog : http://www.sworddance.com/blog
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Kalle Korhonen
http://chenillekit.codehaus.org/chenillekit-hivemind/index.html

Kalle


On Wed, Sep 30, 2009 at 3:09 PM, Patrick Moore  wrote:
> Hi there --
>
> I am looking to move from T4 to T5.
>
> In T4/hivemind  configuration configuration was in xml files. This was great
> because:
>
>   1. is easily modifiable by non-Java programmers.
>   2. By only allowing non-java types to change xml files, there was limited
>   ways that damage could be done.
>   3. Config changes did not require a rebuild/retest/redeploy cycle.
>   4. non-programmer types could alter how modules were hooked together.
>
> Moving to T5,
>
>   1. some inner plumbing modules do make better sense to be hidden away
>   from non-programmer type's fingers.
>   2. For other modules, we want to allow things like directory paths and
>   other text configuration to be exposed.  (properties file??)
>   3. Other modules we do want to continue to leave "exposed" ala T4
>
> Obviously, we do not want to be "fighting" T5 conventions. So what are
> people's suggestions?
>
> Is there a way to hook hivemind into T5?
>
> Is there a standard way to read properties files and match property names to
> java bean getter/setters?
>
> Something I missed?
>
> Patrick Moore
> Amplafi
> http://amplafi.com
> 650-207-9792
> "Put your front window on your website"
> corp blog : http://amplafi.com/blog
> personal blog : http://www.sworddance.com/blog
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org