Open Bug 524009 (bz-controller) Opened 15 years ago Updated 12 years ago

Move all .cgi code into Controller modules

Categories

(Bugzilla :: Bugzilla-General, enhancement, P4)

enhancement

Tracking

()

People

(Reporter: mkanat, Unassigned)

References

(Blocks 1 open bug)

Details

To prepare us to move into a real web framework, and to possibly allow a lot more flexible things in the future, *all* the code that is currently in *.cgi files should be moved into modules, and then .cgi files can just call a run() method on those modules.

The modules would be in the Bugzilla::Controller namespace, and would be a subclass of the main Bugzilla::Controller class.

Here's an example of what index.cgi would look like:

use strict;
use Bugzilla;
use Bugzilla::Controller::Index;
Bugzilla::Controller::Index::run();

In certain circumstances a controller would have more methods. For example, for Bugzilla::Controller::Bug, there would be a view(), update(), and create() controller (which would be show_bug, process_bug, and post_bug, respectively).

The naming of the controller modules is up for discussion.

This is a long-term project. It's not going to happen for Bugzilla 3.6.
Alias: bz-controller
Priority: -- → P2
Do you have documentation on how the web framework would work, its advantages (maintaince, performance) and disavantages over what we have now? IMO, that's not P2. We have much more refactoring to do first before implementing this.
(In reply to comment #1)
> Do you have documentation on how the web framework would work, its advantages
> (maintaince, performance) and disavantages over what we have now? IMO, that's
> not P2.

  Catalyst is a good example. I think we already discussed it on the developers@ list, otherwise I'd go over the advantages and disadvantages now.

> We have much more refactoring to do first before implementing this.

  Mmm, actually, this could be done simultaneously, because it's basically just moving code, with very little refactoring.
Priority: P2 → P4
You need to log in before you can comment on or make changes to this bug.