Updating / switch templating system from old dwoo

Bug #966001 reported by François Marier
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Given that Dwoo is mostly unmaintained now:


we should consider switching to Twig:


Changed in mahara:
assignee: nobody → Christopher Tombleson (christopher-k)
Changed in mahara:
status: Triaged → In Progress
Changed in mahara:
milestone: none → 1.7.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.7.0 → 1.8.0
Revision history for this message
Christopher Tombleson (christopher-k) wrote :

Let me know if any extra work needs to be done on this.
I will try to find some spare time :)

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Changed in mahara:
milestone: 1.8.0 → none
Revision history for this message
Robert Lyon (robertl-9) wrote :

The real question would be if we are to switch away from Dwoo - what would be the best option to switch to?

Things to consider would be:
1) The quality / robustness of the templating system we will be switching to
2) How easy / hard it will be to convert what we have to what we want
3) How compatible will it be with 3rd party plugins, and how easy will it be for 3rd parties to update their plugins.
4) What learning curve will be needed to learn the new templating system (for developers / designers / 3rd party)
5) How popular the new system is (will be around / maintained / updated in future)

Twig does look to be a good choice to cover points 1, 4, and 5
But something like Smarty v3 could be a better fit for all the above options.

From what I've read on forums the Twig templating system does run slightly faster in simple unit tests. However that may not be the case with the complexity of Mahara.

Then I've read that smarty3 can perform better than twig on certain unit tests - so who knows :)

With Smarty 3.1, it is a departure from 2.0 compatibility. Most notably, all
backward compatibility has been moved to a separate class file named
SmartyBC.class.php. If you require compatibility with 2.0, you will
need to use this class.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

abandonded patches for the moment since we aren't going to change anything for 1.9:


Changed in mahara:
status: In Progress → Confirmed
Revision history for this message
Aaron Wells (u-aaronw) wrote :

As I'm sure we're all aware, the problem with changing the template system is that it'll require a huge amount of work, and it'll offer practically no tangible benefits to front-end users.

Whenever we decide to move forward on a template engine replacement (and we should eventually, because Dwoo is dead), we'll need to decide between Twig, Smarty, or something else. Currently, the way I see it is that Smarty has the advantage that it's closer to Dwoo, so it'll probably be less work to adapt our codebase and documentation. Twig has the advantage that it's more attractive to developers, being newer, trendier, and used by Drupal.

But web frameworks evolve pretty fast, so we'll probably need to review the issue at the time we decide to pick up the change again.

Revision history for this message
Robert Lyon (robertl-9) wrote :

A patch for updating dwoo to latest stable has been provided

But even this is on the old side - there is a Dwoo 2.0beta but progress on it seems quite slow

Smarty on the other hand seems to regular bug fixes updates - latest is Smarty 3.1.20 Oct 9th, 2014

So part of the decision to change template engine would be how quickly bug fixes get released to the community.

summary: - Switch templating system from dwoo to twig
+ Updating / switch templating system from old dwoo
Changed in mahara:
assignee: Christopher Tombleson (christopher-k) → nobody
Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 1.11.0
Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :


When I added a page to a collection (not via drag and drop just by clicking the checkbox and button) it gave me a full page of errors.

Psql 9.3.5
Ubuntu 14.0.4
Firefox 35.0.1


Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3675
Committed: http://gitorious.org/mahara/mahara/commit/05171acd314d3e9a1c2b77cbf762609cf31189fa
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 05171acd314d3e9a1c2b77cbf762609cf31189fa
Author: Yuliya Bozhko <email address hidden>
Date: Mon Sep 1 11:31:41 2014 +1200

Update Dwoo to version 1.2.0 (Bug #966001)

Change-Id: I56747b80bf6fac21d968d0f7ecf214dcf2ce5e6c
Signed-off-by: Yuliya Bozhko <email address hidden>

Changed in mahara:
milestone: 15.04.0 → 15.10.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 15.10.0 → 16.04.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 16.04.0 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers