Project

General

Profile

Refactoring #2809

FrontController refactoring, OO-ify response and request

Added by Anonymous over 8 years ago. Updated about 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
11/02/2011
Due date:
% Done:

0%

Estimated time:

Description

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 :

https://docs.google.com/document/pub?id=1ARqbH0fcyNrAMCZQ9d9ssrgjGnOYJJKmYXP4et7xkiI

History

#1

Updated by Goulwen Reboux over 8 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:

http://symfony.com/doc/2.0/book/from_flat_php_to_symfony2.html

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:

http://symfony.com/doc/2.0/book/templating.html

#2

Updated by Stefaan Vanbillemont over 8 years ago

  • Project changed from Chamilo LCMS Connect to Repository
  • Category deleted (21)
#3

Updated by Anonymous over 8 years ago

  • Project changed from Repository to Common
#4

Updated by Stefaan Vanbillemont over 8 years ago

  • Target version set to 2.1.0
#5

Updated by Stefaan Vanbillemont over 8 years ago

  • Target version changed from 2.1.0 to 31
#6

Updated by Stefaan Vanbillemont about 8 years ago

  • Target version changed from 31 to Backlog (default)

Also available in: Atom PDF