RE: [Flashcoders] Tell me more about _global

2006-02-02 Thread j.c.wichman
* yawns *

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
Sent: Wednesday, February 01, 2006 9:57 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global

 Apart from that, your email takes a kind of 
 i-won't-use-names-but-I'll-try-to-offend-you-all anyway tone, and your 
 assumptions are just plain wrong on multiple levels. As I said simply 
 the tone of your email makes it clear there is no use discussing it as 
 well, you seem to have it all sorted out.

Of course!  I explain, albeit sardonically, on multiple levels my stance,
and your response, not surprisingly is:

You're wrong, and obviously you're not smart enough to understand why, so
I'm not going to bother to explain, but you're wrong on lots of things.

A stereotypical cop out.  I guess I was wrong.  You're not as smart and
clever as I gave you credit for.  ;)

___
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


Re: [Flashcoders] Tell me more about _global

2006-02-02 Thread Thimon Sistermans [Us Media]

RTFM  stop this post please
regards


- Original Message - 
From: j.c.wichman [EMAIL PROTECTED]

To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
Sent: Thursday, February 02, 2006 9:34 AM
Subject: RE: [Flashcoders] Tell me more about _global



* yawns *

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven 
Sacks

Sent: Wednesday, February 01, 2006 9:57 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global


Apart from that, your email takes a kind of
i-won't-use-names-but-I'll-try-to-offend-you-all anyway tone, and your
assumptions are just plain wrong on multiple levels. As I said simply
the tone of your email makes it clear there is no use discussing it as
well, you seem to have it all sorted out.


Of course!  I explain, albeit sardonically, on multiple levels my stance,
and your response, not surprisingly is:

You're wrong, and obviously you're not smart enough to understand why, so
I'm not going to bother to explain, but you're wrong on lots of things.

A stereotypical cop out.  I guess I was wrong.  You're not as smart and
clever as I gave you credit for.  ;)

___
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


__ NOD32 1.1391 (20060201) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global--Back to the question

2006-02-02 Thread Manuel Saint-Victor
Okay- let's meander back to the part where I learn from my question
So If i create a class with a bunch of static methods from what I've read ,
I can use those methods without instantiating the class.  This would
effectively create the ability for them to be called from any timeline like
so  NotReallyGlobal.staticMethod();   Am I getting that part correct?


M


On 2/2/06, Thimon Sistermans [Us Media] [EMAIL PROTECTED] wrote:

 RTFM  stop this post please
 regards


 - Original Message -
 From: j.c.wichman [EMAIL PROTECTED]
 To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
 Sent: Thursday, February 02, 2006 9:34 AM
 Subject: RE: [Flashcoders] Tell me more about _global


 * yawns *
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Steven
  Sacks
  Sent: Wednesday, February 01, 2006 9:57 PM
  To: 'Flashcoders mailing list'
  Subject: RE: [Flashcoders] Tell me more about _global
 
  Apart from that, your email takes a kind of
  i-won't-use-names-but-I'll-try-to-offend-you-all anyway tone, and your
  assumptions are just plain wrong on multiple levels. As I said simply
  the tone of your email makes it clear there is no use discussing it as
  well, you seem to have it all sorted out.
 
  Of course!  I explain, albeit sardonically, on multiple levels my
 stance,
  and your response, not surprisingly is:
 
  You're wrong, and obviously you're not smart enough to understand why,
 so
  I'm not going to bother to explain, but you're wrong on lots of things.
 
  A stereotypical cop out.  I guess I was wrong.  You're not as smart and
  clever as I gave you credit for.  ;)
 
  ___
  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
 
 
  __ NOD32 1.1391 (20060201) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 

 ___
 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


Re: [Flashcoders] Tell me more about _global--Back to the question

2006-02-02 Thread Ian Thomas
On 2/2/06, Manuel Saint-Victor [EMAIL PROTECTED] wrote:

 Okay- let's meander back to the part where I learn from my question
 So If i create a class with a bunch of static methods from what I've read
 ,
 I can use those methods without instantiating the class.  This would
 effectively create the ability for them to be called from any timeline
 like
 so  NotReallyGlobal.staticMethod();   Am I getting that part correct?


 M


Hi Manuel,
  Yes, that's correct.

Ian
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global--Back to the question

2006-02-02 Thread Manuel Saint-Victor
Thanks Ian.

On 2/2/06, Ian Thomas [EMAIL PROTECTED] wrote:

 On 2/2/06, Manuel Saint-Victor [EMAIL PROTECTED] wrote:
 
  Okay- let's meander back to the part where I learn from my question
  So If i create a class with a bunch of static methods from what I've
 read
  ,
  I can use those methods without instantiating the class.  This would
  effectively create the ability for them to be called from any timeline
  like
  so  NotReallyGlobal.staticMethod();   Am I getting that part correct?
 
 
  M
 

 Hi Manuel,
   Yes, that's correct.

 Ian
 ___
 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


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread j.c.wichman
Hi,
I think there are very good reasons to make a class for it, some of them
mentioned before:
It allows you to:
- debug values stored
- add listeners for changes/updates
- detect collisions
- track where changes made are coming from, or at least when they happen
- implement serialization/deserialization over a collection of these values
- adheres to the idea of requesting rather than simply taking which is good
practice in general

Greetz
Hans

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Morten
Barklund TBWA\Play
Sent: Wednesday, February 01, 2006 9:43 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Tell me more about _global

Steven Sacks wrote:
 
 Making a class for globals is lame.  I don't get why people do stuff 
 like that.  It's completely unnecessary.  Here's how I make a 
 namespace for globals in one line.
 
 On frame one of the root timeline:
 
 _global.APP = {};
 
 Wow. That was so hard.

I can make the same, now it's just OOP:

dynamic class APP {}

Wow, that was easy - and without even mentioning _global. They do exactly
the same; will you still recommend your version over mine? :)

--
Morten Barklund - Information Architect - TBWA\Play Gothersgade 49, 4th
floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174

___
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


Re: [Flashcoders] Tell me more about _global

2006-02-01 Thread Nathan Derksen
Yah, as Ian mentioned, you lose all type checking with this  
technique. Also, you require that the object be in the global name  
space, while a singleton class does not clutter up the global  
namespace at all (var globalData = AppState.getInstance();  
globalData.foo = bar). Finally, how do you alert other parts of the  
application to a change in a property? Setters and getters can do  
that for you automatically by broadcasting an event, but an anonymous  
object can't do that, you have to trigger the event yourself when you  
change the property.


Not understanding why something is done in a particular way does not  
make it lame.


Nathan
http://www.nathanderksen.com


On Jan 31, 2006, at 3:08 PM, Steven Sacks wrote:

Making a class for globals is lame.  I don't get why people do  
stuff like

that.  It's completely unnecessary.  Here's how I make a namespace for
globals in one line.

On frame one of the root timeline:

_global.APP = {};

Wow. That was so hard.

APP.someglobal
APP.someotherglobal
APP.etc




Nathan Derksen nderksen at sfu.ca wrote:

I generally keep at least one singleton class which is responsible
for storing global properties. I make those properties accessible
with getters and setters so that I can allow changes in those
properties to trigger events. You can't really do that if you use
_global to store your data. Also, there is always a risk in name
space collision if you load in other elements that also use global,
where one or more variables use the same name and are thus
inadvertently shared for different uses. You definitely do not want
to use _global within any classes that you create, as that

can cause

entanglement, gives you no private protection, and does not

properly

contain your code into a well-defined unit with a well-defined API.

Nathan
http://www.nathanderksen.com


___
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


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Pedro Furtado
Supported!
I dare to add a few thoughts of me own.
A good application is one that works, an excellent application is one that
works fast.
That said and with utra-tight deadlines together with designers having to
open my fla so they can make it pretty while I make the next app, _global
rules!

This of course doesn't apply to frameworks and such, but still there's room
for everything.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
Sent: quarta-feira, 1 de Fevereiro de 2006 19:43
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global

Let's make classes for everything.  Let's make components out of everything.
There are so many benefits to complicating things and we CAN do it so we
SHOULD do it because it's so clever and smart to do it that way.  Let's code
everything in one frame when working closely with designers so we can make
them feel stupid and helpless when they go into our application and can't
find anything and we can feel so superior to them because it's so obvious
and now we have to walk them through it and by doing so can show them how
smart and clever we are.

Let's stroke our egos to prove what smart coders we are and program job
security into our applications by making it extremely difficult for our
clients to hire anyone else to work on our code, especially considering we
might not be available (busy, vacation, dead) to help walk anyone through
the complicated messaging system we've put into place to do something as
simple as storing global variables.  It's such a clever way of doing things,
don't you see?  We've built a better mousetrap!  Those people using a simple
global namespace objects are suckers!

I'm not saying variable watchers and events don't have their place, but
we're talking about a global namespace to store variables available to the
entire application, a replacement for _global and the conflicts that can
arise from it, something that has been done longer than you've been coding.
You're acting like a simple global namespace to store variables is only for
noob coders and that really smart coders make their code super complicated.
You guys are the reason Dreamweaver MX 2004, Photoshop 7, etc. take 10-20
seconds to start up instead of 1-3 like their predecessors.  You guys are
the reason many clients have bad tastes in their mouths from working with
independent contractors.  Why not apply your cleverness and creativity to
planning your next DD campaign or go learn a real programming language like
C and learn to program games if you're so smart.

As far as debugging goes, I've never had trouble with standard debugging
techniques.  You know, like trace() and NetDebug.trace().  Quick and easy.
Here's my debug code:

import mx.remoting.debug.NetDebug;
NetDebug.initialize();
_global.out = function(m) {
trace(m);
NetDebug.trace(m);
}

Oh noes!  It's not complicated enough for you!  Feel superior in your
complicated debugging style!

;)

___
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


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Pedro Furtado
Fast ones :D
7/10 are interactive advertising, which means that I have usually 2 weeks(at
best) to do something that doesn't relate and never had the time to make me
own framework.
Still I insist in a one frame architecture, and leave the all the item in
the library for the designers.

May I ask why the curiosity?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert Chyko
Sent: quarta-feira, 1 de Fevereiro de 2006 20:10
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Tell me more about _global

I'm just curious to know what kind of projects these are that you are
working on?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pedro
Furtado
Sent: Wednesday, February 01, 2006 2:52 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global


Supported!
I dare to add a few thoughts of me own.
A good application is one that works, an excellent application is one
that
works fast.
That said and with utra-tight deadlines together with designers having
to
open my fla so they can make it pretty while I make the next app,
_global
rules!

This of course doesn't apply to frameworks and such, but still there's
room
for everything.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks
Sent: quarta-feira, 1 de Fevereiro de 2006 19:43
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global

Let's make classes for everything.  Let's make components out of
everything.
There are so many benefits to complicating things and we CAN do it so we
SHOULD do it because it's so clever and smart to do it that way.  Let's
code
everything in one frame when working closely with designers so we can
make
them feel stupid and helpless when they go into our application and
can't
find anything and we can feel so superior to them because it's so
obvious
and now we have to walk them through it and by doing so can show them
how
smart and clever we are.

Let's stroke our egos to prove what smart coders we are and program job
security into our applications by making it extremely difficult for our
clients to hire anyone else to work on our code, especially considering
we
might not be available (busy, vacation, dead) to help walk anyone
through
the complicated messaging system we've put into place to do something as
simple as storing global variables.  It's such a clever way of doing
things,
don't you see?  We've built a better mousetrap!  Those people using a
simple
global namespace objects are suckers!

I'm not saying variable watchers and events don't have their place, but
we're talking about a global namespace to store variables available to
the
entire application, a replacement for _global and the conflicts that can
arise from it, something that has been done longer than you've been
coding.
You're acting like a simple global namespace to store variables is only
for
noob coders and that really smart coders make their code super
complicated.
You guys are the reason Dreamweaver MX 2004, Photoshop 7, etc. take
10-20
seconds to start up instead of 1-3 like their predecessors.  You guys
are
the reason many clients have bad tastes in their mouths from working
with
independent contractors.  Why not apply your cleverness and creativity
to
planning your next DD campaign or go learn a real programming language
like
C and learn to program games if you're so smart.

As far as debugging goes, I've never had trouble with standard debugging
techniques.  You know, like trace() and NetDebug.trace().  Quick and
easy.
Here's my debug code:

import mx.remoting.debug.NetDebug;
NetDebug.initialize();
_global.out = function(m) {
trace(m);
NetDebug.trace(m);
}

Oh noes!  It's not complicated enough for you!  Feel superior in your
complicated debugging style!

;)

___
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


Re: [Flashcoders] Tell me more about _global

2006-02-01 Thread Dave Mennenoh
Let's code everything in one frame when working closely with designers so 
we can make

them feel stupid and helpless when they go into our application and can't
find anything and we can feel so superior to them because it's so obvious
and now we have to walk them through it and by doing so can show them how
smart and clever we are.


Really well put Steven! I agree 100% - OOP and components are great - at 
times. But forcing the issue really only shows lack of programming knowledge 
IMO. I use globals still - they are perfect for many things. Anyone who says 
different is merely showing their lack of experience at coding.



Dave -
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/ 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Steven Sacks
Fast, bug-free ones.  ;)
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Robert Chyko
 Sent: Wednesday, February 01, 2006 12:10 PM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Tell me more about _global
 
 I'm just curious to know what kind of projects these are that you are
 working on?

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Steven Sacks
They're theorycoders, the type that post pseudocode to forums and mailing
lists.  More often than not their pseudocode doesn't work and only serves to
confuse others who think they're getting a lesson from a smart and
experienced coder.  These theorycoders have book smarts but lack street
smarts.  They have never worked on a big project with other programmers so
they code in the most selfish and self-centered way as an exercise in mental
masturbation.
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Dave Mennenoh
 Sent: Wednesday, February 01, 2006 12:26 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Tell me more about _global
 
 Really well put Steven! I agree 100% - OOP and components are 
 great - at 
 times. But forcing the issue really only shows lack of 
 programming knowledge 
 IMO. I use globals still - they are perfect for many things. 
 Anyone who says 
 different is merely showing their lack of experience at coding.
 
 
 Dave -
 www.blurredistinction.com
 www.macromedia.com/support/forums/team_macromedia/ 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread j.c.wichman
You have been watching us through our webcams, haven't you? Ah come on...
Just admit it... It's okay...

I must say I do agree with your first line... After that it got a bit
blurry.

See I always thought that the guyz using only global vars with obscure names
calling them from god-knows-where, were going for the job security thing.
Apart from that, your email takes a kind of
i-won't-use-names-but-I'll-try-to-offend-you-all anyway tone, and your
assumptions are just plain wrong on multiple levels. As I said simply the
tone of your email makes it clear there is no use discussing it as well, you
seem to have it all sorted out. 





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
Sent: Wednesday, February 01, 2006 8:43 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global

Let's make classes for everything.  Let's make components out of everything.
There are so many benefits to complicating things and we CAN do it so we
SHOULD do it because it's so clever and smart to do it that way.  Let's code
everything in one frame when working closely with designers so we can make
them feel stupid and helpless when they go into our application and can't
find anything and we can feel so superior to them because it's so obvious
and now we have to walk them through it and by doing so can show them how
smart and clever we are.

Let's stroke our egos to prove what smart coders we are and program job
security into our applications by making it extremely difficult for our
clients to hire anyone else to work on our code, especially considering we
might not be available (busy, vacation, dead) to help walk anyone through
the complicated messaging system we've put into place to do something as
simple as storing global variables.  It's such a clever way of doing things,
don't you see?  We've built a better mousetrap!  Those people using a simple
global namespace objects are suckers!

I'm not saying variable watchers and events don't have their place, but
we're talking about a global namespace to store variables available to the
entire application, a replacement for _global and the conflicts that can
arise from it, something that has been done longer than you've been coding.
You're acting like a simple global namespace to store variables is only for
noob coders and that really smart coders make their code super complicated.
You guys are the reason Dreamweaver MX 2004, Photoshop 7, etc. take 10-20
seconds to start up instead of 1-3 like their predecessors.  You guys are
the reason many clients have bad tastes in their mouths from working with
independent contractors.  Why not apply your cleverness and creativity to
planning your next DD campaign or go learn a real programming language like
C and learn to program games if you're so smart.

As far as debugging goes, I've never had trouble with standard debugging
techniques.  You know, like trace() and NetDebug.trace().  Quick and easy.
Here's my debug code:

import mx.remoting.debug.NetDebug;
NetDebug.initialize();
_global.out = function(m) {
trace(m);
NetDebug.trace(m);
}

Oh noes!  It's not complicated enough for you!  Feel superior in your
complicated debugging style!

;)

___
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


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Steven Sacks
Want an example?  I wrote this desktop application.

http://www.directv.com/see/landing/gametracker/gametracker.html 

In the first 6 months of deployment, they received THREE (count them 3)
requests for help, and all three ended up having to do with their backend
having issues.  The application is designed to run indefinitely on a
computer and as such is fast, efficient, extremely stable, and has extensive
memory management.

Oh, and it uses a global namespace.  :P



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Steven Sacks
 Sent: Wednesday, February 01, 2006 12:27 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Tell me more about _global
 
 Fast, bug-free ones.  ;)
  
 
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf 
  Of Robert Chyko
  Sent: Wednesday, February 01, 2006 12:10 PM
  To: Flashcoders mailing list
  Subject: RE: [Flashcoders] Tell me more about _global
  
  I'm just curious to know what kind of projects these are 
 that you are
  working on?

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Robert Chyko
Sure... Should have probably explained the curiousity more up front
anyway...

I guess I'm just looking at it from the other side of the fence - I
currently work with a web-based application in which parts of the
front-end are done in Flash (and getting the rest of the pieces over to
Flash is part of my job).  

A few of the screens are fairly old and contain a lot of
non-traditional coding practices, like _global and the like.
Basically in my experience these have been - for me - harder to follow,
debug, etc. - maintain in general.  So I guess I kinda look at things
like _global in a bad light because of the experience I've had with them
- and I was just curious as to what end product you were making that you
felt _global were useful.

I think the biggest difference between what we do is that I've never had
to pass my code of to a designer to make pretty - the few of us here
that write the ActionScript also design the interfaces as well - so
having some one else look at it and have no clue what is going on has
never been an issue really.  (And this really isn't a problem - cause we
aren't doing anything too fancy e.g advertising)



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pedro
Furtado
Sent: Wednesday, February 01, 2006 3:24 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global


Fast ones :D
7/10 are interactive advertising, which means that I have usually 2
weeks(at
best) to do something that doesn't relate and never had the time to make
me
own framework.
Still I insist in a one frame architecture, and leave the all the item
in
the library for the designers.

May I ask why the curiosity?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Chyko
Sent: quarta-feira, 1 de Fevereiro de 2006 20:10
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Tell me more about _global

I'm just curious to know what kind of projects these are that you are
working on?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pedro
Furtado
Sent: Wednesday, February 01, 2006 2:52 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global


Supported!
I dare to add a few thoughts of me own.
A good application is one that works, an excellent application is one
that
works fast.
That said and with utra-tight deadlines together with designers having
to
open my fla so they can make it pretty while I make the next app,
_global
rules!

This of course doesn't apply to frameworks and such, but still there's
room
for everything.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks
Sent: quarta-feira, 1 de Fevereiro de 2006 19:43
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tell me more about _global

Let's make classes for everything.  Let's make components out of
everything.
There are so many benefits to complicating things and we CAN do it so we
SHOULD do it because it's so clever and smart to do it that way.  Let's
code
everything in one frame when working closely with designers so we can
make
them feel stupid and helpless when they go into our application and
can't
find anything and we can feel so superior to them because it's so
obvious
and now we have to walk them through it and by doing so can show them
how
smart and clever we are.

Let's stroke our egos to prove what smart coders we are and program job
security into our applications by making it extremely difficult for our
clients to hire anyone else to work on our code, especially considering
we
might not be available (busy, vacation, dead) to help walk anyone
through
the complicated messaging system we've put into place to do something as
simple as storing global variables.  It's such a clever way of doing
things,
don't you see?  We've built a better mousetrap!  Those people using a
simple
global namespace objects are suckers!

I'm not saying variable watchers and events don't have their place, but
we're talking about a global namespace to store variables available to
the
entire application, a replacement for _global and the conflicts that can
arise from it, something that has been done longer than you've been
coding.
You're acting like a simple global namespace to store variables is only
for
noob coders and that really smart coders make their code super
complicated.
You guys are the reason Dreamweaver MX 2004, Photoshop 7, etc. take
10-20
seconds to start up instead of 1-3 like their predecessors.  You guys
are
the reason many clients have bad tastes in their mouths from working
with
independent contractors.  Why not apply your cleverness and creativity
to
planning your next DD campaign or go learn a real programming language
like
C and learn to program games if you're so smart.

As far as debugging goes, I've never had trouble with standard debugging
techniques.  You know, like trace() and NetDebug.trace().  Quick

RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Steven Sacks
 Apart from that, your email takes a kind of
 i-won't-use-names-but-I'll-try-to-offend-you-all anyway tone, and your
 assumptions are just plain wrong on multiple levels. As I 
 said simply the
 tone of your email makes it clear there is no use discussing 
 it as well, you
 seem to have it all sorted out. 

Of course!  I explain, albeit sardonically, on multiple levels my stance,
and your response, not surprisingly is:

You're wrong, and obviously you're not smart enough to understand why, so
I'm not going to bother to explain, but you're wrong on lots of things.

A stereotypical cop out.  I guess I was wrong.  You're not as smart and
clever as I gave you credit for.  ;)

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global

2006-02-01 Thread Adam Fahy

Steven Sacks wrote:


A stereotypical cop out.  I guess I was wrong.  You're not as smart and
clever as I gave you credit for.  ;)


I think this conversation is wandering close to the line for what I 
assume is a professional mailing list.  Take the flame war to personal 
email please.



-Adam

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global

2006-02-01 Thread ryanm
7/10 are interactive advertising, which means that I have usually 2 
weeks(at
best) to do something that doesn't relate and never had the time to make 
me

own framework.

   Has it occurred to you that if you built a class and got in the habit of 
using it, it would take exactly the same amount of time and have 10x the 
flexibility of your faster way? See, the whole idea of an architecture 
is to not have to redesign it for every app; you resuse it every time so 
that once it's there, you can use that codebase to build anything you want.


   All this talk about real programmers and theorycoders is pretty 
laughable. I especially like the part about using OOP techniques as job 
security so that they can't bring anyone else in to read your code, when 
that's actually pretty much the opposite of the reality of the situation: 
any *competent* programmer could understand it, and your problems with these 
methodologies speak more about you than your breadth of experience.


   I routinely have Java and C# programmers do code reviews on my AS2 code. 
You know how that's possible? I use OOP techniques, so that it is apparent 
what the code is doing even though the guy doing the review doesn't 
understant the specific of the APIs I'm accessing. They don't need to know 
specifically why these APIs work the way they do, all they need to do is 
read my inline comments and look at the code changes, and it is immediately 
apparent to them what was changed and why. Any of those guys could replace 
me with a bit of time spent learning the APIs, the syntax is essentially the 
same and my codebase is clean and well documented, so it would be easy for 
anyone with any experience to take over it with a minimal learning curve.


   It's true, designing interactive banner ads generally does not require 
these lengths, but neither do banner ads usually require maintenance, so 
what difference does it make? If you build one-off, deliver-it-and-forget-it 
Flash work, good for you, your coding style is irrelevant, both to you and 
to the rest of the world, because no one will ever have to look at it again. 
For those of us who do actually have to revisit and maintain code, and who 
sometimes inherit large codebases, these things are not only important, they 
are essential.


I'll just close with a great quote from earlier in the thread:

'Not understanding why something is done in a particular way does not make 
it lame.'


ryanm 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Steven Sacks
I'm not opposed to writing classes.  I'm opposed to overcomplicating things
that are simple and should stay simple.  You seem to get the impression that
I am a noob coder.

A global namespace as an object is all you need for managing global
variables.

If you have variables that need complicated watching and events then putting
them in a global namespace is the wrong place for them because they're
obviously more specialized and belong in a class that is meant for managing
what those variables are about, thereby nullifying the reason to put them in
a global namespace.  Technically, any variable in any class is, in effect, a
variable in a global namespace.  That doesn't mean you should write a class
for storing globals.  It's an extra layer of abstraction that only serves to
complicate something that is straightforward and simple.

Getting on mailing lists and telling people the most complicated way to do
something simple is ridiculous.  The original poster didn't have much
knowledge about global namespaces and you guys are going to immediately jump
into the most complicated way of handling it, sans any explanation (or your
lovely pseudocode).

I never said OOP is job security.  I never said OOP is complicated.  You
took what I was saying about coding simple things to be complicated and
tried to spin it to include all OOP.  Using a class to manage global
variables is complicated and is a ridiculous way to answer a simple question
(and handle a simple thing).  You don't need to put everything in a class or
component to code OOP correctly.  There is such a thing as taking OOP too
far.

We're talking about global variables here.  It's like you're saying who
needs globals?  If you think globals are so noob that they need to be
replaced with a dedicated class for managing variables, then why are global
variables present in pretty much every modern programming language?  I guess
you guys outsmarted all the engineers who write the languages you code in.
Kudos!

I mean, the fact that you need a class to manage your globals because it
makes it easier for debugging is telling.  How overcomplicated is your code
that it is so buggy that you need a class just to debug your global
variables?

 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of ryanm
 Sent: Wednesday, February 01, 2006 1:30 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Tell me more about _global
 
  7/10 are interactive advertising, which means that I have usually 2 
  weeks(at
  best) to do something that doesn't relate and never had the 
 time to make 
  me
  own framework.
 
 Has it occurred to you that if you built a class and got 
 in the habit of 
 using it, it would take exactly the same amount of time and 
 have 10x the 
 flexibility of your faster way? See, the whole idea of an 
 architecture 
 is to not have to redesign it for every app; you resuse it 
 every time so 
 that once it's there, you can use that codebase to build 
 anything you want.
 
 All this talk about real programmers and theorycoders 
 is pretty 
 laughable. I especially like the part about using OOP 
 techniques as job 
 security so that they can't bring anyone else in to read 
 your code, when 
 that's actually pretty much the opposite of the reality of 
 the situation: 
 any *competent* programmer could understand it, and your 
 problems with these 
 methodologies speak more about you than your breadth of experience.
 
 I routinely have Java and C# programmers do code reviews 
 on my AS2 code. 
 You know how that's possible? I use OOP techniques, so that 
 it is apparent 
 what the code is doing even though the guy doing the review doesn't 
 understant the specific of the APIs I'm accessing. They don't 
 need to know 
 specifically why these APIs work the way they do, all they 
 need to do is 
 read my inline comments and look at the code changes, and it 
 is immediately 
 apparent to them what was changed and why. Any of those guys 
 could replace 
 me with a bit of time spent learning the APIs, the syntax is 
 essentially the 
 same and my codebase is clean and well documented, so it 
 would be easy for 
 anyone with any experience to take over it with a minimal 
 learning curve.
 
 It's true, designing interactive banner ads generally 
 does not require 
 these lengths, but neither do banner ads usually require 
 maintenance, so 
 what difference does it make? If you build one-off, 
 deliver-it-and-forget-it 
 Flash work, good for you, your coding style is irrelevant, 
 both to you and 
 to the rest of the world, because no one will ever have to 
 look at it again. 
 For those of us who do actually have to revisit and maintain 
 code, and who 
 sometimes inherit large codebases, these things are not only 
 important, they 
 are essential.
 
 I'll just close with a great quote from earlier in the thread:
 
 'Not understanding why something is done in a particular way 
 does not make 
 it lame

RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Scott Hyndman
You are clearly an idiot.

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Steven Sacks
Sent:   Wed 2/1/2006 2:43 PM
To: 'Flashcoders mailing list'
Cc: 
Subject:RE: [Flashcoders] Tell me more about _global
Let's make classes for everything.  Let's make components out of everything.
There are so many benefits to complicating things and we CAN do it so we
SHOULD do it because it's so clever and smart to do it that way.  Let's code
everything in one frame when working closely with designers so we can make
them feel stupid and helpless when they go into our application and can't
find anything and we can feel so superior to them because it's so obvious
and now we have to walk them through it and by doing so can show them how
smart and clever we are.

Let's stroke our egos to prove what smart coders we are and program job
security into our applications by making it extremely difficult for our
clients to hire anyone else to work on our code, especially considering we
might not be available (busy, vacation, dead) to help walk anyone through
the complicated messaging system we've put into place to do something as
simple as storing global variables.  It's such a clever way of doing things,
don't you see?  We've built a better mousetrap!  Those people using a simple
global namespace objects are suckers!

I'm not saying variable watchers and events don't have their place, but
we're talking about a global namespace to store variables available to the
entire application, a replacement for _global and the conflicts that can
arise from it, something that has been done longer than you've been coding.
You're acting like a simple global namespace to store variables is only for
noob coders and that really smart coders make their code super complicated.
You guys are the reason Dreamweaver MX 2004, Photoshop 7, etc. take 10-20
seconds to start up instead of 1-3 like their predecessors.  You guys are
the reason many clients have bad tastes in their mouths from working with
independent contractors.  Why not apply your cleverness and creativity to
planning your next DD campaign or go learn a real programming language like
C and learn to program games if you're so smart.

As far as debugging goes, I've never had trouble with standard debugging
techniques.  You know, like trace() and NetDebug.trace().  Quick and easy.
Here's my debug code:

import mx.remoting.debug.NetDebug;
NetDebug.initialize();
_global.out = function(m) {
trace(m);
NetDebug.trace(m);
}

Oh noes!  It's not complicated enough for you!  Feel superior in your
complicated debugging style!

;)

___
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


Re: [Flashcoders] Tell me more about _global

2006-02-01 Thread ryanm

A global namespace as an object is all you need for managing global
variables.

   ...as long as you don't want compile-time type checking, the ability to 
watch one of them or fire an event from them *ever*, and so on and so forth. 
Oh, wait... I get it now! *You're* that guy whose project I inherited with 
this line found mysteriously in it:


_global.dog = bone;

   If you're that guy, I hate you.

If you have variables that need complicated watching and events then 
putting

them in a global namespace is the wrong place for them because they're
obviously more specialized and belong in a class that is meant for 
managing
what those variables are about, thereby nullifying the reason to put them 
in
a global namespace.  Technically, any variable in any class is, in effect, 
a
variable in a global namespace.  That doesn't mean you should write a 
class
for storing globals.  It's an extra layer of abstraction that only serves 
to

complicate something that is straightforward and simple.

   Unless you keep it straightforward and simple and only complicate it 
when necessary...



I never said OOP is job security.  I never said OOP is complicated.


   Someone did... and he looked suspiciously like you.


You don't need to put everything in a class or
component to code OOP correctly.  There is such a thing
as taking OOP too far.

   Well, if your entry point is the constructor of a class, then, 
technically, yeah, everything is in a class. I think what you mean is that 
it is possible to take *abstraction* too far, and I agree. Making a globals 
class that only allows objects that implement the globalvariable interface 
and inherit from the globalistic class would be taking it too far. Putting a 
class between your code and *any* kind of data is just a good idea, and that 
goes for databases, web services, and yes, global or session variables too. 
It allows the (absolutely necessary) validation that eliminates headaches 
later.



I mean, the fact that you need a class to manage your globals because it
makes it easier for debugging is telling.  How overcomplicated is your 
code

that it is so buggy that you need a class just to debug your global
variables?

   Depends on how many people are working on the project and how many 
different people will be setting those global values, and if I can count on 
them to set them to a predictable type, and if I need to know when they get 
set, and ...


ryanm 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global

2006-02-01 Thread David Peek
Besides, you don't want to go teaching people bad habits, especially 
when the _global scope is not long for this world...


AS2: _global
AS3: Removed.
Comment: Use a static member of a class instead.

from http://livedocs.macromedia.com/labs/1/flex/langref/index.html

David


You are clearly an idiot.

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Steven Sacks
Sent:   Wed 2/1/2006 2:43 PM
To: 'Flashcoders mailing list'
Cc: 
Subject:RE: [Flashcoders] Tell me more about _global
Let's make classes for everything.  Let's make components out of everything.
There are so many benefits to complicating things and we CAN do it so we
SHOULD do it because it's so clever and smart to do it that way.  Let's code
everything in one frame when working closely with designers so we can make
them feel stupid and helpless when they go into our application and can't
find anything and we can feel so superior to them because it's so obvious
and now we have to walk them through it and by doing so can show them how
smart and clever we are.

Let's stroke our egos to prove what smart coders we are and program job
security into our applications by making it extremely difficult for our
clients to hire anyone else to work on our code, especially considering we
might not be available (busy, vacation, dead) to help walk anyone through
the complicated messaging system we've put into place to do something as
simple as storing global variables.  It's such a clever way of doing things,
don't you see?  We've built a better mousetrap!  Those people using a simple
global namespace objects are suckers!

I'm not saying variable watchers and events don't have their place, but
we're talking about a global namespace to store variables available to the
entire application, a replacement for _global and the conflicts that can
arise from it, something that has been done longer than you've been coding.
You're acting like a simple global namespace to store variables is only for
noob coders and that really smart coders make their code super complicated.
You guys are the reason Dreamweaver MX 2004, Photoshop 7, etc. take 10-20
seconds to start up instead of 1-3 like their predecessors.  You guys are
the reason many clients have bad tastes in their mouths from working with
independent contractors.  Why not apply your cleverness and creativity to
planning your next DD campaign or go learn a real programming language like
C and learn to program games if you're so smart.

As far as debugging goes, I've never had trouble with standard debugging
techniques.  You know, like trace() and NetDebug.trace().  Quick and easy.
Here's my debug code:

import mx.remoting.debug.NetDebug;
NetDebug.initialize();
_global.out = function(m) {
trace(m);
NetDebug.trace(m);
}

Oh noes!  It's not complicated enough for you!  Feel superior in your
complicated debugging style!

;)

___
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


RE: [Flashcoders] Tell me more about _global

2006-02-01 Thread Steven Sacks
 You are clearly an idiot.
 
 Scott

Thanks for noticing.  :) 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global

2006-02-01 Thread Nathan Derksen
Coolness, I missed that before. The actual page that this is shown is  
http://livedocs.macromedia.com/labs/1/flex/langref/migration.html for  
those who don't want to search through the docs.


Nathan
http://www.nathanderksen.com


On Feb 1, 2006, at 6:29 PM, David Peek wrote:

Besides, you don't want to go teaching people bad habits,  
especially when the _global scope is not long for this world...


AS2: _global
AS3: Removed.
Comment: Use a static member of a class instead.

from http://livedocs.macromedia.com/labs/1/flex/langref/index.html

David


You are clearly an idiot.

Scott

-Original Message-
From:	[EMAIL PROTECTED] on behalf of  
Steven Sacks

Sent:   Wed 2/1/2006 2:43 PM
To: 'Flashcoders mailing list'
Cc: 
Subject:RE: [Flashcoders] Tell me more about _global
Let's make classes for everything.  Let's make components out of  
everything.
There are so many benefits to complicating things and we CAN do it  
so we
SHOULD do it because it's so clever and smart to do it that way.   
Let's code
everything in one frame when working closely with designers so we  
can make
them feel stupid and helpless when they go into our application  
and can't
find anything and we can feel so superior to them because it's so  
obvious
and now we have to walk them through it and by doing so can show  
them how

smart and clever we are.

Let's stroke our egos to prove what smart coders we are and  
program job
security into our applications by making it extremely difficult  
for our
clients to hire anyone else to work on our code, especially  
considering we
might not be available (busy, vacation, dead) to help walk anyone  
through
the complicated messaging system we've put into place to do  
something as
simple as storing global variables.  It's such a clever way of  
doing things,
don't you see?  We've built a better mousetrap!  Those people  
using a simple

global namespace objects are suckers!

I'm not saying variable watchers and events don't have their  
place, but
we're talking about a global namespace to store variables  
available to the
entire application, a replacement for _global and the conflicts  
that can
arise from it, something that has been done longer than you've  
been coding.
You're acting like a simple global namespace to store variables is  
only for
noob coders and that really smart coders make their code super  
complicated.
You guys are the reason Dreamweaver MX 2004, Photoshop 7, etc.  
take 10-20
seconds to start up instead of 1-3 like their predecessors.  You  
guys are
the reason many clients have bad tastes in their mouths from  
working with
independent contractors.  Why not apply your cleverness and  
creativity to
planning your next DD campaign or go learn a real programming  
language like

C and learn to program games if you're so smart.

As far as debugging goes, I've never had trouble with standard  
debugging
techniques.  You know, like trace() and NetDebug.trace().  Quick  
and easy.

Here's my debug code:

import mx.remoting.debug.NetDebug;
NetDebug.initialize();
_global.out = function(m) {
trace(m);
NetDebug.trace(m);
}

Oh noes!  It's not complicated enough for you!  Feel superior in your
complicated debugging style!

;)

___
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


Re: [Flashcoders] Tell me more about _global

2006-01-31 Thread Zárate
Hi,

For me one of the _global biggest problems is that EVERYONE,
EVERYWHERE can modify the value of a global variable. There's no
private attribute at all.

AND be careful because one Player 6 movie can NOT see global variables
of a Player 7 movie. And vicecersa, of course.

My 2 cents.

Bye!

On 1/31/06, Manuel Saint-Victor [EMAIL PROTECTED] wrote:
 I'm reading about the wrongs of using _global in various books and articles
 and blogs but I have used several extensions and resources that I am
 confident are well built that seem to be making use of _global. My current
 project has some use of _global in the code that I am updating an I m
 wondering in which cases I should try to remove those.   Is there a
 reference that I can read that would educate me on the reasons not to use
 _global and even tell me some workarounds that would allow me to safely use
 _Global if it's necessary.  I'm familiar with the use of the Singleton
 pattern but feel as if in some cases I might be better with some _globals.

 One case in particular that I'm considering is for some functions that we
 would like to have globally available. Am I better off making them static
 functions of a class (like  Math.random() etc)
 and having people importing the class or just plopping them as functions on
 the global timeline?

 Thanks in advance-

 Mani
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Zárate
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global

2006-01-31 Thread Nathan Derksen
I generally keep at least one singleton class which is responsible  
for storing global properties. I make those properties accessible  
with getters and setters so that I can allow changes in those  
properties to trigger events. You can't really do that if you use  
_global to store your data. Also, there is always a risk in name  
space collision if you load in other elements that also use global,  
where one or more variables use the same name and are thus  
inadvertently shared for different uses. You definitely do not want  
to use _global within any classes that you create, as that can cause  
entanglement, gives you no private protection, and does not properly  
contain your code into a well-defined unit with a well-defined API.


Nathan
http://www.nathanderksen.com


On Jan 31, 2006, at 6:26 AM, Manuel Saint-Victor wrote:

I'm reading about the wrongs of using _global in various books and  
articles

and blogs but I have used several extensions and resources that I am
confident are well built that seem to be making use of _global. My  
current

project has some use of _global in the code that I am updating an I m
wondering in which cases I should try to remove those.   Is there a
reference that I can read that would educate me on the reasons not  
to use
_global and even tell me some workarounds that would allow me to  
safely use

_Global if it's necessary.  I'm familiar with the use of the Singleton
pattern but feel as if in some cases I might be better with some  
_globals.


One case in particular that I'm considering is for some functions  
that we
would like to have globally available. Am I better off making them  
static

functions of a class (like  Math.random() etc)
and having people importing the class or just plopping them as  
functions on

the global timeline?

Thanks in advance-

Mani
___
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


Re: [Flashcoders] Tell me more about _global

2006-01-31 Thread Mark Winterhalder
also, if i read your code (or my own a few months after i've written
it), i have o way of knowing where that mysterious
_global.settings.maxItems property has been defined so i can change
it.

mark

--
http://snafoo.org/
jabber: [EMAIL PROTECTED]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE:[Flashcoders] Tell me more about _global

2006-01-31 Thread azsl1326-email
I am using _global variables throught my FLAs, probably because I haven't really
been exposed to the negatives of using them, thus not really knowing any 
better. 
I am interested in conforming to better 'design' standards and am familiar with
the Singleton Design Pattern. Any chance you could provide an example of how 
_global
variables might be stored in a class for retrieval and a later time.

Thanks.


Nathan Derksen nderksen at sfu.ca wrote:
I generally keep at least one singleton class which is responsible  
for storing global properties. I make those properties accessible  
with getters and setters so that I can allow changes in those  
properties to trigger events. You can't really do that if you use  
_global to store your data. Also, there is always a risk in name  
space collision if you load in other elements that also use global,  
where one or more variables use the same name and are thus  
inadvertently shared for different uses. You definitely do not want  
to use _global within any classes that you create, as that can cause  
entanglement, gives you no private protection, and does not properly  
contain your code into a well-defined unit with a well-defined API.

Nathan
http://www.nathanderksen.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Tell me more about _global

2006-01-31 Thread Steven Sacks
Making a class for globals is lame.  I don't get why people do stuff like
that.  It's completely unnecessary.  Here's how I make a namespace for
globals in one line.

On frame one of the root timeline:

_global.APP = {};

Wow. That was so hard.

APP.someglobal
APP.someotherglobal
APP.etc



 Nathan Derksen nderksen at sfu.ca wrote:
 I generally keep at least one singleton class which is responsible  
 for storing global properties. I make those properties accessible  
 with getters and setters so that I can allow changes in those  
 properties to trigger events. You can't really do that if you use  
 _global to store your data. Also, there is always a risk in name  
 space collision if you load in other elements that also use global,  
 where one or more variables use the same name and are thus  
 inadvertently shared for different uses. You definitely do not want  
 to use _global within any classes that you create, as that 
 can cause  
 entanglement, gives you no private protection, and does not 
 properly  
 contain your code into a well-defined unit with a well-defined API.
 
 Nathan
 http://www.nathanderksen.com
 
 ___
 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


RE: [Flashcoders] Tell me more about _global

2006-01-31 Thread Scott Hyndman
When it boils down to it, there is almost no difference between what you have 
just described and creating a class with static vars to hold constants.

The only difference being in the static class situation, the object on _global 
will be a Function (the class' constructor), not an Object.

And by using a class, you are provided the benefit of type-checking during 
compilation. I'm not sure many people would call this lame or unnecessary.

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Steven Sacks
Sent:   Tue 1/31/2006 6:08 PM
To: 'Flashcoders mailing list'
Cc: 
Subject:RE: [Flashcoders] Tell me more about _global

Making a class for globals is lame.  I don't get why people do stuff like
that.  It's completely unnecessary.  Here's how I make a namespace for
globals in one line.

On frame one of the root timeline:

_global.APP = {};

Wow. That was so hard.

APP.someglobal
APP.someotherglobal
APP.etc



 Nathan Derksen nderksen at sfu.ca wrote:
 I generally keep at least one singleton class which is responsible  
 for storing global properties. I make those properties accessible  
 with getters and setters so that I can allow changes in those  
 properties to trigger events. You can't really do that if you use  
 _global to store your data. Also, there is always a risk in name  
 space collision if you load in other elements that also use global,  
 where one or more variables use the same name and are thus  
 inadvertently shared for different uses. You definitely do not want  
 to use _global within any classes that you create, as that 
 can cause  
 entanglement, gives you no private protection, and does not 
 properly  
 contain your code into a well-defined unit with a well-defined API.
 
 Nathan
 http://www.nathanderksen.com
 
 ___
 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


Re: [Flashcoders] Tell me more about _global

2006-01-31 Thread Ian Thomas
That is, of course, one way to do it. If you want to throw out all your
type-checking and the like. Personally I like to make the compiler do as
much of my error-checking as possible, rather than having to hunt through by
hand - so prefer to be 'lame'. Particularly because I'm providing a
framework for other coders to code in.

There are hosts of articles scattered around the web as to why compile-time
type-checking is a Good Thing. And saves you time in the long run with
anything bigger than a small standalone project with one person working on
it. So I won't bother repeating all the arguments here - just have a quick
search on Google if you're interested - which, from your tone, I doubt you
are.

Just because people choose to do things in a different way from you - for a
whole host of _very good_ reasons - doesn't make them lame.

Ian

On 1/31/06, Steven Sacks [EMAIL PROTECTED] wrote:

 Making a class for globals is lame.  I don't get why people do stuff like
 that.  It's completely unnecessary.  Here's how I make a namespace for
 globals in one line.

 On frame one of the root timeline:

 _global.APP = {};

 Wow. That was so hard.

 APP.someglobal
 APP.someotherglobal
 APP.etc


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Tell me more about _global

2006-01-31 Thread Manuel Saint-Victor
That is a really good solution.  I think that the reason we do that is
because we are learning how to use object oriented programming techniques
and trying to synthesize various cloudy and sometimes contradictory
recommendations.

M

On 1/31/06, Steven Sacks [EMAIL PROTECTED] wrote:

 Making a class for globals is lame.  I don't get why people do stuff like
 that.  It's completely unnecessary.  Here's how I make a namespace for
 globals in one line.

 On frame one of the root timeline:

 _global.APP = {};

 Wow. That was so hard.

 APP.someglobal
 APP.someotherglobal
 APP.etc



  Nathan Derksen nderksen at sfu.ca wrote:
  I generally keep at least one singleton class which is responsible
  for storing global properties. I make those properties accessible
  with getters and setters so that I can allow changes in those
  properties to trigger events. You can't really do that if you use
  _global to store your data. Also, there is always a risk in name
  space collision if you load in other elements that also use global,
  where one or more variables use the same name and are thus
  inadvertently shared for different uses. You definitely do not want
  to use _global within any classes that you create, as that
  can cause
  entanglement, gives you no private protection, and does not
  properly
  contain your code into a well-defined unit with a well-defined API.
  
  Nathan
  http://www.nathanderksen.com
 
  ___
  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