TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack (1) Thread Tools Search this Thread Display Modes
Old 12-22-2007, 03:04 AM   1 links from elsewhere to this Post. Click to view. #1 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default is OOP a thinking style?

I don't know what I am asking really... I guess, do you think PHP is a way of thinking? Such as, instead of making a 'program', you are making a 'society' of communicating functions. I ask this because I have been avoiding OOP until I get good at other things, and I am not sure if thats a good idea.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
The Following User Says Thank You to Aaron For This Useful Post:
Haris (12-22-2007)
Old 12-22-2007, 06:42 AM   #2 (permalink)
WebDev'n Beer Drnkn' Fool
 
stewart's Avatar
 
Join Date: Dec 2007
Location: Denver, CO
Posts: 59
Thanks: 2
stewart is on a distinguished road
Default

Well yes kinda, OOP is a different thinking style, as in you do have to put a little more thought into application design and how methods and such are all handled. Just like any other coding task, time and practice just gets you thinking differently about it, which eventually makes you quicker (developed a 'thinking style' for it ?) idc.
Definitely need to make sure you have the basics down though before trying to dive into OO concepts.

Good luck :)

.... i guess it would depend on the language as well, some languages like Java and C-Sharp (C#) are based entirely on OO concepts, so an understanding of OOP would technically be required for certain langs =D
__________________
stewart::howe
Web Developer & Programmer
CelerMedia.Com | iAmStewart.com | CelerLabs.com
Send a message via ICQ to stewart Send a message via AIM to stewart Send a message via MSN to stewart Send a message via Yahoo to stewart
stewart is offline  
Reply With Quote
Old 12-22-2007, 01:17 PM   #3 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

OOP is indeed a different way of thinking, you develop your application as a series of objects. Its a good idea to have a good knowlege of your language before you do OOP, but there isnt any harm in trying its not like its gonna explode or anything, just have a play around.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 12-22-2007, 06:30 PM   #4 (permalink)
The Acquainted
 
obolus's Avatar
 
Join Date: Oct 2007
Location: florida
Posts: 110
Thanks: 36
obolus is on a distinguished road
Default

Being lazy is a virtue of a programmer. =P
obolus is offline  
Reply With Quote
Old 12-22-2007, 06:48 PM   #5 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Quote:
Originally Posted by obolus View Post
Being lazy is a virtue of a programmer. =P
What is that supposed to mean?
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 12-22-2007, 06:59 PM   #6 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

It means being a lazy Programmer is good like me :p as I don't really make much applications but I do :]
Orc is offline  
Reply With Quote
Old 12-22-2007, 07:14 PM   #7 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

The question really doesn't make sense. OOP is a part of PHP just like arrays or functions.
__________________

Village Idiot is offline  
Reply With Quote
Old 12-22-2007, 07:26 PM   #8 (permalink)
WebDev'n Beer Drnkn' Fool
 
stewart's Avatar
 
Join Date: Dec 2007
Location: Denver, CO
Posts: 59
Thanks: 2
stewart is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
The question really doesn't make sense. OOP is a part of PHP just like arrays or functions.
"OOP" stands for Object-Orientated Programming and is not even close to PHP specific.

OOP is a concept, rather than a built in function of PHP.

Object-oriented programming - Wikipedia, the free encyclopedia

__________________
stewart::howe
Web Developer & Programmer
CelerMedia.Com | iAmStewart.com | CelerLabs.com
Send a message via ICQ to stewart Send a message via AIM to stewart Send a message via MSN to stewart Send a message via Yahoo to stewart
stewart is offline  
Reply With Quote
Old 12-22-2007, 07:52 PM   #9 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

I am well aware of what OOP is (knowing php,C++, some java and some C#), but he is asking a question specific to PHP. I see how my post can be misread though.

As it is a concept, they had to build it into PHP.
__________________

Village Idiot is offline  
Reply With Quote
Old 12-23-2007, 12:45 AM   #10 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

OOP is a programming paradigm which is "a fundamental style of programming regarding how solutions to problems are to be formulated in a programming language." (from Wikipedia)

Different paradigms provide different approaches to solving problems; for example, OOP looks to thinking of a program as a collection of objects which can interact with one another. Your own analogy of seeing a program as a "society" of communicating functions (objects) is a start towards thinking in an object-oriented way.

If you really want to delve into what OOP is all about, my first suggestion will always be to forget trying to 'learn' OOP with specific regards to any individual programming language (PHP). Instead, it is important to grasp the wider, overarching principles at work without getting bogged down by language syntax. Even better, learn OOP as part of a wider understanding of the other available programming paradigms which are just as useful tools in a programmer's arsenal.
Salathe is offline  
Reply With Quote
Old 12-24-2007, 04:49 PM   #11 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

Rather the simply answer is, you've gotta really LEARN OOP as it is. It's surely a thinking style. The functions are way more advanced than the simple, built in functions. PHP4 uses simply expressions like 'var' and 5 uses 'public', 'private', 'restricted' and more.

First time I tried OOP, it took about 2 days to really get into it and when you stop scripting OOP-style, you once again got to pick up the thread.
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.talkphp.com/lounge/1793-oop-thinking-style.html
Posted By For Type Date
is OOP a thinking style? - TalkPHP This thread Refback 12-23-2007 12:45 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


All times are GMT. The time now is 04:38 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design