Wednesday, February 27, 2013, 12:07:00 PM, Jacques Le Roux wrote:

> Hi Daniel,
>
> When I think about Freemarker, it's just the perfect tool to me
> when it comes to generate conditional HTML code (I mostly use it in
> this context). I never missed anything but a tool to format the code.
> There are some Freemarker Eclipse plugins around, but none of them
> is able to format the code.

Surely improving IDE plugins is at least as important as improving
FreeMarker itself... or if someone just have basic templates (no fancy
macro libraries and such), it's actually much more important. I won't
be able to work on IDE plugins in this cycle though.

> And anyway there are more to this than
> IDE usage. For instance, templates can be used in the context of a CMS.
>
> So what I would really enjoy would be :
> 1) A consensus on how to format the code, where 2 spaces would be
> used for indentation spacing.

(You should use the same indentation size for FTL tags as for the
generated code. Like, in Java templates you use 4, but in HTML
templates 2.)

> Some proposed to format the FTL code
> independently of the generated code (HTML in my, and motstly OFBiz
> OOTB, case). I would prefer to indent both at the same time but to
> also generate the (HTML) code  formatted independently of the
> freemarker file content. I can give an example if necessary...

Do you mean things like:

  foo
  <#if ...>
    bar
  </#if>
  baaz

should output

  foo
  bar
  baaz

instead of

  foo
    bar
  baaz

? Then I think that should be done by FreeMarker itself when it loads
the templates. (Although this becomes lot more tricky if you consider
macro calls... then it has to be done partially on runtime.)

> 2) This would be an independent tool (class or package, maybe a
> lib) usable in many circumstances, IDE plugins being the one coming instantly 
> to mind

I plan (just a plan...) to write an FTL 2.3->2.4 (or -> 3.0?)
conversion tool, because I want to deprecate or even ban some
historical FTL baggage when FreeMarker is not used in
2.3.0-compatible-mode (no worries, 2.3.0-compatible will be the
default). Maybe it will be a good place to add re-indentation logic to
later.

> Thanks for asking
>
> Jacques
>
>
> From: "Daniel Dekany" <ddek...@freemail.hu>
>> Monday, February 25, 2013, 5:51:24 PM, Jacopo Cappellato wrote:
>> 
>>> Hi Daniel,
>>>
>>> thanks for contacting us and for your efforts in improving Freemarker.
>>> Freemarker is indeed important for OFBiz because it is the primary
>>> template engine and we have several screens implemented with it.
>>>
>>> One of the tickets I would love to see resolved is this:
>>>
>>> https://sourceforge.net/tracker/index.php?func=detail&aid=3527625&group_id=794&atid=100794
>> 
>> Sure, that's #2 on the 2.3.20 TODO list, and 2.3.20 comes before
>> whatever other more ambitious developments.
>> 
>> Here, I mostly wanted to hear about any FreeMarker related "itches".
>> Like annoyances that you have to go through again and again, or some
>> features you wish it had.
>> 
>> -- 
>> Thanks,
>> Daniel Dekany
>> 
>>> In fact we are currently using in OFBiz a modified version of
>>> Freemarker jar to integrate this feature.
>>>
>>> I will try to keep an eye on the Freemarker forums and activities
>>> and I will try to offer my help if I see areas where I could help;
>>> of course feel free to contact us for help on specific tasks too, we
>>> will do our best to support your efforts.
>>>
>>> Kind regards,
>>>
>>> Jacopo
>>>
>>> On Feb 23, 2013, at 12:37 PM, Daniel Dekany wrote:
>>>
>>>> Hello,
>>>> 
>>>> I'm the main maintainer of the FreeMarker template engine over the
>>>> last few years. I plan to allocate serious amount of time[*] for
>>>> FreeMarker development in the near future, at least if I perceive that
>>>> there's enough interest in the developer community (of OfBiz, Struts,
>>>> Alfresco, Magnolia, etc). The goal of this effort is fixing
>>>> long-standing issues (mostly design issues that can be addressed
>>>> without breaking backward compatibility), adding frequently requested
>>>> missing features, increasing usability (better error messages, better
>>>> documentation) and to make FreeMarker more accessible for potential
>>>> contributors (fixing the branching mess, switching to Maven, Git,
>>>> modularization, addressing licensing and CLA issues).
>>>> 
>>>> Thus, I would like to hear about the wishes of the OFBiz developers.
>>>> What features you crave for the most, how could FreeMarker integrate
>>>> better with your product, what are the things your users most often
>>>> has problems with, etc.
>>>> 
>>>> *: I'm thinking about 300 hours or so, done within a 2-3 months
>>>>   period, but it depends on the feedback. This I plan to do for free.
>>>>   If FreeMarker is an important component in your ecosystem, and you
>>>>   think you can support this effort in some ways, of course, contact
>>>>   me.
>>>> 
>>>> -- 
>>>> Thanks,
>>>> Daniel Dekany

-- 
Thanks,
 Daniel Dekany

Reply via email to