• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What kinda Template Engine Groovy Uses?

 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Venkat,

In the examples listed here, it looks like a *template engine* is in built, through the place holders with "${}".

What kinda template engine it uses? Like Freemarker, velocity etc., or of its own? If its of its own, to what extent is is unique and beneficial than others?

Thanks,
Raghavan alias Saravanan M.
 
Author
Posts: 135
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raghavan, the Groovy compiler breaks your string with expressions to construct the GString object. Once it breaks the expression into parts, it sends the appropriate parameters to the GString's constructor. How the Groovy compiler breaks the expression is an implementation detail that I am not capable of answering.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's nice to hear Venkat. Thank you! But i thought it uses some template engine by first looking at the traditional syntax.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that the syntax has anything to do with with template engines. The ${} notation to refer to variables is quite popular in a number of different languages - Perl, Ant etc. pp. I'd assume that the notation then was also adopted by some template languages.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a good catch Ilja. I thought the otherway around and perhaps it might be because of the impact/illusion those tools created!

Thank you!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic