It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

328 views 9 7
Join discussion

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