Announcement Announcement Module
Collapse
No announcement yet.
Code generation Architecture Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Code generation Architecture

    Hi,

    First of all, congratulations for this excellent project.

    After analyzing the add-ons included on Spring Roo it seems that it doesn't use templates for code generation, using a programatic approach.
    Am I right? Is there any special reason for that?

    We are going to develop a custom add-on and we would like to use Freemarker for code generation.

    Thanks,

    Roberto

  • #2
    Earlier versions of Roo used FreeMarker for source code generation. But if you look at the code, you'll find such a tiny percentage of the code generation related code is of a template nature, it just adds an extra layer of complexity and performance hit for very little value. If you look at say our EntityMetadata source code, you'll find usage of the InvocableMemberBodyBuilder (which would be the only area which is sufficiently template compatible to be a candidate for something like FreeMarker) it is a very small percentage of the overall class. The other consideration is we heavily use metadata concepts to allow intelligent and automatic modification of the resulting types, and templates are basically too crude to support this level of flexibility.

    Comment

    Working...
    X