FrontController refactoring, OO-ify response and request
Currently the architecture of chamilo uses lot of global calls ( echo / header / die / ... ) and global state (static stuff, superglobals, ... ) which is a pain when automatic testing the application and a big flaw in the design preventing us to bring new functionalities.
It would be great if we had a single entrypoint of the application allowing chamilo to be driven by a webserver or by another piece of code. it would also be great if the response produced by chamilo to a request could be in different format (html / JSON / objects) allowing different kind of clients (Browser, Webservices, JS calls, Automatic tests).
Here is a document explaining the problem and proposing different criteria to consider this refactoring as done :
Updated by Goulwen Reboux about 11 years ago
I really like the way symfony2 has evolve about handling Request and Response. It's in fact the paradigm by django a few years ago ("take a request, return a response")
Here's an explanation about how to go from plain PHP to Symfony2 Request/Response objects:
About the view, I think it will be great to have a templating system so it will be easier to customize the layout.
Symfony also have a nice templating lib, Twig, which is also stolen from django: