Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 12-04-2010, 07:44 PM   #1
newbe forever!
glantucan's Avatar
Join Date: Oct 2004
Location: Madrid, Spain
Posts: 88
Default Constructor functions are cluster bombs

I would like to know your opinion on what Bill Sanders, one of the co-authors of "ActionScript 3 Design Patterns" says about not using constructors at all, here is asummary of his original post Constructors functions are Cluster bombs:

* "If you do not include one, you’re not tempted to add properties and methods in the constructor that might generate dependencies. Your client isn’t a problem because its just making requests and none of the other classes instantiate your client."
* "With “parameterized” classes, instead of passing a parameter to the class, it’s less binding to pass it just to the method that uses it."
* "If everything in a class is needed immediately by the constructed instance, first instantiate an instance and then call a method through the instance that fires off the whole crew."

Personally, I am starting to think he is right. Hey! He (among others) wrote the most interesting book I've red about AS3. In fact I think I will read it again just when I finish it. But as with the book, the concepts related loose-coupling between classes, are a litle difficult to grasp for me. Yet
glantucan is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:01 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.