Linked by John Collins on Wed 21st Apr 2004 06:42 UTC
The purpose of this article is to give a novice programmer the basic idea of what OOP is, as implemented using PHP. Readers should have a basic knowledge of programming ie what variables are, variable types, basic methods of writing comments, and how to enter code into a text editor.
Permalink for comment
To read all comments associated with this story, please click here.
PHP is nearly worthless as an OO language as it really isn't OO, it pretends to be by offering a class structure with very simple inheritence.
PHP is not strongly typed and it is interpereted, therefore it is probably one of the worst choices to explain OOP.
What about design patterns? What about building real-world business objects and mechanisms to deliver them to your presentation layer (i.e. facades, visitors, etc.)
PHP teaches you poor OOP practices by munging your programming logic into your presentation layer, otherwise known as spaghetti code.
For *real* OOP learning, turn to ASP.NET or Java, where you have strongly typed languages, interfaces, full inheritance, and tons of other constructs (class libraries, stateful objects, etc.) in order to learn OOP to its fullest.
PHP is nearly worthless as an OO language as it really isn't OO, it pretends to be by offering a class structure with very simple inheritence.
PHP is not strongly typed and it is interpereted, therefore it is probably one of the worst choices to explain OOP.
What about design patterns? What about building real-world business objects and mechanisms to deliver them to your presentation layer (i.e. facades, visitors, etc.)
PHP teaches you poor OOP practices by munging your programming logic into your presentation layer, otherwise known as spaghetti code.
For *real* OOP learning, turn to ASP.NET or Java, where you have strongly typed languages, interfaces, full inheritance, and tons of other constructs (class libraries, stateful objects, etc.) in order to learn OOP to its fullest.