Another consideration is in what kind of environment(s) your code will
be running, and who will be working on it. I've seen MVC-centric
frameworks take the approach of putting a method at the top of every
model that basically sets the variables that might be used by that
model, and then call them from a getVariable() or some such method
later to ensure the context is consistent. As well, this has been used
as a (kludge-like, IMHO) solution for creating codebases that need to
support PHP4 and PHP5; and basically provides a model-based namespace
and avoids the "whups, no constructors in this PHP version" problem.

The only thing I like about the concept is that you know where all
your public variables are, and it forces you to think long enough
about your variables to have an edumucated opinion on how you
implement your model.

-- Mitch
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to