« Return to Thread: MVC - where can I learn more about the "model"?
-- Josh Team <joshteam@...> wrote
(on Tuesday, 13 May 2008, 11:13 AM -0500):
> I would disagree that the model has to persist. For instance, if I had aThe data in YouTube, Flickr, and Weather persists, though, and those are
> website which used a REST service to display data. Maybe YouTube, Flickr,
> Weather, etc. The REST Service is my model, but it does not persist. At least
> that's my perspective.
ultimately your model. :-)
> On Tue, May 13, 2008 at 11:10 AM, P draic Brady <padraic.brady@...>
> P draic Brady> wrote:
>
>
> My typical explanation of the Model...
>
> The Model is responsible for maintaining state between HTTP requests in a
> PHP web application. Any data which must be preserved between HTTP requests
> is destined for the Model segment of your application. This goes for user
> session data as much as rows in an external database. It also incorporates
> the rules and restraints governing that data which is referred to as the
> "business logic". For example, if you wrote business logic for an Order
> Model in an inventory management application, company internal controls
> could dictate that purchase orders be subject to a single purchase cash
> limit of 500. Purchases over 500 would need to be considered illegal
> actions by your Order Model (unless perhaps authorised by someone with
> elevated authority). Models are therefore the logical location for data
> access but may also act as a central location for examining, verifying and
> making final manipulations on that data before it's stored, and even after
> it's retrieved.
>
> It really can be anything representing data - database, XML, web services,
> RSS, CSV files, sessions, etc. The only real constraint is the data is
> preserved between requests (for PHP at least)
>
> Best regards,
> Paddy
>
>
>
> tfk wrote:
> >
> > Less database (RDBMS)-centric - we use Rest and Xmlrpc in the model very
> > often.
> >
> > Cheers,
> > Till
> >
> > On Tue, May 13, 2008 at 5:58 PM, Wil Sinclair <wil@...> wrote:
> >> That's not entirely true. Anything in ZF can be a model at this point.
> >> We will be introducing a model formalism in the future, but we'd like
> to
> >> capture the flexibility that many projects require for their models to
> >> do so.
> >> Greg is right that the Zend_Db tables are the closest thing we have to
> a
> >> database-backed model. Also consider the fact that you can use full ORM
> >> solutions like Propel and Doctrine for your model as well.
> >>
> >> ,Wil
> >>
> >>
> >>
> >> > -----Original Message-----
> >> > From: Greg Donald [mailto:gdonald@...]
> >> > Sent: Tuesday, May 13, 2008 8:48 AM
> >> > To: fw-general@...
> >> > Subject: Re: [fw-general] MVC - where can I learn more about the
> >> > "model"?
> >> >
> >> > On 5/13/08, Rishi Daryanani <rishijd@...> wrote:
> >> > > I have
> >> > > not yet come across any mention of the "models"
> >> > > subdirectory.
> >> > >
> >> > > Where can I learn more about this and what it's used
> >> > > for?
> >> >
> >> > ZF doesn't have what you may have come to expect as an actual "model"
> >> > component from other web frameworks. Instead it has Zend_Db and
> >> > Zend_Db_Table.
> >> >
> >> >
> >
> >
>
>
> -----
>
> http://blog.astrumfutura.com
> http://www.patternsforphp.com
> OpenID Europe Foundation - Irish Representative
> --
> View this message in context: http://www.nabble.com/
> MVC---where-can-I-learn-more-about-the-%22model%22--tp17211735p17212335.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>
--
Matthew Weier O'Phinney
Software Architect | matthew@...
Zend - The PHP Company | http://www.zend.com/
« Return to Thread: MVC - where can I learn more about the "model"?
| Free Forum Powered by Nabble | Forum Help |