TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   The Lounge (http://www.talkphp.com/lounge/)
-   -   is OOP a thinking style? (http://www.talkphp.com/lounge/1793-oop-thinking-style.html)

Aaron 12-22-2007 03:04 AM

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.

stewart 12-22-2007 06:42 AM

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

sketchMedia 12-22-2007 01:17 PM

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.

obolus 12-22-2007 06:30 PM

Being lazy is a virtue of a programmer. =P

Aaron 12-22-2007 06:48 PM

Quote:

Originally Posted by obolus (Post 7084)
Being lazy is a virtue of a programmer. =P

What is that supposed to mean?

Orc 12-22-2007 06:59 PM

It means being a lazy Programmer is good like me :p as I don't really make much applications but I do :]

Village Idiot 12-22-2007 07:14 PM

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

stewart 12-22-2007 07:26 PM

Quote:

Originally Posted by Village Idiot (Post 7088)
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

8-)

Village Idiot 12-22-2007 07:52 PM

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.

Salathe 12-23-2007 12:45 AM

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.

ReSpawN 12-24-2007 04:49 PM

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.


All times are GMT. The time now is 03:29 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0