Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
~GSoC2010: Martin Richard's code refactoring
The main goal of this proposal is to perform some code refactoring in order to enhance the area of consistency of the application design, user interface and front-end code.
Note : Actually, I was one hour late to submit my application, I won’t be into gsoc this year !
The project is divided is several tasks, described in the following paragraphs.
Document the code
I think that this is the first task to accomplish : write comments for the classes, methods and functions using a php-doc syntax. This long task will help me to understand the application organization, and will help future contributors and plug-ins writers.
SQL queries with prepared statementRe-writre
I will replace the mysql database layer and “classic” mysql_query() with prepared statements using mysqli or PDO.
This point is discussed on the following thread
Write unit, functional and regression tests
Automated tests don’t fully cover all the Thinktank functionalities. I’ll check existing tests, identify non-tested code and write as many tests as possible.
If i’ve some more time…
In order to ease the integration of new plug-ins and new user views, the templates should be standardized and organized.
Most of the code fragments that may be reused into several plug-ins or pages (standardized graphic components such as notices/error messages) will be displayed through helpers.
Currently, some CSS styles aren’t fully written or sometimes buggy. For instance, there are some margin problems with lists in the configuration views, and message/error styles aren’t defined. The first step of this task is to list and sort needed enhancements into the interface.
1. The first step consists in exploring and understanding the code, then write documentation (between 6 weeks and 2 months)
2. Update the code for prepared statements (7 top 10 days)
3. Write unit and functional tests & remove small commented tests (ie echo $var) in the code (1 month)