Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old July 7th, 2005, 08:54 AM
Soft Soft is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 Soft User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP OOP vs Procedural

I read an interesting article about the disadvantages of OOP regarding debugging time (albeit it was regarding C++) - OOP was much more time-consuming for debugging than procedural (with programmers brought in not familiar with the code).

Of course, that article you mention is on server performance, but that is neglible compared to human time; I value my time more than the cost of a bigger server.

If you want a designer's perspective, I prefer spaghetti code, possibly because the suits are sneering at it so much lately, but perhaps because it is more open to collaboration. I'm a designer, and I don't like Flash, go figure.

Regards
brickred.com
cardssolutions.com
crimsonlink.com

Reply With Quote
  #2  
Old July 7th, 2005, 11:00 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: PHP OOP vs Procedural

Quote:
I read an interesting article about the disadvantages of OOP regarding debugging time (albeit it was regarding C++) - OOP was much more time-consuming for debugging than procedural (with programmers brought in not familiar with the code).


Do you have a link to the article? That result does not reflect my experience.

Quote:
If you want a designer's perspective, I prefer spaghetti code, possibly because the suits are sneering at it so much lately, but perhaps because it is more open to collaboration.


Am I reading this wrong or are you suggesting that poorly written code is better because managers can't understand it and will need to keep you around to maintain it?

How is poorly written code more open to collaboration?

Reply With Quote
  #3  
Old July 7th, 2005, 11:50 PM
pickleman78 pickleman78 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Dallas,TX,USA
Posts: 582 pickleman78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to pickleman78
RE: PHP OOP vs Procedural

Well, I can't say much, I work on a daily basis with 100% OOP code (yay for C#)

but it seems to be leaning twoard the preferred method of programming, I think its easier, I like it much more than procedural personally

Reply With Quote
  #4  
Old July 8th, 2005, 12:23 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: PHP OOP vs Procedural

i get the basic concepts of OOP, but once you start talking private and public and destructors and overloading, i get lost pretty quick. in other words i can read the code and modify the code but i don't understand the terminology enough to know exactly what is going on or to write it on my own.

i should probably pick up a non-PHP book that focuses strictly on OOP concepts.

Reply With Quote
  #5  
Old July 9th, 2005, 04:12 PM
pickleman78 pickleman78 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Dallas,TX,USA
Posts: 582 pickleman78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to pickleman78
RE: PHP OOP vs Procedural

you could learn java, that forces OOP concepts on you, and the new PHP5 OOP stuff is alot like Java (moreso than now, now it resembles structs in C++)

Reply With Quote
  #6  
Old July 10th, 2005, 10:25 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
RE: PHP OOP vs Procedural

I learned basic OOP in java and found it very easy to switch over to PHP5 (4 isn't that bad - but the references kill me). As for the PHP Object model being more like C++ structs - only used C structs and it isn't like those very much at all. ;)

Reply With Quote
  #7  
Old July 15th, 2005, 03:47 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: PHP OOP vs Procedural

I have been fooling around with classes lately and truthfully...I can do the same thing in most cases with properly constructed functions rather than dealing with classes.

I do like the concept of OOP, however as was stated earlier in this thread, every manual or book that I have on OOP doesnt really give a definite and easy to learn example of how to construct these classes for not only easy to use implementations, but what the hell it is exactly many of these new class definitions such as public and private provide and when or how to use them.

Its discouraging as I have been really moving in the functions arena and would like to structure better code through the class methods..but my classes are literally elementary level at best.

Reply With Quote
  #8  
Old July 15th, 2005, 10:54 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: PHP OOP vs Procedural

I wish I had a good source to give you guys for really learning OOP without all the extra rules and conventions imposed by specific languages. I learned most of my OOP basics through two classes in college - they're both online now through MIT's OpenCourseWare program, but without the right background (and even with the right background), they aren't the easiest things in the world to get through nor are they simply about OOP:

6.001 Structure and Interpretation of Computer Programs
6.170 Laboratory in Software Engineering

I'll keep looking.

Reply With Quote
  #9  
Old August 17th, 2005, 05:37 PM
Ursus Ursus is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Maryland, USA
Posts: 398 Ursus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 8 sec
Reputation Power: 2
RE: PHP OOP vs Procedural

I started using OOP while learning Python. It took me a lot of reading to get the hang of it, but now that I'm used to the syntax, going back to procedural takes a bit of mental restructuring.

Certainly, the simpler tasks can just as easily be done with functions rather than full classes, but the amount of code reduction gained using inheritance and overloading makes a real difference in more complex tasks.

Reply With Quote
  #10  
Old February 19th, 2007, 11:23 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: PHP OOP vs Procedural

Here is the mother of all anti-OOP websites if you want complaints about OOP:

http://www.geocities.com/tablizer/oopbad.htm

It suggests that if you "get relational" and set theory, you don't really need OOP.

Reply With Quote
  #11  
Old February 28th, 2007, 05:35 PM
Sleepingkirby's Avatar
Sleepingkirby Sleepingkirby is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 47 Sleepingkirby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 18 m 10 sec
Reputation Power: 2
RE: PHP OOP vs Procedural

Yeah, I'm the same. I learned OOP in C++ in my, back then local, community college. There's a simpler way of defining OOP in my opinion, but I don't know if it's a accurate definition. Once I started using the definition with myself it became easier. I always thought that OOP is the organization of code so that functions and variables don't get double declared or collide with functions of another part of the program. Certain functions, once in an object, can't and shouldn't be accessed by any other function in the program as it'll lead to disorganization of data and functions. Things like public and private are declarations of what can be accessed from outside that object and what should only be access by other functions within that object. I'll look out for some good oop intro books too. I'll post articles and book titles if I found any.

Reply With Quote
  #12  
Old January 18th, 2008, 12:28 PM
johhnnn johhnnn is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 2 johhnnn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 46 sec
Reputation Power: 0
how about in performance?

hi guys.. how about in performance/loading speed? what is the difference between OOP and non-OOP? lets say in PHP for example

Reply With Quote
  #13  
Old January 22nd, 2008, 04:08 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
There's so much more that goes into performance than OOP vs. procedural, that your question doesn't make much sense. For example, algorithm design, skill of the programmer, understanding memory access, writing/reading to files or databases, and network latency, affect performance far more than structure of the code.

Trying to squeeze out tiny little performance improvements, especially out of a language like PHP, often means you end up sacrificing readability and maintainability of the code for very, very little increase in performance.

If you've never heard of premature optimization, read that link.

Reply With Quote
  #14  
Old January 22nd, 2008, 08:38 AM
johhnnn johhnnn is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 2 johhnnn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 46 sec
Reputation Power: 0
will it make a difference?

ahhh.. i know some of the stuff that makes a difference in performance.. but i am ignorant on many of them.. but i was just wondering if developing it using OOP or non OOP will make a difference.. thanks anyway..

Reply With Quote
  #15  
Old January 24th, 2008, 06:27 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
Run-time performance, with all other thigns being equal, any difference between OOP and procedural will be negibable in most applications.

Asking the question regarding development-time is the basis of flame wars. You might as well be asking if developing in vi is faster than emacs.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > PHP OOP vs Procedural


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump