|
Home > Archive > Macromedia Flash Server > July 2006 > Design Patterns
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Bill Sanders 2006-07-11, 1:12 pm |
|
Hank,
Your point,
> the slavish attachment to
> patterns at all cost is truly one of my pet peeves.
reminds me of Emerson's lines,
A foolish consistency is the hobgoblin of little minds, adored
by little statesmen and philosophers and divines.
With consistency a great soul has simply nothing to do.
Also, known as "design pattern fever" the malady is not as fatal as
some suggest. I think that design patterns are the entryway to
decent OOP. Given that most ActionScript [and I suspect FMS2 AS
programmers] have bubbled up from the primordial ooze of procedural
programming, getting into OOP is not just a matter of encapsulation,
polymorphism and inheritance. (I may be wrong, but I'm assuming that
you have come from the other direction--out of CS-- and really know
what you're talking about.) Rather, good OOP is knowing how to use
the OOP concepts, and I know of no better way of getting into that
than with design patterns--especially for those who cut their
programming teeth on different types of procedural programming. One
may become lost in it DPs and even paralyzed by them, and thus they
become the "foolish consistency" Emerson speaks of. However, the
"classic" ones of which aYo mentions are simply those proposed by the
GoF over 10 years ago, and they're probably the best because they
serve as a common point of reference--not because they are the best
of all possible patterns. (GoF certainly makes that point.)
Let me go one step further. OOP is not the be all and end all of
programming. There it is! The ultimate heresy! For 10 years I studied
FORTH with engineers at General Dynamics, and they couldn't stand C++
or Pascal and thought that OOP really copied FORTH concepts and
didn't do it very well. They programmed down to the metal and firmly
believed that if you didn't program to the particular processor you
were a hack. For them, it was all the elegant use of the stack and
good algorithms, and their programs were superior to anything I've
seen since then. Because they were primarily EEs (with an occasional
Physicist and some LISP programmers), they really understood how the
processor worked. However, very few people are going to write code in
what amounts to an assembly language (and backwards on a stack!), and
you'd have to have some kind of mind-meld to work with remote teams
and FORTH. So I suspect that the dearth of FORTH programmers today is
due to the fact that it's not exactly user or team-friendly--not
because it's not the best solution to programming problems. It may
well be, but it's offset by other limitations.
Here's another truly brilliant point brought out that no one else
(other than the long-suffering graphic designers) cared about. With
AS 3.0, you can no longer program to a button or a mc. All of the OOP
folks praised that as "about time" (myself included), but Jonathan
Kaye made the really brilliant point that the structure gave Flash
something akin to a virtual state machine. Because each button (or
MC) could be coded individually, they could be set up as separate
states--having their own context. Wow!! That was really smart--but
because most of use were so wed to the OOP concepts and way of
thinking, none of us saw this unique advantage in the original AS.
Ok, so here's my point. I agree that DPs are not to be followed
blindly--and I know that aYo does as well. However, DPs serve as an
excellent set of tools for setting up good practices using OOP. Since
AS 3.0 has been designed from the ground up as a true OOP language, I
can think of no better place to start. I don't think that catching
"design pattern fever" is like getting the clap or some really
interesting disease. It represents a temporary state of enthusiasm
which is overcome by really understanding what DPs are designed to
accomplish. Thus, once the DP Fever has subsided, out the other end
comes a real appreciation of OOP concepts and better programmers.
Kindest regards,
Bill
P.S. Quick! Who were the original Gang of Four?? (Scroll way down for
answer!)
bill sanders | www.sandlight.com | bloomfield, ct | 860-242-2260
The Original GoF were:
Jiang Qing (Mao Zedong's wife) Wang Hongwen, Yao Wenyuan and Zhang
Chunqiao. They were held responsible for the major screw-ups that the
Cultural Revolution wrought on China (1966-69) even though Mao had
originally used it for re-asserting his power.
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
| |
| hank williams 2006-07-11, 1:12 pm |
| Bill,
I agree with everything you said. I am not against design patterns. I just
feel like I am the only person who ever says "dont get too attached". There
is a continuous chorus of people who talk about various design patterns and
their use thereof as the only way to program. If it isnt in some design
pattern it doesnt exist.
I think it is important for people to understand that this is just not true.
I think DPs are a great way to learn. But they are initially like training
wheels, and ultimately like trusted tools, but they should never be required
constructs. I think it is this last point that I feel like never gets said.
The other thing is that, particularly in the flash space, there are lots of
design patterns that dont get talked about so you really end up getting
hamstrung if you get hit with a unique problem.
I probably misinterpreted what ayo meant when he prefered the classic
patterns. I think part of the problem is for me, even using a term like
"classic" for design patterns because it exhalts certain patterns as being
classic, and therefore almost "required" and helps to establish this mindset
which I just feel too many people dont grow out of.
Regards
Hank
On 7/11/06, Bill Sanders <wdsanders-Wuw85uim5zDR7s880joybQ@public.gmane.org> wrote:
>
>
> Hank,
>
> Your point,
>
>
> reminds me of Emerson's lines,
>
> A foolish consistency is the hobgoblin of little minds, adored
> by little statesmen and philosophers and divines.
> With consistency a great soul has simply nothing to do.
>
> Also, known as "design pattern fever" the malady is not as fatal as
> some suggest. I think that design patterns are the entryway to
> decent OOP. Given that most ActionScript [and I suspect FMS2 AS
> programmers] have bubbled up from the primordial ooze of procedural
> programming, getting into OOP is not just a matter of encapsulation,
> polymorphism and inheritance. (I may be wrong, but I'm assuming that
> you have come from the other direction--out of CS-- and really know
> what you're talking about.) Rather, good OOP is knowing how to use
> the OOP concepts, and I know of no better way of getting into that
> than with design patterns--especially for those who cut their
> programming teeth on different types of procedural programming. One
> may become lost in it DPs and even paralyzed by them, and thus they
> become the "foolish consistency" Emerson speaks of. However, the
> "classic" ones of which aYo mentions are simply those proposed by the
> GoF over 10 years ago, and they're probably the best because they
> serve as a common point of reference--not because they are the best
> of all possible patterns. (GoF certainly makes that point.)
>
> Let me go one step further. OOP is not the be all and end all of
> programming. There it is! The ultimate heresy! For 10 years I studied
> FORTH with engineers at General Dynamics, and they couldn't stand C++
> or Pascal and thought that OOP really copied FORTH concepts and
> didn't do it very well. They programmed down to the metal and firmly
> believed that if you didn't program to the particular processor you
> were a hack. For them, it was all the elegant use of the stack and
> good algorithms, and their programs were superior to anything I've
> seen since then. Because they were primarily EEs (with an occasional
> Physicist and some LISP programmers), they really understood how the
> processor worked. However, very few people are going to write code in
> what amounts to an assembly language (and backwards on a stack!), and
> you'd have to have some kind of mind-meld to work with remote teams
> and FORTH. So I suspect that the dearth of FORTH programmers today is
> due to the fact that it's not exactly user or team-friendly--not
> because it's not the best solution to programming problems. It may
> well be, but it's offset by other limitations.
>
> Here's another truly brilliant point brought out that no one else
> (other than the long-suffering graphic designers) cared about. With
> AS 3.0, you can no longer program to a button or a mc. All of the OOP
> folks praised that as "about time" (myself included), but Jonathan
> Kaye made the really brilliant point that the structure gave Flash
> something akin to a virtual state machine. Because each button (or
> MC) could be coded individually, they could be set up as separate
> states--having their own context. Wow!! That was really smart--but
> because most of use were so wed to the OOP concepts and way of
> thinking, none of us saw this unique advantage in the original AS.
>
> Ok, so here's my point. I agree that DPs are not to be followed
> blindly--and I know that aYo does as well. However, DPs serve as an
> excellent set of tools for setting up good practices using OOP. Since
> AS 3.0 has been designed from the ground up as a true OOP language, I
> can think of no better place to start. I don't think that catching
> "design pattern fever" is like getting the clap or some really
> interesting disease. It represents a temporary state of enthusiasm
> which is overcome by really understanding what DPs are designed to
> accomplish. Thus, once the DP Fever has subsided, out the other end
> comes a real appreciation of OOP concepts and better programmers.
>
> Kindest regards,
> Bill
>
> P.S. Quick! Who were the original Gang of Four?? (Scroll way down for
> answer!)
>
> bill sanders | www.sandlight.com | bloomfield, ct | 860-242-2260
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> The Original GoF were:
>
> Jiang Qing (Mao Zedong's wife) Wang Hongwen, Yao Wenyuan and Zhang
> Chunqiao. They were held responsible for the major screw-ups that the
> Cultural Revolution wrought on China (1966-69) even though Mao had
> originally used it for re-asserting his power.
>
>
> ________________________________________
_______
> FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
|
|
|
|
|