[UPHPU] Article 2

John lists at strictlyrockymountain.com
Mon Jun 20 15:34:56 MDT 2005

I am one that could learn some more about objects so I'll check out your
article, thanks.  But I would also like to understand from anyone, why
folks like OOP so much in PHP.

It seems to me that there is a "LOT" of structure needed when you begin an
 OOP project.  And that you really need to have your program outline
pretty detailed, thats understandable.  But what I don't really get is
when folks who like OOP, say that its reusable.  But then so is a

When I first heard about OOP I was learning Pascal and C.  And in a "real"
program, (for lack of a better term), such as would be written in C++ or
Java, or C, when you load a program into memory, your Objects get loaded
and then become reusable without having to realocate memory space.  That
was the definition I was given when it was "coming of age".

But with PHP, everytime your script halts all of that gets dumped.  Its
not "reusable" in the same sense because your script halts and whatever
PHP code that was in memory is gone.  So that also means that everytime
you load a script, all of that extra coding used to build your Object has
to be reloaded for each page load.  This may or may not be noticable to
the human eye in speed, but it surely must have a bigger load than simply
including my "functions.php" file on each page load.

Can anyone, does anyone, want to shead some light on this for me?  I
really don't understand the value of OOP in PHP.  Its laborous to write
and its an extra load on the server when it loads, and it gets dumped
after the page halts, so whats the value?  Now if PHP had a "daemon" that
kept all Objects in memory and you could just reference those objects when
inside a PHP script, that would seem useful and fill the OOP definition.


> The second
> article<http://www.jacwright.com/blog/19/thinking-object-oriented/>on
> object-oriented programming was posted this morning (I almost forgot to
> let you know) on jacwright.com <http://www.jacwright.com/> for those
> interested in learning more about learing OOP. It is entitled "Thinking
> Object-Oriented" and goes over the basic concepts of thinking about a
> program in terms of objects. Should be great for beginners and a good
> refresher for the experienced. It was also posted on
> uphpu.org<http://uphpu.org/article.php?story=20050620093420726>and
> phpdeveloper.org <http://www.phpdeveloper.org/news/3329> if you prefer
> reading it there.
> Let me know if you have any questions. And I apologize if you are
> looking  for code examples. The articles are written for the intent of
> teaching OOP  concepts and not how to code a class or method. You can
> find those in most  other OOP articles. You don't find very often the
> concepts that are  presented in these articles, and they're not language
> specific.
> Thanks!
> Jacob Wright
> _______________________________________________
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net

More information about the UPHPU mailing list