[UPHPU] Article 2

Jeffrey Moss jeff at opendbms.com
Mon Jun 20 17:31:29 MDT 2005

OO is just the natural way to organize code. When you first learned to 
program it was all about learning the concepts; loops, conditionals, 
functions... some people never get beyond that cause they don't want to, but 
as you get better you may want to put the same amount of effort into a 
program as you do when you build a house, all organized and modular and 
stuff. You want the people upstairs to share a bathroom, you don't want each 
one with their own bathroom, well maybe you do, but you see the point I'm 
trying to make. You want it to last a long time, you want people to admire 
your house. The best part about OOP is the level of understanding other 
people have about your program when it is well abstracted, and that can in 
turn lend itself to your own productivity as well.


----- Original Message ----- 
From: "John" <lists at strictlyrockymountain.com>
To: <UPHPU at uphpu.org>
Sent: Monday, June 20, 2005 3:34 PM
Subject: Re: [UPHPU] Article 2

>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
> function.
> 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.
> --
> Thanks
> John
>> 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
> _______________________________________________
> 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