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,295,774
Community Members
 
Community Events
165
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

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

956 views 15 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you