Re: Anybody with deeper OSGi bundle can comment on freemarker.jar OSGification?

Angelo zerr <[email protected]> Mon, 3 Jun 2013 01:21:04 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <CAKLdLg8mLMg8Go05KeBNH_ZRVh8PcPtKEuAtkm-=MrN-zUR5Kg@mail.gmail.com>
Hi everybody,

@Daniel : for OSGi topic, it seems your bnd is good. We use Freemarker with
XDocReport <https://code.google.com/p/xdocreport/> which is Java reporting
tool (you design your report with MS Word or OpenOffice and you use
Velocity/Freemarker syntax to replace simple, list value) and generate docx
or odt report (and convert it with PDF or XHTML) (Daniel, you can add
XDocReport to the Powered By if you are agree, thank's!). We have an Eclipse
RCP/RAP demo<http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.ui.application>(which
works on OSGi context) and in this demo we use the
com.springsource.freemarker bundles and the MANIFEST.MF looks like your
bnd.

It's out of scope of this post, but I think it should really cool if
Freemarker could be hosted on the central maven repository (like
springsource have done). Many project uses Maven (we use it in XDocReport)
and I could simply switch  to the "official" Freemarker dependency.

@Debugging feature : I think today Freemarker is very mature and stable,
but I think tooling about Freemarker misses. It exists a JBoss Freemarker
plugins but I think we can do better than this plugin like managing
debugger, preview, etc. I had started this work with Eclipse DLTK at
http://sourceforge.net/p/freemarker/code/HEAD/tree/sandbox/org.eclipse.dltk.freemarker/
You
can see doc at
http://sourceforge.net/p/freemarker/code/HEAD/tree/sandbox/org.eclipse.dltk.freemarker/docs/
and for debug I have used the Debugger Freemarker to manage DBGP protocol.

But I have gaven my work because of the Freemarker parser which is not
tolerant (it crashes as soon as it  finds an error). With editor context,
parser must be tolerant (to build an AST even if there are errors).

IMHO, I think Freemarker should be improved  for tools support like :

 * manage tolerant parser.
 * improve debugger (like DBGP debugger).

Regards Angelo


2013/5/31 Raymond Auge <[email protected]>

> Hey Daniel,
>
> Yes we use freemarker quite a lot in fact. You can do most all
> "templating" in Liferay in either Velocity or Freemarker.
>
> - theme (overall look and feel of the portal/site/page)
> - web content (your run-of-the-mill content templating)
> - DDM (run-time entity modelling + UI templating)
> - ADT (java entity UI templating, allows customizing normally static
> applications for java entities which implement the Liferay Asset APIs, i.e.
> most of all content-centric models in Liferay)
> - Workflow forms (workflow engine forms/UI)
>
> Now we are moving more and more to freemarker due to support for jsp
> taglibs of which we have many to make developers life easier and to
> automatically accommodate for concerns like behaviours, styling, and
> accessibility.
>
> Velocity is a lovely template engine and has dominated Liferay mostly
> 'till now. It's a slightly easier dialect for non-java programmers.
>
> However, we have supported freemarker for several years and as we move
> more toward standardized UI modelling we want to use more tags.
>
> Freemarker is the natural choice. (Note our template engine is entirely
> plugable which makes adding new template languages very simple).
>
> You may have noticed I have CC'd Greg Amerson who is our tooling guru, the
> same who is working on the freemarker debugging you have read about.
>
> @Greg, I'd like you to meet Daniel Dekany the lead developer of Freemarker.
>
> So, my thoughts on the needs of developers with respect to freemarker are
> honestly not so many :).
>
> In terms of language features/dialect I know of none at the moment which
> are jumping out at me.
>
> Perhaps as we rely more and more on it, performance will become more of a
> concern. This is not because Freemarker does not perform well. Simply our
> utilization is often so high that we have to do deep introspection into
> libraries we use to eke out every last drop of performance out of them.
>
> I can see our performance guy now (whom I've also CC'd, @Shuyang: Be
> gentle!). He may point at Freemarker in the future. But it would be
> preemptive to try to say if/where exactly any change might be required. At
> one point it might be interesting if Freemarker engine might take advantage
> of VM features like method handles and/or invokedynamic, perhaps it already
> does. We may be able to donate efforts toward performance optimizations if
> it comes down to it and you are amenable to accepting those.
>
> So, we come to debugging. Perhaps Greg could speak to that topic. Maybe he
> has ideas for improving the debugging support. Note he is currently
> residing in China so his feedback may be delayed.
>
> Finally, thanks for reaching out to us Daniel.
>
> Sincerely,
> - Ray
>
>
> On Fri, May 31, 2013 at 5:40 AM, Daniel Dekany <[email protected]>wrote:
>
>> Thanks for the feedback!
>>
>> BTW, it appears that Liferay is using FreeMarker quite a bit (and you
>> aren't one the Powered By page). I'm saying that because I saw you are
>> also working on FreeMarker debugging. So, I would be interested to
>> hear what features you (and your users) miss the most, what issues you
>> want to see fixed the most, etc. As things getting more active
>> nowadays, now is a good time to influence the future of FM. (Sometimes
>> there are things that are quite easy to fix in FreeMarker, only
>> framework authors had to report it instead of trying to work it around
>> alone.)
>>
>>
>> Monday, May 27, 2013, 4:09:56 PM, Raymond Auge wrote:
>>
>> > This looks really good.
>> >
>> > I have not tested it, but after a cursory look I don't see any issues.
>> >
>> > - Ray
>> >
>> >
>> > On Tue, May 21, 2013 at 6:01 AM, Daniel Dekany <[email protected]>
>> wrote:
>> > Starting from 2.3.20 freemarker.jar will be an OSGi bundle, however
>> > I'm not an OSGi expert at all. So if you can comment on this, that
>> > would be great:
>> >
>> > https://github.com/freemarker/freemarker/blob/master/osgi.bnd
>> >
>> > The resulting MANIFEST.MF is attached to this mail.
>> >
>> > --
>> > Thank you,
>> >  Daniel Dekany
>> >
>> ------------------------------------------------------------------------------
>> > Try New Relic Now & We'll Send You this Cool Shirt
>> > New Relic is the only SaaS-based application performance monitoring
>> service
>> > that delivers powerful full stack analytics. Optimize and monitor your
>> > browser, app, & servers with just a few lines of code. Try New Relic
>> > and get this awesome Nerd Life shirt!
>> > http://p.sf.net/sfu/newrelic_d2d_may
>> > _______________________________________________
>> > FreeMarker-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>> >
>> >
>> >
>> >
>>
>> --
>> Thanks,
>>  Daniel Dekany
>>
>>
>
>
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect
> *Liferay, Inc.* <http://www.liferay.com> (@Liferay)
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
> _______________________________________________
> FreeMarker-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>
>

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2

_______________________________________________
FreeMarker-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel