When comparing Liquid vs Fortitude, the Slant community recommends Liquid for most people. In the question“What are the best Ruby templating languages?” Liquid is ranked 4th while Fortitude is ranked 5th. The most important reason people chose Liquid is:
Liquid allows developers to create a clear distinction between the presentation and application layer.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Clear distinction between presentation and application
Liquid allows developers to create a clear distinction between the presentation and application layer.
Pro Secure
Liquid templates are secure out of the box. They can be used for applications where users can edit the appearance without allowing them to run any server-side code. Liquid does just that without any needed configuration.
Pro Encourages clean design through SRP
One development pattern used frequently is to create a "high-level" widget rendering a group of HTML tags, attribute values, and content to support a single use case, then decomposing that into domain-relevant smaller widgets ("nav bar", "user menu", etc), which in turn would be decomposed into smaller widgets, This eventually leaves you with a set of "leaf node" classes encapsulating a single tag with specific attributes and content rules; "helper" widget classes that encapsulate commonly-used configurations of the leaf widgets, with possibly multiple widgets increasing in scope up to an entire page-level widget.
This also encourages the use of composition over inheritance; while each widget class must subclass a Fortitude (or Fortitude-derived) base class, the use of inheritance in your own widgets will tend to be quite rare. Typically, this will shout at the maintainer, "I'm a variation on Widget X", resulting in widgets that are by and large loosely coupled and highly cohesive.
Pro Encourages business-domain-fluent class usage
Fortitude widgets can either encapsulate a single HTML tag, appropriate (and validated) values for attributes, and content, or they can compose multiple such widgets as a single, domain-language-friendly unit; for example, "navigation menu", which might involve a container div, a list, and list items confirming to various formats (for actions, separators, etc). This is textbook use of the interface-segregation principle.
Pro No paradigm shift between views and any other part of your app
Fortitude implements "widgets"; Ruby objects that encapsulate one or more HTML tags, with additional support for the view/app as a whole. By virtue of being Ruby classes, these widgets can use all the techniques used in any other Ruby objects in your app (composition, inheritance, etc), making it easy to develop working code rapidly.
Cons
Con Boolean algebra has some issues
Liquid has some known issues with boolean algebra when it comes to some advanced expressions.
Liquid::Template.parse("{% if false and false or true %} foo {% endif %}").render
# => ""
false and false or true
# => true
It seems that Liquid simply parses from left to right, and if it finds a false and X
it immediately returns false.
Con Still young
Fortitude is still a relatively young project. Being still in beta release it hasn't been documented fully and may still have bugs even though it's tested extensively.