I'm also learning at the same time. For me, the Model is the Object
abstraction of different datas, typically from a Database, but it can
also be from RSS feeds, ...

For me, the idea of using Singletons is to avoid loading the data twice.

What kind of Singletons do you build ?

PS : I recieve your emails twice, once from the ML and once directly

On 6/20/05, David Zülke <[EMAIL PROTECTED]> wrote:
> What does the Context have to do with a Model.
> 
> $foo = Bar::getInstance();
> $searchInstance = Search::getInstance();
> $thing = MyHomegrownClass::getInstance();
> 
> Maybe I was using the wrong words, sorry for that. I want to be able to
> retrieve instances of models that are designed to be singletons.
> 
> - David
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> > Behalf Of zimba-tm
> > Sent: Monday, June 20, 2005 7:37 PM
> > To: Agavi Development
> > Subject: Re: [agavi-dev] initialize() vs. __construct()
> >
> > What I was refering to, is that $c = Context::getInstance() already
> > exists, and that you can store any informations with
> > $c->setAttribute(...). By this way you don't have to make tons of
> > singletons. Which is not a good practice IMO
> >
> > On 6/20/05, David Zülke <[EMAIL PROTECTED]> wrote:
> > > > A propos Singletons, the Context object is already there for that
> > > > purpose. You just need to put your objects in it and they should be
> > > > accessable everywhere
> > >
> > > Care to elaborate? What I have in mind is that I can use
> > get(Global)Model
> > > even with singletons, i.e. getGlobalModel uses the classes'
> > getInstance() or
> > > whatever method instead of returning a new instance.
> > >
> > > - David
> > >
> > >
> > > _______________________________________________
> > > agavi-dev mailing list
> > > [email protected]
> > > http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev
> > >
> >
> >
> > --
> > Cheers,
> >   zimba
> >
> > http://zimba.oree.ch
> > _______________________________________________
> > agavi-dev mailing list
> > [email protected]
> > http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev
> 
> 
> 
> _______________________________________________
> agavi-dev mailing list
> [email protected]
> http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev
> 


-- 
Cheers,
  zimba

http://zimba.oree.ch
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to