My feeling is if the two components are related enough that tight
coupling is the desired option, then they really should be the same
single class. If that makes it so there would be too much code in one
class and the tasks so different, then they should be in separate
classes with events dispatched and listened to.
Jason Merrill
Bank of America Global Learning
Learning & Performance Soluions
Join the Bank of America Flash Platform Community and visit our
Instructional Technology Design Blog
(note: these are for Bank of America employees only)
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Latcho
Sent: Wednesday, November 18, 2009 9:25 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] one class listening for another
classesdispatchedevent
If like you said, --"totally tightly coupled solution is overkill."--
,than I can agree with you :P
But alright, to plug in on this matter. As I found out it's not hard to
lose the tight coupling.
The hard part is to find a system that works fast and intuitive for you.
Once you found or created one, you'll be happy to reuse that system,
even for simple setups and for the simple reason that it is YOUR OWN (
or preferred ) loosely coupled (event) system.
At that click you will find out that it that it can work more for you
than against you or against your speed.
Integrating a loosely coupled flow also helps you in creating your own
app-paradigm and workflow and enables you to start or reopen a project
faster.
You now know the best place to implement and to listen for that shout.
And a lightyear later when you look back into your crappy-small-app code
of the past, you will smile and think:
Nice try but I know better now ;)
Latcho
Matt Folkard wrote:
> I completely agree with this as I've been in exactly the same
> situation with a largish scale project. The sort of projects I tend to
> do are small scale games for which the *totally tightly coupled
> solution is overkill*. However, I've eaten my words on that point as
> well...
>
>
>
> On 17 Nov 2009, at 21:05, "Mendelsohn, Michael"
> wrote:
>
>> Alright, since I asked the question, I'm piping in. I just finished
>> a project that became immensely complicated precisely because I
>> eventually had everything tightly coupled. Had I used custom events
>> and done some other things from the get go, I'm nearly certain it
>> would have been easier to do my updates. With the tight coupling of
>> that project, it would be difficult for anyone else to go into it in
>> the future.
>>
>> In smaller one-off projects, I don't think it's a big deal, but I'm
>> trying to force myself to get in the habit of loosely coupling
>> everything, via custom events.
>>
>> - MM
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders