insaynewrapper Posted July 17, 2006 Share Posted July 17, 2006 I'm a pretty decent PHP developer, but I have yet to implement classes in my work, and I'll tell you why: I've never had a need to. I just plain and simple don't understand the need for oop when I'm working. I don't see the advantage of using it. What can I do through oop that I can't do otherwise?Thoughts? Link to comment https://forums.phpfreaks.com/topic/14818-classes-vs-not-using-them/ Share on other sites More sharing options...
CheesierAngel Posted July 17, 2006 Share Posted July 17, 2006 Using OOP is not a matter of extending the PHP code abalities. It's more a way to organize your codeso it becomes easier to extend a certain application or re-use your code. Classes are nottingmore then a described object with the necessary variables and functions to manipulate the object. Link to comment https://forums.phpfreaks.com/topic/14818-classes-vs-not-using-them/#findComment-59201 Share on other sites More sharing options...
insaynewrapper Posted July 17, 2006 Author Share Posted July 17, 2006 And I understand that, but I don't see how it's any more organized than not using them. Maybe you could give me an example...? Link to comment https://forums.phpfreaks.com/topic/14818-classes-vs-not-using-them/#findComment-59202 Share on other sites More sharing options...
CheesierAngel Posted July 17, 2006 Share Posted July 17, 2006 For example, you can create a class user so any information is stored in this object for a regular website visitor.But if you 'as webmaster' want to log-in you want more privileges. So you make another class superuser extended from the regular user class and you can re-use the function and extend them without rewriting them. Link to comment https://forums.phpfreaks.com/topic/14818-classes-vs-not-using-them/#findComment-59204 Share on other sites More sharing options...
trq Posted July 17, 2006 Share Posted July 17, 2006 Your not going to [i]get[/i] the concepts of oop explained in a simple forum reply, hell, I have several books, probably 6000 pages of examples and theory and Im still just comming to terms with it.I suggest... if your interested in the whys... a good place to start is the book [url=http://www.odioworks.com/download/TIJ-3rd-edition4.0.zip]thinking in java[/url], available free. ok... so its not php, but php and java share much the same syntax these days, and the oop concepts don't change. Link to comment https://forums.phpfreaks.com/topic/14818-classes-vs-not-using-them/#findComment-59220 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.