Hi,

I have made my model system as:
Model, Model_DbTable, Model_DbTable_Row etc...

I have always declared by models in controller, but MVC seems
to "allow" View to command models also?
I also try to live by the "Fat models, thin controllers" rule...

So I made following:

<select name="faculty" id="faculty">
        
        <option value="">-- Filter by Faculty --</option>
        <?php $model = new Material_Model_Faculty(); foreach ($model->getAll() 
as
$faculty): ?>
        <option value="<?= $this->url(array("faculty" => $faculty->id),
"materials") ?>"><?= $faculty->name ?></option>
        <?php endforeach; ?>
                
</select>



This is kinda "religious" question, I know... =)
But this approach gives me very flexible developing...

br, Marko
-- 
View this message in context: 
http://www.nabble.com/MVC---Model-in-View-tp22904523p22904523.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to