Skepticats Tracker
LnBlog
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
task_small.png
icon_project.png LnBlog / Open Task #17 Proper controller framework
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Issue basics
  • Type of issue
    Task
  • Category
    Not determined
  • Targetted for
    Not determined
  • Status
    New
  • Progress
  • Priority
    Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
  • Time spent
    No time spent
    Click here to see time logged against this issue
Issue details
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
This disorganized collection of server pages isn't doing it. We need a controller framework of some sort. Doesn't need to be fancy, just has to be able to dispatch requests to class methods rather than having a huge nest of code in the global scope.

Requirements:
1) Front controller or dispatching pages (requests should not go directly to the controller file) with routing to controllers based on the URI. This could be convention-based or via a route table, or a combination.
2) Some form of parameter abstraction, so no need to directly access $_GET and $_POST.
3) A standard "redisplay with error" feature. This will probably need to consist of some controller features and some view/template features. The idea is that there should be a standard way to redisplay a form/page and inject an error message into it, preferably with as little extra code as possible.
4) A way to control the response type would be nice. For example, a query string parameter that tells the controller to treat a request as an AJAX call rather than a full page load.
5) Some sort of validation framework would be nice. Maybe a declarative way to validate form parameters and return appropriate error messages.