Re: Using Social Media to Help Promote Freemarker

2017-01-21 Thread Jacques Le Roux

I believe baby steps would help, as Sharan suggested, a 1st simple version to 
start the thing...

Jacques


Le 07/01/2017 à 23:03, Daniel Dekany a écrit :

On more thing... the hard part in an evaluator tool is defining the
data-model. On freemarker-online that's a very limited due to security
reasons. In a tool that the user runs on his on computer though, it's
not a problem to allow defining values in Groovy for example.


Saturday, January 7, 2017, 6:45:10 PM, Daniel Dekany wrote:


Saturday, January 7, 2017, 4:37:12 PM, Denis Bredelet wrote:

[snip]

These are some getting started examples. What are your ideas about the
final product?

I am thinking of adding a « main » function in the FreeMarker JAR
to load a template and a model (as XML or properties, that is why I
showed the link). Then create a separate JAR with the UI to load the
template and datamodel from the filesystem or define a datamodel
interactively, and save the processed template in a file.

The whole functionality, even if it's only a console app with a main
method, should be in a separate jar, and certainly even in a separate
project (like we have freemarker-site, freemarker-docgen, and then we
could have freemarker-tester or something). Since dependency
management has become common place, it's considered to be a bad
practice to overpack your jar-s. In fact, something that we consider
to do in FM3 is exploding freemarker.jar into submodules (like
freemarker-servet.jar, etc.). Back then it was more practical to make
a big monolithic jar, but times are changing.

Also, a separate project (again, still under the umbrella of
FreeMarker and Apache) means that you can do releases independently of
the FreeMarker (the engine) project releases.

Also note that "main" methods in a library are seen as security
problems nowadays. We already have a bunch of them in freemarker.jar,
and I'm just waiting for the right moment to get rid of them.

So, yeah, I say, separate jar, separate project.





Re: Thoughts on using FM with Transformy (Was: Using Social Media to Help Promote Freemarker)

2017-01-09 Thread Daniel Dekany
Monday, January 9, 2017, 10:06:11 AM, Christoph Rüger wrote:

[snip]
>> > templateDialectMode=extend (FM-core + own functions using a prefix.)
>>
>> If you are using a prefix, then it's an auto-import (which you can do
>> already, though not with `:` and so you can call those functions with
>> `?`).
>>
>
> I guess you are referring to
> http://freemarker.org/docs/dgui_misc_namespace.html when you say
> "already". Yes we use auto-imports internally for some helper-macros
> in our templates. But they are not exposed for users. We could, but
> at the moment we use TemplateMethodModels for any additional
> user-facing functionality.

I meant that templateDialectMode=extend above is the same as
auto-imports (with `:` so that it can be used with `?`). Or is not?

>> > templateDialectMode=onlyOwnNamespaces (no FM-core, only own namespaces)
>> >
>> > The latter would be great if you want to provide an (sandboxed)
>> > environment with kind of a custom DSL (domain specific language) which
>> should be very limited.
>> >
>> > I think the general rule should be: FM-core functions are not
>> > customizable, but you should be able to add on top of it.
>>
>> That won't work, because then adding a new FM-core function will break
>> backward compatibility.
>>
> Hmm ok I see.
> I guess I am fine with ${x?my:bar} so we could provider all our own custom
> built-ins under this "my" prefix (or "sy" as we already do with our
> auto-import macros <@sy.foo "bar" />)

What could also work is that when you create a custom dialect, you
always has to specify which version of the standard dialect do you
base it on. Then you aren't allowed to define custom callables that
clash in name with a standard one that has already existed in that
version. But for callables added later than that version, yours wins.
So there can be unfortunate cases, where the user looks up something
in the Manual, and it's there yet it behaves differently, but
hopefully the chance of a such name clash is small enough to live with
it.

[snip]
>> > works (e.g. ${var1} foo ${var2} is easy to get and also
>> > ${mystring?lower_case} is easy to understand
>> [snip]
>>
>> Or is it? I was wondering for a while whether instead of
>> `exp?trim?upperCase` the more verbose `exp.#trim.#upperCase` would be
>> easier to grasp. Yes, it's uglier if your eyes are used to FTL. But if
>> not (and let's face it, that's the majority), as you probably already
>> know `.`, it's easy to understand that FTL adds some member its own,
>> and the names of those start with `#`. No additional operator, no
>> doubts about the precedence of it. (It's like extension methods in
>> some other languages, only it's clear at glance what's an extension
>> method.)
>>
>> Ah ok I see what you mean:
> The '.' tells you want to call something on the object,
> exp.#trim would call a FM built-in while
> exp.trim would call the trim() method on the underlying object in the data
> model.

The last has to be exp.trim() with our current ObjectWrapper-s, as
`exp.trim` returns the method itself (which you can pass around and
call later).

Not having the `()` there is yet another thing worths considering. If
someone once in a blue moon wants to get the method itself, they could
use some special syntax (like exp::trim as in Java 8, or some currying
syntax). But of course the problem here is that people are used to add
that `()` after method calls. We can tell that it's optional if you
have 0 arguments, but what will happen is that 90% of the users will
put the `()`, and the rest won't. So if you want to prevent chaos, the
only way is banning `exp.trim()`, which however some can see as
annoying. (We even have problems with getters there... many keep
writing `foo.getBar()` while they could just write `foo.bar`. With
that they damage both themselves an the raputation of FM. So in FM3 I
want to disallow calling `foo.getBar()` if you could do `foo.bar`
instead. Of course I would tell in error message what to do.)

As you see, there's a lot of things that perhaps could be changed to
make using FM more productive and satisfying for the users.

> Maybe I am the wrong person. I got used to the '?' operator.
> I was fine with the logic in my head:
>
> *Things calling stuff on the object directly:*
> '.' calls functions on the underlying object
> ? calls a FM built-in (which can be chained)

There's also lot of people who find the syntax of FTL sick. All the
`?` and `!`-s, especially they are next to each other. What I expect
to happen is that we stick to `?` and all, because of tradition. But
syntax is a not very thick layer on the top of the whole engine, so
ideally, if we ever get there, we could have another syntax, more like
in WebMacro/Velocity style, where the expression language is also more
aligned with the trends (such as the usage of `?` to marks something
that can be null, instead of `!` which almost nobody uses).

> *Method-like things*
> <#xxx> is a directive (if, else, list, all that stuff)
> <@foo> are macros

Re: Thoughts on using FM with Transformy (Was: Using Social Media to Help Promote Freemarker)

2017-01-09 Thread Christoph Rüger
2017-01-08 15:00 GMT+01:00 Daniel Dekany :

> Sunday, January 8, 2017, 1:10:11 AM, Christoph Rüger wrote:
>
> [snip]
> > ok.
> > I like the chainability of Joda-Time API e.g.
> > ${mydate?plusDay(1)?string("-MM-dd")}
> > ${mydate?date_trunc("month")}
>
> Or, since there's ?plus_day(n) (instead of ?date_plus("day", n)), it
> should be ?date_trunc_month(1). Or the other way around (both should
> have a parameter like "day" and "month"), but typos in that string
> aren't spotted until runtime, so maybe the first approach is better.
>
> Also instead of ?plus_day, ?add_day is perhaps marginally better,
> because ?plus_day(-1) look a bit stranger than ?add_day(-1).
>

All good ideas. I got the plusXXX from the Joda-Time API guys e.g.
http://www.joda.org/joda-time/apidocs/org/joda/time/
DateTime.html#plusDays-int-
I am fine with ?add_day(1) too...and week,month, year :)



> [snip]
> >>> *my wishes would be (for the moment):*
> >>> - be able to create custom built-ins (like TemplateMethodModels but
> with
> >>> the ?mybuiltin syntax). This would allow us to build some custom
> functions
> >>> with the same syntax and it could be used like a fluent-interface
> >>> ?funcA?funcB?funcC
> >>
> >> That's a frequently required thing, but it raises some tricky
> >> problems. The whole point of built-ins was that since the `?` syntax
> >> is reserved for the template language, we can add new built-ins
> >> without breaking backward compatibility. And another advantage of them
> >> is that you can look them up in the FreeMarker Manual, because nobody
> >> can add/remove them.
> >>
> >> For FM 3, I'm thinking about introducing #import namespace prefixes
> >> that use `:` instead of `.`. So then, you would write `<#my:foo />`
> >> instead of `<@my.foo />`. Yes, that doesn't help so far, but it opens
> >> the possibility of writing x?my:bar, while with `.` it couldn't work
> >> (`x?my.bar`, which just means `(x?my).bar`). So this allows you to use
> >> the `arg?f` syntax instead of `f(arg)`), but only if you are using a
> >> namespace prefix (`my`), so that it's clearly separated from the core
> >> callables.
> >>
> >> However, some, especially in projects like yours, doesn't want to
> >> burden the user with such a prefix (`my:`) either. You just want to
> >> write `x?bar`. So that's also a valid use case, if you provide a
> >> complete documentation for your users instead them trying to look up
> >> things in the FreeMarker Manual. Because the problem with is not
> >> technical; it's the seer chaos this can start. Imagine if every second
> >> project starts to define his own FTL dialect, because now they can do
> >> it easily, without forking... My thought on this is that you should be
> >> allowed to define a custom FTL dialect, but then you aren't allowed to
> >> call it FTL or a FreeMarker Template. It would be Synesty Template
> >> Language (*.stl) or whatever. So then, you have your own specialized
> >> language, no silly prefixes, just what your users need (also no core
> >> FreeMarker functionality that you don't want to expose to your users),
> >> yet you didn't have to fork, and you benefit from the new FreeMarker
> >> releases. So I want the FM 3 architecture to be able to handle this
> >> task, but there are some non-technical issues with it; we might open
> >> some a Pandora's box be allowing this.
> >
> > This sounds pretty interesting and opens up new possibilities. I
> > can see this might be useful for us.
> > If we could define our own namespace globally also one idea could
> > be to define some kind of default namespace like you can do with FM's
> XML-namespace handling:
> > <#ftl ns_prefixes={"D":"http://example.com/ebook"}>
> >
> > What you say about the chaos makes total sense, but I still like
> > the idea of adding stuff on top of the FM-core-functionality.
>
> I also want to go for it, but it remains to be seen what others will
> think about it. I guess as far as we communicate clearly when using a
> a custom dialect is appropriate, and as far as we try to enforce
> technically that people don't use ftl file extension, and show clearly
> in error messages that you aren't using FTL but STL or whatever (in
> case where it can have importance), it will be a much better
> compromise than what we have in FM 2.
>
> > Maybe it could be configurable somehow e.g. in pseudo-code :
> >
> > templateDialectMode=fm-core (as it is today...only FM-core, nothing else)
> > templateDialectMode=extend (FM-core + own functions using a prefix.)
>
> If you are using a prefix, then it's an auto-import (which you can do
> already, though not with `:` and so you can call those functions with
> `?`).
>

I guess you are referring to http://freemarker.org/docs/
dgui_misc_namespace.html when you say "already". Yes we use auto-imports
internally for some helper-macros in our templates. But they are not
exposed for users. We could, but at the moment we use TemplateMethodModels
for any additional user-facing functionality.


> >

Re: Thoughts on using FM with Transformy (Was: Using Social Media to Help Promote Freemarker)

2017-01-08 Thread Daniel Dekany
Sunday, January 8, 2017, 1:10:11 AM, Christoph Rüger wrote:

[snip]
> ok.
> I like the chainability of Joda-Time API e.g.
> ${mydate?plusDay(1)?string("-MM-dd")}
> ${mydate?date_trunc("month")}

Or, since there's ?plus_day(n) (instead of ?date_plus("day", n)), it
should be ?date_trunc_month(1). Or the other way around (both should
have a parameter like "day" and "month"), but typos in that string
aren't spotted until runtime, so maybe the first approach is better.

Also instead of ?plus_day, ?add_day is perhaps marginally better,
because ?plus_day(-1) look a bit stranger than ?add_day(-1).

[snip]
>>> *my wishes would be (for the moment):*
>>> - be able to create custom built-ins (like TemplateMethodModels but with
>>> the ?mybuiltin syntax). This would allow us to build some custom functions
>>> with the same syntax and it could be used like a fluent-interface
>>> ?funcA?funcB?funcC
>>
>> That's a frequently required thing, but it raises some tricky
>> problems. The whole point of built-ins was that since the `?` syntax
>> is reserved for the template language, we can add new built-ins
>> without breaking backward compatibility. And another advantage of them
>> is that you can look them up in the FreeMarker Manual, because nobody
>> can add/remove them.
>>
>> For FM 3, I'm thinking about introducing #import namespace prefixes
>> that use `:` instead of `.`. So then, you would write `<#my:foo />`
>> instead of `<@my.foo />`. Yes, that doesn't help so far, but it opens
>> the possibility of writing x?my:bar, while with `.` it couldn't work
>> (`x?my.bar`, which just means `(x?my).bar`). So this allows you to use
>> the `arg?f` syntax instead of `f(arg)`), but only if you are using a
>> namespace prefix (`my`), so that it's clearly separated from the core
>> callables.
>>
>> However, some, especially in projects like yours, doesn't want to
>> burden the user with such a prefix (`my:`) either. You just want to
>> write `x?bar`. So that's also a valid use case, if you provide a
>> complete documentation for your users instead them trying to look up
>> things in the FreeMarker Manual. Because the problem with is not
>> technical; it's the seer chaos this can start. Imagine if every second
>> project starts to define his own FTL dialect, because now they can do
>> it easily, without forking... My thought on this is that you should be
>> allowed to define a custom FTL dialect, but then you aren't allowed to
>> call it FTL or a FreeMarker Template. It would be Synesty Template
>> Language (*.stl) or whatever. So then, you have your own specialized
>> language, no silly prefixes, just what your users need (also no core
>> FreeMarker functionality that you don't want to expose to your users),
>> yet you didn't have to fork, and you benefit from the new FreeMarker
>> releases. So I want the FM 3 architecture to be able to handle this
>> task, but there are some non-technical issues with it; we might open
>> some a Pandora's box be allowing this.
>
> This sounds pretty interesting and opens up new possibilities. I
> can see this might be useful for us.
> If we could define our own namespace globally also one idea could
> be to define some kind of default namespace like you can do with FM's 
> XML-namespace handling:
> <#ftl ns_prefixes={"D":"http://example.com/ebook"}>
>
> What you say about the chaos makes total sense, but I still like
> the idea of adding stuff on top of the FM-core-functionality.

I also want to go for it, but it remains to be seen what others will
think about it. I guess as far as we communicate clearly when using a
a custom dialect is appropriate, and as far as we try to enforce
technically that people don't use ftl file extension, and show clearly
in error messages that you aren't using FTL but STL or whatever (in
case where it can have importance), it will be a much better
compromise than what we have in FM 2.

> Maybe it could be configurable somehow e.g. in pseudo-code :
>
> templateDialectMode=fm-core (as it is today...only FM-core, nothing else)
> templateDialectMode=extend (FM-core + own functions using a prefix.)

If you are using a prefix, then it's an auto-import (which you can do
already, though not with `:` and so you can call those functions with
`?`).

> templateDialectMode=onlyOwnNamespaces (no FM-core, only own namespaces)
>
> The latter would be great if you want to provide an (sandboxed)
> environment with kind of a custom DSL (domain specific language) which should 
> be very limited.
>
> I think the general rule should be: FM-core functions are not
> customizable, but you should be able to add on top of it. 

That won't work, because then adding a new FM-core function will break
backward compatibility.

[snip]
> I guess your namespace/dialect thing is THE feature and could help
> a lot so that we are able to do things the way we want and still
> benefiting from the base and syntax FM provides. 
> I see FM and especially the syntax as a very cool - let's call it
> framework

Re: Thoughts on using FM with Transformy (Was: Using Social Media to Help Promote Freemarker)

2017-01-07 Thread Christoph Rüger
2017-01-07 22:56 GMT+01:00 Daniel Dekany :

> I have changed the subject so that we don't pollute the social media
> thread... See my comments below.
>
>
> Saturday, January 7, 2017, 9:01:06 PM, Christoph Rüger wrote:
> [snip]
> >> For example, apparently, you have hard time
> >> dealing with null-s in your application (lot of `exp!`-s everywhere),
> >> so you may want to chime in when the null/missing handling
> >> improvements in FM3 are discussed.
> >>
> > Yeah we just decided to put ! by default everywhere. In our uses cases in
> > 99% this is ok, as it should just render an empty String when something
> is
> > null.
>
> The reason we are picky about null-s is to catch typos. It's a partial
> solution as if you have values which can be legally null, you have to
> add some `!`, and then any typo you make will be hidden... but we
> couldn't do better if we assume that the data-model is some kind of
> Map.
>

Yes, I know. I think the strict null handling is ok. I also like it to spot
typos.
To make it short: I guess it is a bit of legacy on our end that we've
suggested the customer to put it.


>
> If you put `!` almost everywhere, then the way null is treated by FM
> is just a burden without the benefits. Can't you tell on that platform
> what the accepted variable *names* are? Because then you could default
> the valid ones to general-purpose-nothing (the result of null!) on the
> data-model level, and let the others be null and explode, because they
> are typos.
>
> BTW if I write ${nosuchthing}, it just prints nothing... So I do not
> need the `!` apparently.
>

I guess we are already experimenting with a wrapper underneath. I don't
know all the code anymore ;) But remember there are cases (maybe in other
parts... Transformy is just one part. we also use FM to write
filter-conditions for something we call SpreadsheetFilter...which you
cannot see in Transformy. maybe it was needed there because things can
become null... don't know).

I guess that is our part of the homework to figure out better
pre-processing here.



>
> >> BTW I see some examples like ${datecalc("HOUR", 1)!?datetime}. I guess
> >> you can't possibly get a null there. Even if you do, ?datetime will be
> >> unhappy with the '' it had to convert to date-time, unless you have a
> >> custom data-time format there.
> >>
> > Your are probably right. in this case the ! is not needed and we could
> > avoid it. Can't remember why we've put it... maybe just to make it look
> > consistent to our customers and to avoid questions ;)
> >
> >
> >>
> >> > (it"s german...just use google translator) where we show how to do
> >> > various stuff with Freemarker expressions. We have also written some
> >> > own functions (here) which could also be useful maybe as core
> >> > built-ins (see here)
> >>
> >> Some questions/notes...
> >>
> >> How does `escapeHTML(exp)` differ from `exp?html`?
> >>
> > our escapeHTML uses
> > https://commons.apache.org/proper/commons-lang/javadocs/
> api-2.6/org/apache/commons/lang/StringEscapeUtils.html#
> escapeHtml(java.lang.String)
> > under
> > the hood.
>
> Maybe because StringEscapeUtils.escapeHtml(String) escapes accented
> letters. Though nowadays that's not needed... you just set the
> response charset to UTF-8, and all funny characters come through.
>

Ok good to know.

>
> >> What's the practical use of `unescapeHTML(exp)`?
> >>
> > the opposite of escapeHTML  using
> > https://commons.apache.org/proper/commons-lang/javadocs/
> api-2.6/org/apache/commons/lang/StringEscapeUtils.html#
> unescapeHtml(java.lang.String)
> >
> > I can't remember but I think we had a case where we needed exactly the
> > escaping of Apache StringUtils and maybe it was different than what
> > Freemarker does? not sure...
>
> FreeMarker doesn't have unescape functionality at all. The question
> is, why do you need to unescape in a template?
>

Not sure anymore, but I guess assume the following:
A 3rd party supplier of our customer sends a CSV containing escaped
HTML-code (with all the < etc.). But the customer wants to  convert it
back to > because that is how he needs it in his output data (e.g. for
importing somewhere else). Most of the time our customers need to deal with
data which is a mess (like you said with Excel), but we cannot change it.
And we provide FM as the tool to move this data around until it fits your
needs. It does the job so far.


>
> >> Also note that there's the auto-escaping machinery (output formats,
> >> ?esc, etc.) nowadays. It tries to removing the responsibility of
> >> escaping from the template author (without using #escape, which itself
> >> can be forgotten, or had to be added with TemplateLoader hacks). You
> >> can have HTML fragments in the data-model that are automatically *not*
> >> escaped, and everything else is automatically escaped. But even if
> >> your data-model can't be made that smart (i.e. HTML is also Space), at
> >> least you escape be default (and the you can do exp?noEsc to prevent
> >> it

Thoughts on using FM with Transformy (Was: Using Social Media to Help Promote Freemarker)

2017-01-07 Thread Daniel Dekany
I have changed the subject so that we don't pollute the social media
thread... See my comments below.


Saturday, January 7, 2017, 9:01:06 PM, Christoph Rüger wrote:
[snip]
>> For example, apparently, you have hard time
>> dealing with null-s in your application (lot of `exp!`-s everywhere),
>> so you may want to chime in when the null/missing handling
>> improvements in FM3 are discussed.
>>
> Yeah we just decided to put ! by default everywhere. In our uses cases in
> 99% this is ok, as it should just render an empty String when something is
> null.

The reason we are picky about null-s is to catch typos. It's a partial
solution as if you have values which can be legally null, you have to
add some `!`, and then any typo you make will be hidden... but we
couldn't do better if we assume that the data-model is some kind of
Map.

If you put `!` almost everywhere, then the way null is treated by FM
is just a burden without the benefits. Can't you tell on that platform
what the accepted variable *names* are? Because then you could default
the valid ones to general-purpose-nothing (the result of null!) on the
data-model level, and let the others be null and explode, because they
are typos.

BTW if I write ${nosuchthing}, it just prints nothing... So I do not
need the `!` apparently.

>> BTW I see some examples like ${datecalc("HOUR", 1)!?datetime}. I guess
>> you can't possibly get a null there. Even if you do, ?datetime will be
>> unhappy with the '' it had to convert to date-time, unless you have a
>> custom data-time format there.
>>
> Your are probably right. in this case the ! is not needed and we could
> avoid it. Can't remember why we've put it... maybe just to make it look
> consistent to our customers and to avoid questions ;)
>
>
>>
>> > (it"s german...just use google translator) where we show how to do
>> > various stuff with Freemarker expressions. We have also written some
>> > own functions (here) which could also be useful maybe as core
>> > built-ins (see here)
>>
>> Some questions/notes...
>>
>> How does `escapeHTML(exp)` differ from `exp?html`?
>>
> our escapeHTML uses
> https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringEscapeUtils.html#escapeHtml(java.lang.String)
> under
> the hood.

Maybe because StringEscapeUtils.escapeHtml(String) escapes accented
letters. Though nowadays that's not needed... you just set the
response charset to UTF-8, and all funny characters come through.

>> What's the practical use of `unescapeHTML(exp)`?
>>
> the opposite of escapeHTML  using
> https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringEscapeUtils.html#unescapeHtml(java.lang.String)
>
> I can't remember but I think we had a case where we needed exactly the
> escaping of Apache StringUtils and maybe it was different than what
> Freemarker does? not sure...

FreeMarker doesn't have unescape functionality at all. The question
is, why do you need to unescape in a template?

>> Also note that there's the auto-escaping machinery (output formats,
>> ?esc, etc.) nowadays. It tries to removing the responsibility of
>> escaping from the template author (without using #escape, which itself
>> can be forgotten, or had to be added with TemplateLoader hacks). You
>> can have HTML fragments in the data-model that are automatically *not*
>> escaped, and everything else is automatically escaped. But even if
>> your data-model can't be made that smart (i.e. HTML is also Space), at
>> least you escape be default (and the you can do exp?noEsc to prevent
>> it), which is safer than the opposite.
>>
> Yes, we want to try that out too, but many of our custom functions were
> created a long time ago. We currently have a strong focus on ecommerce and
> onlinemarketing, so the use-cases which drove those functions where coming
> from such projects.

As far as those are #function-s or TemplateMethodModel-s, I don't
think that it interferes with them. The values of those has to be
escaped, I suppose. (Even if there are legacy macros, you can
configure FreeMarker to not use auto-escaping for the templates the
define the macros, and they remain callable from auto-escaping
templates without problem.)

>> As of `now()`, we have `.now`, though that returns a java.util.Date
>> instead of a long. So the equivalent is `.now?long`, which is somewhat
>> ugly. Note sure why and how often do you need the numerical version
>> though.
>>
> We provide both to the users in some kind of context-menu. Maybe at the
> time we wanted something as short but with the numerical version.
>
>
>> > Just let me know if this is interesting, so we can think about
>> > concrete stuff we could contribute where it fits.
>>
>> Calendar arithmetic is something users often request (i.e., adding a
>> day, truncating the date down to the beginning of the month/day/hour
>> and such). Anyway, if you have some concrete recommendation for
>> built-ins, tell us.
>>
> Yes calendar arithmetic is

Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Daniel Dekany
On more thing... the hard part in an evaluator tool is defining the
data-model. On freemarker-online that's a very limited due to security
reasons. In a tool that the user runs on his on computer though, it's
not a problem to allow defining values in Groovy for example.


Saturday, January 7, 2017, 6:45:10 PM, Daniel Dekany wrote:

> Saturday, January 7, 2017, 4:37:12 PM, Denis Bredelet wrote:
>
> [snip]
>>> These are some getting started examples. What are your ideas about the
>>> final product?
>>
>> I am thinking of adding a « main » function in the FreeMarker JAR
>> to load a template and a model (as XML or properties, that is why I
>> showed the link). Then create a separate JAR with the UI to load the
>> template and datamodel from the filesystem or define a datamodel
>> interactively, and save the processed template in a file.
>
> The whole functionality, even if it's only a console app with a main
> method, should be in a separate jar, and certainly even in a separate
> project (like we have freemarker-site, freemarker-docgen, and then we
> could have freemarker-tester or something). Since dependency
> management has become common place, it's considered to be a bad
> practice to overpack your jar-s. In fact, something that we consider
> to do in FM3 is exploding freemarker.jar into submodules (like
> freemarker-servet.jar, etc.). Back then it was more practical to make
> a big monolithic jar, but times are changing.
>
> Also, a separate project (again, still under the umbrella of
> FreeMarker and Apache) means that you can do releases independently of
> the FreeMarker (the engine) project releases.
>
> Also note that "main" methods in a library are seen as security
> problems nowadays. We already have a bunch of them in freemarker.jar,
> and I'm just waiting for the right moment to get rid of them.
>
> So, yeah, I say, separate jar, separate project.
>

-- 
Thanks,
 Daniel Dekany



Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Christoph Rüger
Hi Daniel,


2017-01-07 17:19 GMT+01:00 Daniel Dekany :

> Saturday, January 7, 2017, 2:38:16 PM, Christoph Rüger wrote:
>
> > regarding promoting freemarker:
> > We are already doing that  in our Cloud-Data-platform where you can
> > use freemarker to do almost anything to transform, map and manipulate
> data.
> > We use it for our own application too (all templates) but we also
> > have chosen Freemarker as the main internal scripting language for data
> transformation.
> >
> > Here is a small example which just concatenates two variables in
> > the column "newtitle". Check it out if you want. It goes in a
> > similar direction as  http://freemarker-online.kenshoo.com/
> >
> > That being said I think we are also happy to contribute interesting
> > usecases, examples and whatever which could be spread using
> > SocialMedia. We have lots of examples in our own documentation
> > (here)
>
> I would only answer to this as technical guy.
>
> Your use cases are interesting in that you want not-so-technical
> people to write templates.

Exactly. Our customers are usually Excel-savvy but no programmers.


> For example, apparently, you have hard time
> dealing with null-s in your application (lot of `exp!`-s everywhere),
> so you may want to chime in when the null/missing handling
> improvements in FM3 are discussed.
>
Yeah we just decided to put ! by default everywhere. In our uses cases in
99% this is ok, as it should just render an empty String when something is
null.


>
> BTW I see some examples like ${datecalc("HOUR", 1)!?datetime}. I guess
> you can't possibly get a null there. Even if you do, ?datetime will be
> unhappy with the '' it had to convert to date-time, unless you have a
> custom data-time format there.
>
Your are probably right. in this case the ! is not needed and we could
avoid it. Can't remember why we've put it... maybe just to make it look
consistent to our customers and to avoid questions ;)


>
> > (it"s german...just use google translator) where we show how to do
> > various stuff with Freemarker expressions. We have also written some
> > own functions (here) which could also be useful maybe as core
> > built-ins (see here)
>
> Some questions/notes...
>
> How does `escapeHTML(exp)` differ from `exp?html`?
>
our escapeHTML uses
https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringEscapeUtils.html#escapeHtml(java.lang.String)
under
the hood.

>
> What's the practical use of `unescapeHTML(exp)`?
>
the opposite of escapeHTML  using
https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringEscapeUtils.html#unescapeHtml(java.lang.String)

I can't remember but I think we had a case where we needed exactly the
escaping of Apache StringUtils and maybe it was different than what
Freemarker does? not sure...

>
> Also note that there's the auto-escaping machinery (output formats,
> ?esc, etc.) nowadays. It tries to removing the responsibility of
> escaping from the template author (without using #escape, which itself
> can be forgotten, or had to be added with TemplateLoader hacks). You
> can have HTML fragments in the data-model that are automatically *not*
> escaped, and everything else is automatically escaped. But even if
> your data-model can't be made that smart (i.e. HTML is also Space), at
> least you escape be default (and the you can do exp?noEsc to prevent
> it), which is safer than the opposite.
>
Yes, we want to try that out too, but many of our custom functions were
created a long time ago. We currently have a strong focus on ecommerce and
onlinemarketing, so the use-cases which drove those functions where coming
from such projects.



>
> As of `now()`, we have `.now`, though that returns a java.util.Date
> instead of a long. So the equivalent is `.now?long`, which is somewhat
> ugly. Note sure why and how often do you need the numerical version
> though.
>
We provide both to the users in some kind of context-menu. Maybe at the
time we wanted something as short but with the numerical version.


> > Just let me know if this is interesting, so we can think about
> > concrete stuff we could contribute where it fits.
>
> Calendar arithmetic is something users often request (i.e., adding a
> day, truncating the date down to the beginning of the month/day/hour
> and such). Anyway, if you have some concrete recommendation for
> built-ins, tell us.
>
Yes calendar arithmetic is a big one. we already have a dateCalc() function
and first/lastDayOfMonth() (which we will probably make more generic into
something like firstDayOf("year",mydate) or so.
Customers need this often to create date-ranges e.g. to make API-calls to a
REST-API (e.g. "give me all orders from last month")


> I'm interested to hear what your major pain points with FM are. A
> single template engine can't be ideal for everyone, but I'm hoping to
> cover more kind of usages in FM 3. (Or even in FM2, though I think
> things will be worked out in FM 3 a

Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Daniel Dekany
Saturday, January 7, 2017, 6:55:14 PM, Jacopo Cappellato wrote:

> On Sat, Jan 7, 2017 at 6:45 PM, Daniel Dekany  wrote:
>
>> [...]
>> Also, a separate project (again, still under the umbrella of
>> FreeMarker and Apache) means that you can do releases independently of
>> the FreeMarker (the engine) project releases.
>>
>>
> Just to clarify: I guess you are talking about a separate *git* project,
> maintained by the FreeMarker community.
> Am I getting it right?

Yes. So then, it's a separate *product*.

> I am asking because, following the ASF terminology we have:
> * the FreeMarker *project* with a PMC, committers (this) mailing list etc..
> * one or more products: freemarker (the engine), freemarker-site,
> freemarker-docgen, freemarker-tester etc...
> The source files of each products are maintained in a separate git
> repository and may be released independently from each other.
>
> Jacopo

-- 
Thanks,
 Daniel Dekany



Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Jacopo Cappellato
On Sat, Jan 7, 2017 at 6:45 PM, Daniel Dekany  wrote:

> [...]
> Also, a separate project (again, still under the umbrella of
> FreeMarker and Apache) means that you can do releases independently of
> the FreeMarker (the engine) project releases.
>
>
Just to clarify: I guess you are talking about a separate *git* project,
maintained by the FreeMarker community.
Am I getting it right?
I am asking because, following the ASF terminology we have:
* the FreeMarker *project* with a PMC, committers (this) mailing list etc..
* one or more products: freemarker (the engine), freemarker-site,
freemarker-docgen, freemarker-tester etc...
The source files of each products are maintained in a separate git
repository and may be released independently from each other.

Jacopo


Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Daniel Dekany
Saturday, January 7, 2017, 4:37:12 PM, Denis Bredelet wrote:

[snip]
>> These are some getting started examples. What are your ideas about the
>> final product?
>
> I am thinking of adding a « main » function in the FreeMarker JAR
> to load a template and a model (as XML or properties, that is why I
> showed the link). Then create a separate JAR with the UI to load the
> template and datamodel from the filesystem or define a datamodel
> interactively, and save the processed template in a file.

The whole functionality, even if it's only a console app with a main
method, should be in a separate jar, and certainly even in a separate
project (like we have freemarker-site, freemarker-docgen, and then we
could have freemarker-tester or something). Since dependency
management has become common place, it's considered to be a bad
practice to overpack your jar-s. In fact, something that we consider
to do in FM3 is exploding freemarker.jar into submodules (like
freemarker-servet.jar, etc.). Back then it was more practical to make
a big monolithic jar, but times are changing.

Also, a separate project (again, still under the umbrella of
FreeMarker and Apache) means that you can do releases independently of
the FreeMarker (the engine) project releases.

Also note that "main" methods in a library are seen as security
problems nowadays. We already have a bunch of them in freemarker.jar,
and I'm just waiting for the right moment to get rid of them.

So, yeah, I say, separate jar, separate project.

-- 
Thanks,
 Daniel Dekany



Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Daniel Dekany
Saturday, January 7, 2017, 2:38:16 PM, Christoph Rüger wrote:

> regarding promoting freemarker: 
> We are already doing that  in our Cloud-Data-platform where you can
> use freemarker to do almost anything to transform, map and manipulate data.
> We use it for our own application too (all templates) but we also
> have chosen Freemarker as the main internal scripting language for data 
> transformation.
>
> Here is a small example which just concatenates two variables in
> the column "newtitle". Check it out if you want. It goes in a
> similar direction as  http://freemarker-online.kenshoo.com/
>
> That being said I think we are also happy to contribute interesting
> usecases, examples and whatever which could be spread using
> SocialMedia. We have lots of examples in our own documentation
> (here)

I would only answer to this as technical guy.

Your use cases are interesting in that you want not-so-technical
people to write templates. For example, apparently, you have hard time
dealing with null-s in your application (lot of `exp!`-s everywhere),
so you may want to chime in when the null/missing handling
improvements in FM3 are discussed.

BTW I see some examples like ${datecalc("HOUR", 1)!?datetime}. I guess
you can't possibly get a null there. Even if you do, ?datetime will be
unhappy with the '' it had to convert to date-time, unless you have a
custom data-time format there.

> (it"s german...just use google translator) where we show how to do
> various stuff with Freemarker expressions. We have also written some
> own functions (here) which could also be useful maybe as core
> built-ins (see here)

Some questions/notes...

How does `escapeHTML(exp)` differ from `exp?html`?

What's the practical use of `unescapeHTML(exp)`?

Also note that there's the auto-escaping machinery (output formats,
?esc, etc.) nowadays. It tries to removing the responsibility of
escaping from the template author (without using #escape, which itself
can be forgotten, or had to be added with TemplateLoader hacks). You
can have HTML fragments in the data-model that are automatically *not*
escaped, and everything else is automatically escaped. But even if
your data-model can't be made that smart (i.e. HTML is also Space), at
least you escape be default (and the you can do exp?noEsc to prevent
it), which is safer than the opposite.

As of `now()`, we have `.now`, though that returns a java.util.Date
instead of a long. So the equivalent is `.now?long`, which is somewhat
ugly. Note sure why and how often do you need the numerical version
though.

> Just let me know if this is interesting, so we can think about
> concrete stuff we could contribute where it fits. 

Calendar arithmetic is something users often request (i.e., adding a
day, truncating the date down to the beginning of the month/day/hour
and such). Anyway, if you have some concrete recommendation for
built-ins, tell us.

I'm interested to hear what your major pain points with FM are. A
single template engine can't be ideal for everyone, but I'm hoping to
cover more kind of usages in FM 3. (Or even in FM2, though I think
things will be worked out in FM 3 and then maybe ported back where
possible and if we have the resources).

> I don't want this to be considered spam - so let me know what you
> think... but of course it would be promotion for us too  
>
> Christoph
>
>
>
>
>
> 2017-01-07 13:36 GMT+01:00 Daniel Dekany :
> Saturday, January 7, 2017, 9:37:36 AM, Denis Bredelet wrote:
>
>> Hi Daniel,
>>
 That was also my impression on the OFBiz tweet, as a software
 developer. The last is important, that I'm looking at it as a
 developer. FreeMarker, unless OFBiz, is mostly only interesting for
 them I believe. It doesn't have an UI that a manager type could click
 around. It's not a complete end-user product, it's Java library used
 internally by other products.
>>
>> I am thinking of contributing a very simple UI for FreeMarker.
>> Something able to read a single template and process it with a
>> datamodel pulled from various sources (user interface window, properties 
>> file, XML file…)
>>
>> Would that be useful and help with advertising FreeMarker?
>
> I believe it's something that many users need, because it's not always
> convenient to try things right in the real product that integrates
> FreeMarker. Especially if you just want the wrap your head around
> something you have just read in the Manual. So I was considering
> creating a such GUI, only my priorities (core maintenance) didn't
> allow that. And then suddenly come
> http://freemarker-online.kenshoo.com/, so we do have something like
> that, but it could be improved further, also perhaps an offline
> version (like a SWT application or such) can be handy (if you want to
> connect to a local DB, etc).
>
> These template evaluators are also useful to draw the user's attention
> to best practices and features. Like if you go to
> http://freemarker-online.kenshoo.com/, you will be aware of ou

Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Taher Alkhateeb
Hi Denis,

Perhaps we can do that in Gradle since talk was going in another thread of
making a switch. I'm working on a first draft.

On Jan 7, 2017 6:37 PM, "Denis Bredelet"  wrote:


> Le 7 janv. 2017 à 12:36, Daniel Dekany  a écrit :
>
> Saturday, January 7, 2017, 9:37:36 AM, Denis Bredelet wrote:
>
>> Hi Daniel,
>>
 That was also my impression on the OFBiz tweet, as a software
 developer. The last is important, that I'm looking at it as a
 developer. FreeMarker, unless OFBiz, is mostly only interesting for
 them I believe. It doesn't have an UI that a manager type could click
 around. It's not a complete end-user product, it's Java library used
 internally by other products.
>>
>> I am thinking of contributing a very simple UI for FreeMarker.
>> Something able to read a single template and process it with a
>> datamodel pulled from various sources (user interface window, properties
file, XML file…)
>>
>> Would that be useful and help with advertising FreeMarker?
>
> I believe it's something that many users need, because it's not always
> convenient to try things right in the real product that integrates
> FreeMarker. Especially if you just want the wrap your head around
> something you have just read in the Manual. So I was considering
> creating a such GUI, only my priorities (core maintenance) didn't
> allow that. And then suddenly come
> http://freemarker-online.kenshoo.com/, so we do have something like
> that, but it could be improved further, also perhaps an offline
> version (like a SWT application or such) can be handy (if you want to
> connect to a local DB, etc).
>
> These template evaluators are also useful to draw the user's attention
> to best practices and features. Like if you go to
> http://freemarker-online.kenshoo.com/, you will be aware of output
> formats, a relatively novel but very useful feature.
>
>> I have some code to use as a starting point on my website:
>> http://bredelet.com/Denis/FreeMarker%20first%20steps.html
>
> These are some getting started examples. What are your ideas about the
> final product?

I am thinking of adding a « main » function in the FreeMarker JAR to load a
template and a model (as XML or properties, that is why I showed the link).
Then create a separate JAR with the UI to load the template and datamodel
from the filesystem or define a datamodel interactively, and save the
processed template in a file.

Cheers,
— Denis.

>> Maybe this could come as a separate JAR to avoid loading UI classes
unnecessarily.
>
>> Cheers,
>> — Denis.
>
> --
> Thanks,
> Daniel Dekany
>


Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Denis Bredelet

> Le 7 janv. 2017 à 12:36, Daniel Dekany  a écrit :
> 
> Saturday, January 7, 2017, 9:37:36 AM, Denis Bredelet wrote:
> 
>> Hi Daniel,
>> 
 That was also my impression on the OFBiz tweet, as a software
 developer. The last is important, that I'm looking at it as a
 developer. FreeMarker, unless OFBiz, is mostly only interesting for
 them I believe. It doesn't have an UI that a manager type could click
 around. It's not a complete end-user product, it's Java library used
 internally by other products.
>> 
>> I am thinking of contributing a very simple UI for FreeMarker.
>> Something able to read a single template and process it with a
>> datamodel pulled from various sources (user interface window, properties 
>> file, XML file…)
>> 
>> Would that be useful and help with advertising FreeMarker?
> 
> I believe it's something that many users need, because it's not always
> convenient to try things right in the real product that integrates
> FreeMarker. Especially if you just want the wrap your head around
> something you have just read in the Manual. So I was considering
> creating a such GUI, only my priorities (core maintenance) didn't
> allow that. And then suddenly come
> http://freemarker-online.kenshoo.com/, so we do have something like
> that, but it could be improved further, also perhaps an offline
> version (like a SWT application or such) can be handy (if you want to
> connect to a local DB, etc).
> 
> These template evaluators are also useful to draw the user's attention
> to best practices and features. Like if you go to
> http://freemarker-online.kenshoo.com/, you will be aware of output
> formats, a relatively novel but very useful feature.
> 
>> I have some code to use as a starting point on my website:
>> http://bredelet.com/Denis/FreeMarker%20first%20steps.html
> 
> These are some getting started examples. What are your ideas about the
> final product?

I am thinking of adding a « main » function in the FreeMarker JAR to load a 
template and a model (as XML or properties, that is why I showed the link). 
Then create a separate JAR with the UI to load the template and datamodel from 
the filesystem or define a datamodel interactively, and save the processed 
template in a file.

Cheers,
— Denis.

>> Maybe this could come as a separate JAR to avoid loading UI classes 
>> unnecessarily.
> 
>> Cheers,
>> — Denis.
> 
> -- 
> Thanks,
> Daniel Dekany
> 



Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Christoph Rüger
regarding promoting freemarker:
We are already doing that  in our Cloud-Data-platform where you can use
freemarker to do almost anything to transform, map and manipulate data.
We use it for our own application too (all templates) but we also have
chosen Freemarker as the main internal scripting language for data
transformation.

Here is a small example

which
just concatenates two variables in the column "newtitle". Check it out if
you want. It goes in a similar direction as  http://freemarker-online.
kenshoo.com/

That being said I think we are also happy to contribute interesting
usecases, examples and whatever which could be spread using SocialMedia. We
have lots of examples in our own documentation (here
)
(it"s german...just use google translator) where we show how to do various
stuff with Freemarker expressions. We have also written some own functions (
here
)
which could also be useful maybe as core built-ins (see here

)

Just let me know if this is interesting, so we can think about concrete
stuff we could contribute where it fits.

I don't want this to be considered spam - so let me know what you think...
but of course it would be promotion for us too :)

Christoph





2017-01-07 13:36 GMT+01:00 Daniel Dekany :

> Saturday, January 7, 2017, 9:37:36 AM, Denis Bredelet wrote:
>
> > Hi Daniel,
> >
> >>> That was also my impression on the OFBiz tweet, as a software
> >>> developer. The last is important, that I'm looking at it as a
> >>> developer. FreeMarker, unless OFBiz, is mostly only interesting for
> >>> them I believe. It doesn't have an UI that a manager type could click
> >>> around. It's not a complete end-user product, it's Java library used
> >>> internally by other products.
> >
> > I am thinking of contributing a very simple UI for FreeMarker.
> > Something able to read a single template and process it with a
> > datamodel pulled from various sources (user interface window, properties
> file, XML file…)
> >
> > Would that be useful and help with advertising FreeMarker?
>
> I believe it's something that many users need, because it's not always
> convenient to try things right in the real product that integrates
> FreeMarker. Especially if you just want the wrap your head around
> something you have just read in the Manual. So I was considering
> creating a such GUI, only my priorities (core maintenance) didn't
> allow that. And then suddenly come
> http://freemarker-online.kenshoo.com/, so we do have something like
> that, but it could be improved further, also perhaps an offline
> version (like a SWT application or such) can be handy (if you want to
> connect to a local DB, etc).
>
> These template evaluators are also useful to draw the user's attention
> to best practices and features. Like if you go to
> http://freemarker-online.kenshoo.com/, you will be aware of output
> formats, a relatively novel but very useful feature.
>
> > I have some code to use as a starting point on my website:
> > http://bredelet.com/Denis/FreeMarker%20first%20steps.html
>
> These are some getting started examples. What are your ideas about the
> final product?
>
> > Maybe this could come as a separate JAR to avoid loading UI classes
> unnecessarily.
>
> > Cheers,
> > — Denis.
>
> --
> Thanks,
>  Daniel Dekany
>
>


-- 
Christoph Rüger, Geschäftsführer
Synesty  - Automatisierung, Schnittstellen, Datenfeeds
Tel.: +49 3641/559649

Xing: https://www.xing.com/profile/Christoph_Rueger2
LinkedIn: http://www.linkedin.com/pub/christoph-rueger/a/685/198

-- 
Synesty GmbH
Moritz-von-Rohr-Str. 1a
07745 Jena
Tel.: +49 3641 559649
Fax.: +49 3641 5596499
Internet: http://synesty.com

Geschäftsführer: Christoph Rüger
Unternehmenssitz: Jena
Handelsregister B beim Amtsgericht: Jena
Handelsregister-Nummer: HRB 508766
Ust-IdNr.: DE287564982


Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Daniel Dekany
Saturday, January 7, 2017, 9:37:36 AM, Denis Bredelet wrote:

> Hi Daniel,
>
>>> That was also my impression on the OFBiz tweet, as a software
>>> developer. The last is important, that I'm looking at it as a
>>> developer. FreeMarker, unless OFBiz, is mostly only interesting for
>>> them I believe. It doesn't have an UI that a manager type could click
>>> around. It's not a complete end-user product, it's Java library used
>>> internally by other products.
>
> I am thinking of contributing a very simple UI for FreeMarker.
> Something able to read a single template and process it with a
> datamodel pulled from various sources (user interface window, properties 
> file, XML file…)
>
> Would that be useful and help with advertising FreeMarker?

I believe it's something that many users need, because it's not always
convenient to try things right in the real product that integrates
FreeMarker. Especially if you just want the wrap your head around
something you have just read in the Manual. So I was considering
creating a such GUI, only my priorities (core maintenance) didn't
allow that. And then suddenly come
http://freemarker-online.kenshoo.com/, so we do have something like
that, but it could be improved further, also perhaps an offline
version (like a SWT application or such) can be handy (if you want to
connect to a local DB, etc).

These template evaluators are also useful to draw the user's attention
to best practices and features. Like if you go to
http://freemarker-online.kenshoo.com/, you will be aware of output
formats, a relatively novel but very useful feature.

> I have some code to use as a starting point on my website:
> http://bredelet.com/Denis/FreeMarker%20first%20steps.html

These are some getting started examples. What are your ideas about the
final product?

> Maybe this could come as a separate JAR to avoid loading UI classes 
> unnecessarily.

> Cheers,
> — Denis.

-- 
Thanks,
 Daniel Dekany



Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Jacopo Cappellato
On Fri, Jan 6, 2017 at 9:06 PM, Sharan Foga  wrote:

> [...]

Anyway - we could maybe look at trying to do something over a short
> timeframe  (like a POC) to see how it works... :-)   What do people think?
>

I like the idea of running an experiment to increase the activity in
Twitter and slowly broaden, without exaggerations, the content: not just
formal ones (like it is now) but also informal and casual ones. I am sure
that in a few weeks, with the feedback of this community, we could fine
tune the messages to be well suited to the specific needs and style of the
FreeMarker community.
We could run this experiment, with the help of Sharan, for, let's say, 2
months (providing our feedback to her in the meantime) and then measure the
results (in terms of subscriptions, feedback etc...).
We could do something similar with the blog.

I also think it is useful and beneficial to the project some separation of
concerns: the more technical wise ones can focus their energy on code and
technical aspects of the project, while others can in parallel help with
content, documentation, communication.

Anyway, this is a great conversation, thank you all.

Jacopo


Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Jacopo Cappellato
Hi Denis,

welcome! Please see inline:

On Sat, Jan 7, 2017 at 9:37 AM, Denis Bredelet  wrote:

> I am thinking of contributing a very simple UI for FreeMarker. Something
> able to read a single template and process it with a datamodel pulled from
> various sources (user interface window, properties file, XML file…)
>
> Would that be useful and help with advertising FreeMarker?
>

Definitely! Please see the thread "About a Freemarker template evaluator
service" in which we are discussing to setup an official project virtual
machine to provide this online service to our users.


>
> I have some code to use as a starting point on my website:
> http://bredelet.com/Denis/FreeMarker%20first%20steps.html
>
> Maybe this could come as a separate JAR to avoid loading UI classes
> unnecessarily.


We could figure out the technical details in the other thread.

Cheers,

Jacopo


Re: Using Social Media to Help Promote Freemarker

2017-01-07 Thread Denis Bredelet
Hi Daniel,

>> That was also my impression on the OFBiz tweet, as a software
>> developer. The last is important, that I'm looking at it as a
>> developer. FreeMarker, unless OFBiz, is mostly only interesting for
>> them I believe. It doesn't have an UI that a manager type could click
>> around. It's not a complete end-user product, it's Java library used
>> internally by other products.

I am thinking of contributing a very simple UI for FreeMarker. Something able 
to read a single template and process it with a datamodel pulled from various 
sources (user interface window, properties file, XML file…)

Would that be useful and help with advertising FreeMarker?

I have some code to use as a starting point on my website:
http://bredelet.com/Denis/FreeMarker%20first%20steps.html

Maybe this could come as a separate JAR to avoid loading UI classes 
unnecessarily.

Cheers,
— Denis.

Re: Using Social Media to Help Promote Freemarker

2017-01-06 Thread Sharan Foga



On 05/01/17 21:16, Daniel Dekany wrote:

Thursday, January 5, 2017, 8:20:08 PM, Sharan Foga wrote:

[snip]

One thing that could help is to follow the ASF accounts and
re-tweet some of the main ASF ones. For example they have a weekly
news update. Doing things like this will help strengthen the Apache link of the 
project.

I don't get this one. If someone is subscribed to the seed of
freemarker, won't (s)he be annoyed if he gets news about ASF that has
nothing to do with FreeMarker? (Yes, it's related because FreeMarker
is at Apache, but you see... it's not helpful for the subscriber.)


I suppose it all depends on who the subscribers are and what you want to 
use the account for. I see Twitter as a potential way to attract new 
people to the project so by limiting the information to existing people 
that are already involved may not make it seem very welcoming for newcomers.


My thoughts on the Apache association is mainly focussed on getting 
people to see a link to the Freemarker project and be interested enough 
to click it and find out more about it. Another option with Twitter is 
that if one of the existing followers / developers does something 
interesting then it can be shared. (BTW the committer how-to document 
would be a good topic for a tweet!)


In the end it is just a tool that can be used, it just needs to be 
tailored to fit whatever Freemarker wants to achieve for the project and 
community.




That was also my impression on the OFBiz tweet, as a software
developer. The last is important, that I'm looking at it as a
developer. FreeMarker, unless OFBiz, is mostly only interesting for
them I believe. It doesn't have an UI that a manager type could click
around. It's not a complete end-user product, it's Java library used
internally by other products.


Would you also be interested in blogging too on  https://blogs.apache.org/

An example from OFBiz is something like this

https://blogs.apache.org/ofbiz/entry/apache_ofbiz_news_december_2016

Do you mean that the blog would be a monthly news digest mostly?


Yes it could be a monthly news digest or a technical summary of the work 
done. Publishing a blog or being active on Twitter shows a wider 
audience that the project is alive and active, and we can always 
included links to the mailing lists or wiki.


Anyway - we could maybe look at trying to do something over a short 
timeframe  (like a POC) to see how it works... :-)   What do people think?


Thanks
Sharan


Thanks
Sharan


All in all, it would be nice to make some good noise about FreeMarker :-)

Jacopo

[*] https://twitter.com/freemarker





Re: Using Social Media to Help Promote Freemarker

2017-01-05 Thread Daniel Dekany
Thursday, January 5, 2017, 8:20:08 PM, Sharan Foga wrote:

[snip]
> One thing that could help is to follow the ASF accounts and
> re-tweet some of the main ASF ones. For example they have a weekly
> news update. Doing things like this will help strengthen the Apache link of 
> the project.

I don't get this one. If someone is subscribed to the seed of
freemarker, won't (s)he be annoyed if he gets news about ASF that has
nothing to do with FreeMarker? (Yes, it's related because FreeMarker
is at Apache, but you see... it's not helpful for the subscriber.)

That was also my impression on the OFBiz tweet, as a software
developer. The last is important, that I'm looking at it as a
developer. FreeMarker, unless OFBiz, is mostly only interesting for
them I believe. It doesn't have an UI that a manager type could click
around. It's not a complete end-user product, it's Java library used
internally by other products.

> Would you also be interested in blogging too on  https://blogs.apache.org/
>
> An example from OFBiz is something like this
>
> https://blogs.apache.org/ofbiz/entry/apache_ofbiz_news_december_2016

Do you mean that the blog would be a monthly news digest mostly?

> Thanks
> Sharan
>
>> All in all, it would be nice to make some good noise about FreeMarker :-)
>>
>> Jacopo
>> 
>> [*] https://twitter.com/freemarker
>> 
>

-- 
Thanks,
 Daniel Dekany



Re: Using Social Media to Help Promote Freemarker

2017-01-05 Thread Daniel Dekany
Thursday, January 5, 2017, 6:58:40 PM, Jacopo Cappellato wrote:

> On Thu, Jan 5, 2017 at 6:36 PM, Daniel Dekany  wrote:
> Hi,
[snip]
> Maybe what we could do is the following:
> 1) Daniel: do you have access to this account [*]? Or do you know
> who could own it? The first step would be to gain access to it

I do have access to that.

> 2) Sharan: maybe you could propose some tweets to this list and
> then, after community approval, post them there? and maybe, after
> the first satisfying ones, you could post them directly and we will
> review them and fine tune our messages over time?

Maybe... Note that https://twitter.com/freemarker is currently used as
a low noise announcement channel. Like a replacement of the now
deprecated freemarker-annou...@sourcefirge.net. The 279 subscribers
are certainly mostly people who are already very much aware of the
existence and features of FreeMarker. So I guess making noise there
will be only efficient if it for some reason it spreads over to other
social "channels" (via retweets or whatever). Well, certainly I have
just stated the obvious, in the eyes of those who used to utilize
social media, but whatever... (:

> All in all, it would be nice to make some good noise about FreeMarker
>
> Jacopo
>
> [*] https://twitter.com/freemarker

-- 
Thanks,
 Daniel Dekany



Re: Using Social Media to Help Promote Freemarker

2017-01-05 Thread Sharan Foga


On 2017-01-05 18:58 (+0100), Jacopo Cappellato  
wrote: 
> On Thu, Jan 5, 2017 at 6:36 PM, Daniel Dekany  wrote:
> 
> > Hi,
> >
> > First of all, thanks for the offer! We don't really have social media
> > presence (or other marking), so surely it would be helpful if we can
> > improve there. Now, I'm not a social media consumer, and I'm pretty
> > much only ever dealt with technical issues, so I'm quite frankly
> > clueless regarding the content.
> 
> 
> I totally understand what you mean :-) You and I are on the same page
> 
> Especially as it's a quite small
> > project, compared to something like OfBiz, there are fewer happenings
> > too, and they mostly just dry things like some technical stuff being
> > fixed. Actually, sometimes there's a new feature that can be
> > interesting technically, and perhaps someone could post something like
> > a mini article about that, somewhere. Other than that... any ideas,
> > directions?
> >

At OFBiz we put together some Social Media guidelines 

https://cwiki.apache.org/confluence/display/OFBIZ/Guidelines+for+Use+of+Social+Media

and something for Twitter

https://cwiki.apache.org/confluence/display/OFBIZ/Twitter

Not sure if these might be a bit too much, but the main thing is to have an 
idea of the type of information you are wanting to share. It also helps others 
from the community who want to tweet about the project.

> 
> I had the same concerns with OFBiz but then... Sharan came and the activity
> became more interesting!
> Maybe what we could do is the following:
> 1) Daniel: do you have access to this account [*]? Or do you know who could
> own it? The first step would be to gain access to it
> 2) Sharan: maybe you could propose some tweets to this list and then, after
> community approval, post them there? and maybe, after the first satisfying
> ones, you could post them directly and we will review them and fine tune
> our messages over time?
> 

Yes I can do that. 

One thing that could help is to follow the ASF accounts and re-tweet some of 
the main ASF ones. For example they have a weekly news update. Doing things 
like this will help strengthen the Apache link of the project.

Would you also be interested in blogging too on  https://blogs.apache.org/

An example from OFBiz is something like this

https://blogs.apache.org/ofbiz/entry/apache_ofbiz_news_december_2016

Thanks
Sharan

> All in all, it would be nice to make some good noise about FreeMarker :-)
>
> Jacopo
> 
> [*] https://twitter.com/freemarker
> 


Re: Using Social Media to Help Promote Freemarker

2017-01-05 Thread Jacopo Cappellato
On Thu, Jan 5, 2017 at 6:36 PM, Daniel Dekany  wrote:

> Hi,
>
> First of all, thanks for the offer! We don't really have social media
> presence (or other marking), so surely it would be helpful if we can
> improve there. Now, I'm not a social media consumer, and I'm pretty
> much only ever dealt with technical issues, so I'm quite frankly
> clueless regarding the content.


I totally understand what you mean :-) You and I are on the same page

Especially as it's a quite small
> project, compared to something like OfBiz, there are fewer happenings
> too, and they mostly just dry things like some technical stuff being
> fixed. Actually, sometimes there's a new feature that can be
> interesting technically, and perhaps someone could post something like
> a mini article about that, somewhere. Other than that... any ideas,
> directions?
>

I had the same concerns with OFBiz but then... Sharan came and the activity
became more interesting!
Maybe what we could do is the following:
1) Daniel: do you have access to this account [*]? Or do you know who could
own it? The first step would be to gain access to it
2) Sharan: maybe you could propose some tweets to this list and then, after
community approval, post them there? and maybe, after the first satisfying
ones, you could post them directly and we will review them and fine tune
our messages over time?

All in all, it would be nice to make some good noise about FreeMarker :-)

Jacopo

[*] https://twitter.com/freemarker


Re: Using Social Media to Help Promote Freemarker

2017-01-05 Thread Daniel Dekany
Hi,

First of all, thanks for the offer! We don't really have social media
presence (or other marking), so surely it would be helpful if we can
improve there. Now, I'm not a social media consumer, and I'm pretty
much only ever dealt with technical issues, so I'm quite frankly
clueless regarding the content. Especially as it's a quite small
project, compared to something like OfBiz, there are fewer happenings
too, and they mostly just dry things like some technical stuff being
fixed. Actually, sometimes there's a new feature that can be
interesting technically, and perhaps someone could post something like
a mini article about that, somewhere. Other than that... any ideas,
directions?


Thursday, January 5, 2017, 11:57:35 AM, Sharan Foga wrote:

> Hi All
>
> I'm involved with Apache Community Development and wanted to see if
> your project needed any help getting started with things such as
> social media marketing that might help grow the community. For
> example using the ASF blogs or twitter to promote what is happening
> in the project, the ASF and any related technologies.
>
> Many of our projects already make use of these tools to raise their
> project awareness to wider audiences.
>
> Anyway please let me know if you are interested, and if so then I'm happy to 
> help.
>
> Thanks
> Sharan
>

-- 
Thanks,
 Daniel Dekany



Re: Using Social Media to Help Promote Freemarker

2017-01-05 Thread Jacopo Cappellato
On Thu, Jan 5, 2017 at 11:57 AM, Sharan Foga  wrote:

> Hi All
>
> I'm involved with Apache Community Development and wanted to see if your
> project needed any help getting started with things such as social media
> marketing that might help grow the community. For example using the ASF
> blogs or twitter to promote what is happening in the project, the ASF and
> any related technologies.
>
> Many of our projects already make use of these tools to raise their
> project awareness to wider audiences.
>
> Anyway please let me know if you are interested, and if so then I'm happy
> to help.
>
> Thanks
> Sharan
>

I would like to add that Sharan is also a member of the OFBiz PMC and is
also helping to manage the OFBiz project's official Twitter account.
Nice to see you here Sharan!

Jacopo


Using Social Media to Help Promote Freemarker

2017-01-05 Thread Sharan Foga
Hi All

I'm involved with Apache Community Development and wanted to see if your 
project needed any help getting started with things such as social media 
marketing that might help grow the community. For example using the ASF blogs 
or twitter to promote what is happening in the project, the ASF and any related 
technologies.

Many of our projects already make use of these tools to raise their project 
awareness to wider audiences.

Anyway please let me know if you are interested, and if so then I'm happy to 
help.

Thanks
Sharan