From: Ben Stones

> I've been learning about object oriented programming for the past few
> and I've understood it pretty well, but I have one question. Usually
> PHP scripts I make, all the functionality for a specific page is in
> actual PHP file, and I'd use PHP functions in a separate directory
> would be included in whichever PHP file needs specific functions I
> created. The functions would be for the specific things in my script,
> as validation checks, functionality that will be used/repeated a lot
> throughout my script, etc. What I don't understand about OOP is what
> primary purpose is for. Do I use OOP for all the functionality of my
> application, in separate directories, and include these specific class
> and call the methods to complete specific functionality needed for
> PHP file I'm working on, or is OOP used for specific functionality
like I
> would with functions? Essentially what I'm asking is what is the
> purpose for OOP? Hope you understand.

OOP is a way of looking at a problem and map it into code. Some problems
will fit into it, some don't. Some people can look at problems and see
objects and some can't. But in most cases, it is not easy to take an
existing procedural program and re-map it into objects. It would be
easier to start over from the specification and write it from scratch in
the object model.

If you have been doing procedural programming, don't worry if you don't
figure it out right away. It is not an easy transition to make. Many of
us with decades of programming behind us will never be able to make that
switch. Our brains are too tightly locked into the previous thought

Bob McConnell

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to