View Single Post
Old 03-31-2009, 08:31 PM   #29 (permalink)
ETbyrne
how quixotic are you?
 
ETbyrne's Avatar
 
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
ETbyrne is on a distinguished road
Default

Quote:
Yes. What about things which shouldn't be in the model but might be necessary when invoking an editing page? Authorising the current user, validation of the supplied input data, routing different scenarios through to different views, etc.. Is that all to be done in the model?
I usually use auto-loaded helpers for repetitious tasks like authorizing the current user, validations, ect...

Quote:
Very good to hear that you're planning on allowing more dynamic routing! cookie::get is only a helper, it can call Dingo::cookie if you really want it to. Without it, the API just seems unbalanced.
I suppose I could, it can't really hurt.

I was just looking at namespaces in PHP 5.3 and was very, very, very impressed! I think I'll be restructuring the framework to use them sometime soon! I want to change it so that libraries use namespaces instead of loading a class into the $this->dingo object. For example running a MySQLi query would look like this:

Code:
dingo\mysqli->query($sql);
Instead of

PHP Code:
$this->dingo->mysqli->query($sql); 
I think that's right... Btw I used the CODE BBcode block for the first piece of code because the PHP one doesn't like my backslash...
__________________
Dingo Web Systems > http://www.dingocode.com
My Website > http://www.evanbot.com
ETbyrne is offline  
Reply With Quote