I'm not worried as such... but my problem is the flexability of it all.
Don't get me wrong, thats one of the best features of the Zend Framework,
integrating any subsystems I design using ZF into my legacy system will be
incredibly easy compared to the vast majority of other frameworks available
(cakePHP, symfony etc etc).
I was just trying to clarify that the comprehensive tutorial I was following
was not adhering to MVC, and as such I shouldn't use the examples in the
tutorial as a basis for future development since all of the domain logic was
shoved in the controller.
I gather that by quoting 'MVC is simply a matter of keeping the domain,
application and view logic in separate layers' then you agree with my post.
i.e. the controller should not contain any validation or database
interaction since this is domain logic. And the controllers main purpose is
to invoke methods on a the model based on input from the view.
I understand the principle of MVC... it is a design pattern. Therefore from
my point of view its a moot point to say that ZF is not a strict MVC
framework since the strictness comes from your own design. I just wanted to
make sure that my take on it was correct so that I can enforce this
strictness.
I don't agree with your point that ' we clearly can't discuss about Model
when we don't have ORM
functionality yet to put domain logic into'.
Although ORM would certainly be useful for the majority of Models, they are
certainly not dependant on ORM. Any database interaction can be done using
Zend_Db, granted you sacrifice some development time but basically achieve
the same thing. Besides, some models may not relate to a database table at
all.
From: "Mislav Marohnić" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC: "Sam Davey" <[EMAIL PROTECTED]>, [email protected]
Subject: Re: [fw-general] Advice for Model design
Date: Thu, 21 Sep 2006 16:19:36 +0200
Sam,
Your approach, although basic, is not incorrect... I don't understand
what you're worrying about. MVC is simply a matter of keeping the
domain, application and view logic in separate layers.
Keep in mind that ZF is not a strict MVC framework. Sure it has
Controller and View, but it's more like a "make your own MVC" thing.
And we clearly can't discuss about Model when we don't have ORM
functionality yet to put domain logic into.