Results 1 to 2 of 2

Thread: Code generation Architecture

  1. #1

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •