# Learning OOP

**URL:** <https://forum.kirupa.com/t/learning-oop/265303>\
**Category:** Uncategorized\
**Created:** [July 7, 2008, 4:14pm UTC](https://forum.kirupa.com/t/learning-oop/265303 "2008-07-07T16:14:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![shane\_c](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@shane\_c](https://forum.kirupa.com/u/shane_c)\
**Post date:** [July 7, 2008, 4:14pm UTC](https://forum.kirupa.com/t/learning-oop/265303/1 "2008-07-07T16:14:15Z")

</div>

I have been talking about it (mostly to myself) for a while now, but I think it’s about time I put some time into becoming a better developer, since I’m doing more and more of that for work.

Most of my development is PHP and Actionscript, and I want to learn **good** OOP for both. Would you guys recommend getting OOP books specific to each language, or is there also a good generic OOP book that has good practices for any programming, or…?

Any suggestions will be handsomely rewarded with back rubs and nachos.

---

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [July 7, 2008, 4:20pm UTC](https://forum.kirupa.com/t/learning-oop/265303/2 "2008-07-07T16:20:56Z")

</div>

For PHP OOP is pretty easy its just organizing your project in an OOP way that’s annoying. For PHP I would say get a book as it may describe theory and organization better to you in examples.

For OOP in AS switch to FlashDeveloper(.org) and that will make OOP way easier for you. Most of the stuff for AS3 is in OOP… so just look through other peoples source and see how they organize.

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 7, 2008, 4:22pm UTC](https://forum.kirupa.com/t/learning-oop/265303/3 "2008-07-07T16:22:27Z")

</div>

Although it’s mostly focused on Actionscript, it’s got incredible information on OOP design patterns. I’ve never learnt so much from a book as I did from;

Advanced Actionscript 3 with design patterns by Joey Lott and Danny Patterson. Both work at schematic.

---

<div class="post-metadata">

**Author:** ![shane\_c](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@shane\_c](https://forum.kirupa.com/u/shane_c)\
**Post date:** [July 7, 2008, 4:25pm UTC](https://forum.kirupa.com/t/learning-oop/265303/4 "2008-07-07T16:25:44Z")

</div>

Cool, thanks temp. I think I will get a book for PHP.

For OOP in AS, I don’t actually even have Flash CS3 yet (weak, I know). Is it possible to learn good OOP in AS2, in a way that will transfer (somewhat) over to AS3? Or does FlashDeveloper allow me to code in AS3 without having CS3 installed?

Also, I want to make sure I’m learning **good** practices, so I’m a little hesitant to just look at other people’s code, since I don’t always know who is knowledgeable and who will steer me wrong. Any suggestions for this (besides the obvious senocular)?

Sekasi: I’ll look into that book, thanks.

---

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [July 7, 2008, 4:29pm UTC](https://forum.kirupa.com/t/learning-oop/265303/5 "2008-07-07T16:29:10Z")

</div>

^Like I was saying don’t use the Flash IDE to learn OOP… many members here use the open source project FlashDevelop[whisper].org[/whisper]. And you do not want to be wasting your time with AS2.

Plus the Flash IDE isn’t very OOP friendly.

---

<div class="post-metadata">

**Author:** ![Gundark](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gundark](https://forum.kirupa.com/u/Gundark)\
**Post date:** [July 7, 2008, 4:29pm UTC](https://forum.kirupa.com/t/learning-oop/265303/6 "2008-07-07T16:29:11Z")

</div>

FlashDevelop and the Flex SDK will allow you to program in Actionscript 3 for free! You don’t even have to learn any Flex (although Flex is cool).

---

<div class="post-metadata">

**Author:** ![shane\_c](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@shane\_c](https://forum.kirupa.com/u/shane_c)\
**Post date:** [July 7, 2008, 4:31pm UTC](https://forum.kirupa.com/t/learning-oop/265303/7 "2008-07-07T16:31:33Z")

</div>

Ok, so you’re saying I can just use FlashDevelop and jump right into AS3? That’s good news… Thanks 🍺

And I thought my summer would be spent outside.

---

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [July 7, 2008, 4:38pm UTC](https://forum.kirupa.com/t/learning-oop/265303/8 "2008-07-07T16:38:00Z")

</div>

^Just take your laptop outside and get a nice tan. You don’t have to actually do anything people will just thing wow he goes outside and does stuff. :fab:

Also make sure you download the nightly build of flashdevelop.

Download the **Open Source** Flex SDK (nightly build):

[http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3](http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3)

flex 4 has been having nightly builds but for you I would just wait. Flex 3 has quite a few Flash Player 10 features in it.

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [July 7, 2008, 10:23pm UTC](https://forum.kirupa.com/t/learning-oop/265303/9 "2008-07-07T22:23:37Z")

</div>

[QUOTE=Templarian;2354739]Plus the Flash IDE isn’t very OOP friendly.[/QUOTE]  
That’s the dumbest thing I’ve heard.

I’d read senocular’s tutorials on this site. There’s one in AS1 and another in AS2 but the concepts they teach are fudemental to any OOP in Flash and if you understand them then AS3 will be no problem.

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 7, 2008, 10:25pm UTC](https://forum.kirupa.com/t/learning-oop/265303/10 "2008-07-07T22:25:34Z")

</div>

[QUOTE=TheCanadian;2354944]That’s the dumbest thing I’ve heard.[/QUOTE]

Dumber than this?

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [July 7, 2008, 10:28pm UTC](https://forum.kirupa.com/t/learning-oop/265303/11 "2008-07-07T22:28:01Z")

</div>

I don’t even know what tribal sovereignty is so I can’t judge too much.

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 7, 2008, 10:30pm UTC](https://forum.kirupa.com/t/learning-oop/265303/12 "2008-07-07T22:30:12Z")

</div>

(that tribes can govern themselves)

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [July 7, 2008, 10:34pm UTC](https://forum.kirupa.com/t/learning-oop/265303/13 "2008-07-07T22:34:06Z")

</div>

For OOP, try [here](http://www.debreuil.com/docs/).

For good coding practices [here and [URL=“http://www.adobe.com/devnet/flash/articles/as\_bestpractices.html”]here](http://www.adobe.com/devnet/flash/articles/flash8_bestpractices.html) should suffice.

I agree with the Canadian fellow…the IDE shouldn’t be relevant. It’s how you structure and organise your code that determines if it’s OOP or not.

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [July 7, 2008, 10:34pm UTC](https://forum.kirupa.com/t/learning-oop/265303/14 "2008-07-07T22:34:42Z")

</div>

Well I can figure that much out from the name.

---

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [July 7, 2008, 11:02pm UTC](https://forum.kirupa.com/t/learning-oop/265303/15 "2008-07-07T23:02:21Z")

</div>

[QUOTE=TheCanadian;2354944]That’s the dumbest thing I’ve heard.

I’d read senocular’s tutorials on this site. There’s one in AS1 and another in AS2 but the concepts they teach are fudemental to any OOP in Flash and if you understand them then AS3 will be no problem.[/QUOTE]  
You know what i mean its no Flex IDE. :lol: It doesn’t even have code hinting for your classes. From what I hear CS4 changes this.

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [July 7, 2008, 11:12pm UTC](https://forum.kirupa.com/t/learning-oop/265303/16 "2008-07-07T23:12:28Z")

</div>

I have to agree. And the fact that it doesn’t automatically do the imports you need when making as files is a royal pain in the butt. The flash IDE makes oop programming more painful than flashdevelop or flex builder. deny that and you are fooling yourself.

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [July 7, 2008, 11:14pm UTC](https://forum.kirupa.com/t/learning-oop/265303/17 "2008-07-07T23:14:53Z")

</div>

I would’ve thought the Flash IDE is an intuitive OOP tool. After all, when you create a movieclip in your library and drag it onto the stage, you’re (knowingly or otherwise) automatically creating an object. Furthermore, by giving that object a name, you’re then instantiating it…which is, ultimately, what OOP is all about:

In the beginning, there was nothing. And lo, an object appeared…and that object existed!

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [July 7, 2008, 11:38pm UTC](https://forum.kirupa.com/t/learning-oop/265303/18 "2008-07-07T23:38:54Z")

</div>

[QUOTE=Iamthejuggler;2354972]I have to agree. And the fact that it doesn’t automatically do the imports you need when making as files is a royal pain in the butt. The flash IDE makes oop programming more painful than flashdevelop or flex builder. deny that and you are fooling yourself.[/QUOTE]

I never denied it, I just said that dismissing Flash altogether is retarded. I program in Flash and never have any problems.

---

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [July 7, 2008, 11:43pm UTC](https://forum.kirupa.com/t/learning-oop/265303/19 "2008-07-07T23:43:42Z")

</div>

[http://www.dustindiaz.com/god-the-oo-programmer/](http://www.dustindiaz.com/god-the-oo-programmer/) [whisper]php 4.0[/whisper]

lol. PHP OOP for Christians. :fab:

Or we could do it with PHP procedures.

```auto
/* Day 1 */
3d_create_spotlight(); //Defaults to center at 0,0,0
// Will do the rest tomorrow...

```

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [July 8, 2008, 12:12am UTC](https://forum.kirupa.com/t/learning-oop/265303/20 "2008-07-08T00:12:26Z")

</div>

> [@Templarian;2354990](#):
>
> lol. PHP OOP for Christians. :fab:

[http://pi.pwp.blueyonder.co.uk/creation.html](http://pi.pwp.blueyonder.co.uk/creation.html)

[Next page](https://forum.kirupa.com/t/learning-oop/265303.md?page=2)
