Re: [Flashcoders] A Question that I've been asking for years!!

2008-09-11 Thread Ron Wheeler
Second the recommendation. Great book - applies to ActionScript easily. Ron Steven Loe wrote: Check out Head First Design Pattens (oreilly). It's an easy to comprehend book on patterns and software design goodness. The book examples are in Java, so if you can read AS3 you'll be able to read

RE: [Flashcoders] A Question that I've been asking for years!!

2008-09-11 Thread Merrill, Jason
Second the recommendation. Great book - applies to ActionScript easily. Wow. This really is the thread that keeps mutating won't die! Shoot me now! :) Check the dates people! LOL. Jason Merrill Bank of America  Instructional Technology Media Join the Bank of America Flash Platform

RE: [Flashcoders] A Question that I've been asking for years!!

2008-09-11 Thread Romuald Quantin
Read books will help to understand the concept, let's try an example: Let's say you built a flash library and one of your class (ex: Main class) needs another proper class to be instantiated (like a Config class). Main class constructor: Public function Main(config:IConfig):void { } IConfig

Re: [Flashcoders] A Question that I've been asking for years!!

2008-09-11 Thread John McCormack
I have most of these books and for me the ones that help the most are... http://www.amazon.com/Essential-ActionScript-3-0/dp/0596526946 http://www.amazon.com/Advanced-ActionScript-3-Design-Patterns/dp/0321426568

RE: [Flashcoders] A Question that I've been asking for years ...

2008-09-06 Thread S0 F1
Interfaces allow 'Polymorphism'. Many say this is OOP's greatest contribution to computer science. Polymorphism occurs when a superclass stands in for a subclass. This is extremely useful when you don't know exactly what type of class (usually a concrete class) is needed at a specific spot within

Re: [Flashcoders] A Question that I've been asking for years ...

2008-09-06 Thread Ian Thomas
On Sat, Sep 6, 2008 at 9:37 AM, S0 F1 [EMAIL PROTECTED] wrote: Interfaces allow 'Polymorphism'. Many say this is OOP's greatest contribution to computer science. snip Any thoughts on this? What you've described above has no need for interfaces. That's just standard OOP polymorphism based

RE: [Flashcoders] A Question that I've been asking for years!!

2008-09-05 Thread Steven Loe
Check out Head First Design Pattens (oreilly). It's an easy to comprehend book on patterns and software design goodness. The book examples are in Java, so if you can read AS3 you'll be able to read sample code. It a great resource to learn not only what interfaces are, but why and when you

RE: [Flashcoders] A Question that I've been asking for years!!

2008-09-05 Thread Merrill, Jason
Déjà vu - wasn't this question asked and thoroughly answered like over a month ago? Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate

Re: [Flashcoders] A Question that I've been asking for years!!

2008-09-05 Thread sebastian
Or this book, which is specifically concerning design patterns in AS: http://oreilly.com/catalog/9780596528461/ Alternatively, 'Friends of Ed' also make GREAT books, and they have several on the subject of AS, OOP design patterns. They are more like 'classes in a book' that you can later

RE: [Flashcoders] A Question that I've been asking for years!!

2008-09-05 Thread Merrill, Jason
What I mean is, this same THREAD! :) Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and

Re: [Flashcoders] A Question that I've been asking for years!!

2008-09-02 Thread EECOLOR
There is one usecase that most Flash developers will come across. Lets say we have a loader.swf in which the main (or base) class is Loader.as. Loader.as loads main.swf, main.swf has as main (or base) class Main.as. Loader.as needs to give a signal to the loaded main.swf and tries to type the

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-27 Thread Mark Winterhalder
I think Hans (and Claus ;) explained it very well, so just to reiterate, sometimes it's just useful to specify methods instead of ancestors as an argument type. For an example, have a look at flash.utils.IDataInput. It's implemented by ByteArray, Socket and URLStream. Obviously, a ByteArray and a

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-27 Thread Ian Thomas
On Wed, Aug 27, 2008 at 7:30 AM, Mark Winterhalder [EMAIL PROTECTED] wrote: Say you write a class that draws a pretty chart. It has a method that reads a series of values by repeatedly calling readInt(), which is guaranteed by IDataInput, and draws that data. If your method takes a ByteArray,

RE: [Flashcoders] A Question that I've been asking for years!!

2008-08-26 Thread Cor
An interface is used to control that the classes who extends the interface mandatory have at least the same methods and properties. So when you work in a team of programmers/developers everyone using/extending this class MUST confirm all these methods and properties. HTH Cor ;-)

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-26 Thread Claus Wahlers
An example is worth a thousand words. public interface IBounce { function bounce():void; } public class Balls implements IBounce { public function bounce():void { } } public class Boobs implements IBounce { public function bounce():void { } } var balls:Balls = new Balls(); var

RE: [Flashcoders] A Question that I've been asking for years!!

2008-08-26 Thread Cor
Very good, Claus, Do you have a visual of this... LOL Regards Cor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Claus Wahlers Sent: dinsdag 26 augustus 2008 9:42 To: Flash Coders List Subject: Re: [Flashcoders] A Question that I've been asking for

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-26 Thread Hans Wichman
Hi, interfaces are pretty simple in reality and they are everywhere. Imagine every wall outlet looked different, and not only different, but that in order to use them, you had to remove the outlet first, take a look at the wiring and then bolt it back on with you finally knowing how to use it.

RE: [Flashcoders] A Question that I've been asking for years!!

2008-08-26 Thread Cor
Nice explaination Hans, BTW to use my dutch MP3-player there is an adapter (interface) for every country. But maybe it would be better if the Dutch took over the world LOL Cor Yeah... Dutch!! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans

[Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Omar Fouad
This could seem weird... But what the hell is an interface!!! I've read lots of books and posts without getting the answer. I bought Essential AS3 to read about interfaces and he says that helps for multi inheritance. In other places I read that it is a deal to ensure that a class has some

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Rob Sampson
I'm certainly no expert but as I understand it, an interface is a class that is only good for inheriting, never instantiating. For example - if you were going to write two classes - Baseball and Softball, you would want a parent class Ball. However, you won't ever instantiate a Ball, you'll always

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread ben gomez farrell
Hey I don't know what kind of development teams your working with, but I've found that on small one off projects done with a small team, they aren't that important. It's more of a big team, long term project, lotsa code type thing. You can absolutely go with never using them, but it's a nice

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Omar Fouad
Wow... Thanks! Ben, would you please explain the last part that talks about type casting? Another Question: I've also read that using interface is more OOP. How? Cordially On Tue, Aug 26, 2008 at 2:23 AM, ben gomez farrell [EMAIL PROTECTED]wrote: Hey I don't know what kind of development teams

RE: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Merrill, Jason
Interfaces have nothing to do with inheritance (at least not directly) as I understand them. Interfaces are special classes that simply define what other classes must define. A class that implements an interface has to define the methods and properties defined in an interface. An interface is

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread ben gomez farrell
H, not sure what you're stumbling on - of course all this stuff is a mouthful, so my point is I could've been unclear in ANYTHING! Anyway - so typecasting variables - Lets say you have a variable...in AS3 the compiler needs to know what type of variable it is. so var x = 4 will just

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Jon Bradley
On Aug 25, 2008, at 6:39 PM, Omar Fouad wrote: But what the hell is an interface!!! I've read lots of books and posts without getting the answer. I bought Essential AS3 to read about interfaces and he says that helps for multi inheritance. In other places I read that it is a deal

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Juan Pablo Califano
Focusing on the contract part always seemed to me a bit misleading about what interfaces are, from a developer point of view. I mean, I understand that using an interface will make the compiler force you to implement some method, with some given signature, and I see the value in it, especially

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Omar Fouad
Ok, but how does an Interface help in this case? On Tue, Aug 26, 2008 at 4:10 AM, ben gomez farrell [EMAIL PROTECTED]wrote: H, not sure what you're stumbling on - of course all this stuff is a mouthful, so my point is I could've been unclear in ANYTHING! Anyway - so typecasting variables

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Juan Pablo Califano
If you are using a cracked out language like VB, they might be marginally useful in weird circumstances that are, in my opinion, probably poor programming choices in the first place. They serve little purpose in general, and even less in actionscript. This strikes me as the typical gratiutous

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread ben gomez farrell
Yah, maybe the word isn't contract but a contract with loopholes. Anyway, it does a good job of getting intention across, regardless, across a broad set of code. But yah, i can see the value in it, and I can see that its a little extra effort that might not be worth it. I'm still more in

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread Jon Bradley
On Aug 25, 2008, at 10:07 PM, Juan Pablo Califano wrote: This strikes me as the typical gratiutous bashing of some product just because it's made by MS. But perhaps you could elaborate a bit more on the idea... Nah, it doesn't have anything to do with Microsoft. I don't have anything

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-25 Thread ben gomez farrell
u I just don't know how else to explain! If using multiple similar classes it can tie them together in a way that: 1. Helps autocomplete 2. Helps the compiler catch errors in its tracks, so you don't get runtime errors I can't explain any better than what I've done! Sorry I can't