Re: Pluggable template retrival/caching logic (Was: Template Loader Implementation that loads from a database (DataSource))

2017-02-15 Thread David E Jones
This is cleaner, more obvious what's going on underneath, but since the DefaultTemplateResolver will be the most commonly used you could just leave the current setting methods as they are and just document that if you set a different TemplateResolver they will be ignored. -David On Wed,

Re: [FM3] Configuration mutability (Was: [FM3] Configuration API simplification)

2017-02-15 Thread Woonsan Ko
On Wed, Feb 15, 2017 at 9:43 AM, Daniel Dekany wrote: > BTW, Configuration.Builder or ConfigurationBuilder? Both convention > exists in the wild. I have recently noticed that the Java API is using > Xxx.Builder at some places, so maybe that will be the more popular >

Re: [FM3] Configuration mutability (Was: [FM3] Configuration API simplification)

2017-02-15 Thread Woonsan Ko
On Wed, Feb 15, 2017 at 2:54 PM, Woonsan Ko wrote: > On Wed, Feb 15, 2017 at 5:48 AM, Daniel Dekany wrote: >> Wednesday, February 15, 2017, 12:16:12 AM, Woonsan Ko wrote: >> >>> Also, if possible, I would like to have an immutable object or >>>

Re: [FM3] Configuration mutability (Was: [FM3] Configuration API simplification)

2017-02-15 Thread Woonsan Ko
On Wed, Feb 15, 2017 at 5:48 AM, Daniel Dekany wrote: > Wednesday, February 15, 2017, 12:16:12 AM, Woonsan Ko wrote: > >> Also, if possible, I would like to have an immutable object or >> representation than the Configuration itself. For example, >> template#getConfiguration

Re: Pluggable template retrival/caching logic (Was: Template Loader Implementation that loads from a database (DataSource))

2017-02-15 Thread Daniel Dekany
An interesting consequence of introducing the TemplateResolver concept is that it the earlier top-level configuration settings, like templateLoader, templateLookupStrategy, templateNameFormat, cacheStorage, and templateUpdateDelayMillisecond should now be the settings (JavaBean properties) of

Re: [FM3] Configuration mutability (Was: [FM3] Configuration API simplification)

2017-02-15 Thread bredelet
+1 for ConfigurationBuilder -- Denis.   Original Message   From: Daniel Dekany Sent: Wednesday, 15 February 2017 10:49 To: Woonsan Ko Reply To: dev@freemarker.incubator.apache.org Subject: [FM3] Configuration mutability (Was: [FM3] Configuration API simplification) Wednesday, February 15, 2017,

[FM3] Configuration mutability (Was: [FM3] Configuration API simplification)

2017-02-15 Thread Daniel Dekany
Wednesday, February 15, 2017, 12:16:12 AM, Woonsan Ko wrote: > Also, if possible, I would like to have an immutable object or > representation than the Configuration itself. For example, > template#getConfiguration doesn't have to return a mutable object, for > instance. But it requires a bigger

Re: [FM3] Configuration API simplification

2017-02-15 Thread Daniel Dekany
Wednesday, February 15, 2017, 12:16:12 AM, Woonsan Ko wrote: > On Tue, Feb 14, 2017 at 3:32 PM, Daniel Dekany wrote: >> I propose that in FM3 Configuration should only have two constructors: >> >> Configuration(Version incompatibleImprovements) >>