[Solar-talk] Architecture question
Rodrigo Moraes
rodrigo.moraes at gmail.com
Sat Sep 30 22:09:47 PDT 2006
On 10/1/06, Travis Swicegood <development at domain51.com> wrote:
> Ok, that's long enough for a Saturday night. I'm a bit bored in case
> you didn't notice :-)
I like your suggestions about the submit method, but since it's
Saturday night, I'll just add one more question about the Bookmarks
actionAdd() method. I've been taking the approach to never have
two-of-the-same forms in my apps, and merging add() and edit() methods
in one, and the add would be a edit($id = 0) without parameter in this
approach. Commonly I would have something like:
public function actionAdd() {
$this->edit();
}
And of course take on count particular definitions for each method
(texts and special checkings). This avoids duplication of form
building / processing, or at least puts all the stuff in just one
place, making maintenance easier. Bad idea?
rodrigo
More information about the solar-talk
mailing list