Current location: Hot Scripts Forums » Programming Languages » PHP » Object Oriented Programming


Object Oriented Programming

Reply
  #11 (permalink)  
Old 06-12-03, 01:55 PM
Stefan's Avatar
Stefan Stefan is offline
Junior Code Guru
 
Join Date: Jun 2003
Location: Utrecht, The Netherlands
Posts: 599
Thanks: 0
Thanked 0 Times in 0 Posts
thanks for the info, though I already knew most of that. I know how it works, it's just that I most of the times don't really see the purpose, the advantage of working that way against working with other methods.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #12 (permalink)  
Old 06-12-03, 03:55 PM
Pineapple Pineapple is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Phoenix, AZ
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally posted by Stefan
yes I've heard these arguments a lot of times before. I still have a hard time seeing this in practice.
You're going to have to write some code for yourself to see it in practice.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #13 (permalink)  
Old 06-12-03, 04:18 PM
Cagez's Avatar
Cagez Cagez is offline
Eeew, dirty!
 
Join Date: Jun 2003
Location: Toronto, Ontario
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
You could use it in lots of ways. I have a database class, a template class... You might want to make a sessions class etc. Its nice when you have everything neat and tidy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #14 (permalink)  
Old 06-12-03, 04:22 PM
amailer's Avatar
amailer amailer is offline
_-*^# PHP Master #^*-_
 
Join Date: Jun 2003
Location: Canada
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally posted by Cagez
Its nice when you have everything neat and tidy.
OF COURSE IT IS!
and also it makes your work much better, and faster :0, even thought i don't use OO yet, i am learning how to :0
__________________
Amailer - Spam/Advertise/Have fun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #15 (permalink)  
Old 06-12-03, 04:33 PM
Cagez's Avatar
Cagez Cagez is offline
Eeew, dirty!
 
Join Date: Jun 2003
Location: Toronto, Ontario
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Its not like its hard to do, I don't know why more people dont!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #16 (permalink)  
Old 06-21-03, 07:09 PM
gizmoitus's Avatar
gizmoitus gizmoitus is offline
Niamh's Daddy
 
Join Date: Jun 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Realistically most of the benefits one gets from OOP in an OOP language like Delphi, C++ or Java aren't available in the current very limited OOP available in PHP. It's no surprise then, that they have announced a complete overhaul of the PHP's oop constructs in a future release.

I still tend to use classes for organizational purposes, but there's no compelling reason to do so other than to gain a bit of organization.

One of the most important benefits of true OOP is inheritance, yet you rarely ever see anyone taking the time to derive classes from a base class in php. I think this pretty much speaks to the usefulness of php's OOP.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #17 (permalink)  
Old 06-21-03, 07:18 PM
jv2222 jv2222 is offline
The Freshmaker
 
Join Date: Jun 2003
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
I am amazed at this thread..

The idea of OOP not being useful bemuses me.

Justin
__________________
Author of <a href=http://www.hotscripts.com/Detailed/18290.html target=_blank>ezSQL</a> (makes life soooo easy when working with databases)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #18 (permalink)  
Old 06-21-03, 07:23 PM
amailer's Avatar
amailer amailer is offline
_-*^# PHP Master #^*-_
 
Join Date: Jun 2003
Location: Canada
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
If your debugging a code, trust me OOP makes it much easier to find your problems
__________________
Amailer - Spam/Advertise/Have fun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #19 (permalink)  
Old 06-24-03, 03:59 AM
Pineapple Pineapple is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Phoenix, AZ
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally posted by gizmoitus
Realistically most of the benefits one gets from OOP in an OOP language like Delphi, C++ or Java aren't available in the current very limited OOP available in PHP. It's no surprise then, that they have announced a complete overhaul of the PHP's oop constructs in a future release.

I still tend to use classes for organizational purposes, but there's no compelling reason to do so other than to gain a bit of organization.

One of the most important benefits of true OOP is inheritance, yet you rarely ever see anyone taking the time to derive classes from a base class in php. I think this pretty much speaks to the usefulness of php's OOP.
I definitely wouldn't say "most" of the benefits aren't available to PHP. Even with its limited OOP support you would be probably be surprised still at the difference between procedural and object-oriented programming in PHP.

Inheritance is definitely an important benefit, and PHP supports it. If there are programmers not taking the time to derive classes from a base class in PHP, that is not PHP's problem. I do it all the time myself.

If all you're getting is better organization by using PHP's OOP you're hardly using it properly. I totally agree that many great OOP features are missing from PHP but you can do more with it than you seem to be willing to admit. At least take advantage of the encapsulation. Yes we would all love to see exception handling, interfaces, real constructors and destructors, private and protected members, and such, but don't totally write off PHP's OOP.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #20 (permalink)  
Old 06-24-03, 05:02 AM
jv2222 jv2222 is offline
The Freshmaker
 
Join Date: Jun 2003
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
I think I might write a tutorial about this...
__________________
Author of <a href=http://www.hotscripts.com/Detailed/18290.html target=_blank>ezSQL</a> (makes life soooo easy when working with databases)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gallery script, can someone check the programming? Pvasoldier PHP 10 09-25-03 06:43 PM
ASP Application Object hucklorenzo ASP 2 07-22-03 05:21 PM
Object resize aslythall JavaScript 1 07-02-03 03:38 PM
Dynamic site programming superjobs General Advertisements 3 06-06-03 10:30 AM


All times are GMT -5. The time now is 01:13 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.