< Upcoming TrainOnline LMS Release
14.04.2010 10:55 Alter: 2 Jahre
Rubrik: Development
Von: Christopher Schnell

Refactoring still going on

As it is our goal with the new release of TrainOnline LMS to build the most rock solid version of it, the refactoring went on this week. As as sideeffect, we marked the 800th changeset of the application.


The first days of this week, I have only been working on refactoring the symfony form classes. Main focus was on classes that appear on several modules or actions. I divided them completely. Now they are very easy to maintain.

There were also several issues with the old way of unsetting widgets. In symfony 1.2, you had to unset every widget manually like 

unset($this->widgetSchema['xyz']);

which lead to large lists of unset calls. Once, a new database field was added, you had to think of unsetting it, too. As this is certainly not best practice, I started using the new way of "using" fields instead of unsetting them. Now, instead of a huge list, I can simply call

$this->useFields(array('xyz','abc','foo','bar'));

and don't have ever to think again of unsetting any new fields. That's why we like to use symfony :-)