Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,331,452
Community Members
 
Community Events
169
Community Groups

Which templates do you prefer "Velocity" or "SOY"?

As you know Confluence add-on may be built using "Velocity" (https://developer.atlassian.com/confdev/development-resources/confluence-architecture/confluence-internals/velocity-template-overview) or "SOY" (https://developer.atlassian.com/confdev/tutorials/writing-soy-templates-in-your-plugin) templates.
Which one do you prefer and why?
Which would you advise to use for a large project, built on the Confluence API?

1 comment

You won't usually have much choice. Generally:

  • The initial result of actions (xwork or webwork) is generally* displayed with Velocity,
  • Only SOY templates can be used for client-side rendering, for example in JS when you need to render a subset of the page. Note that SOY templates can also be used on the server-side, that is why they exist.

So, most plugins have both. If you do succeed to use SOY everywhere:

  • (+) You'll have only one template to teach your colleagues/employees,
  • (-) If you want to build a page that has similar features as one in the core of Confluence, you won't be able to start with copy-pasting the .vm code. You'll have to translate it into .soy, and it will be error-prone.
  • (-) I don't know what is the performance of server-side rendering of Soy and Velocity, but I don't suspect you can do better than Velocity.

So... most plugins keep both templates.

*although it seems you can display the result of an action using Soy, according to this excerpt from the source of Confluence:

<result name="success" type="soy">
<param name="location">confluence.web.resources:auditlog/Confluence.Templates.Auditing.Page.auditLogPage</param>
</result>

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Confluence

Collaboratory Video Series: Confluence Your Way

Hey there, collaborators! We're continuing on with Work and Wellness with a special video series focused on team connection and collaboration, wherever and whenever.  Introducing Confluence ...

150 views 2 10
Read article

Atlassian Community Events