Custom Namespaces
Namespaces are nothing new to the world of OOP and determine the visibility of definitions, attributes, and methods. The predefined namespaces public
, protected
, private
, and internal
are well known, but custom namespaces
are rarely used. Thus a custom namespace
is the epitome of data hiding, because it's the road less traveled. The lack of familiarity makes it a great way to hide data; and the fact that you can name the definition makes it all the more unlikely that the namespace will be used without being opened specifically.
Using a custom namespace is the equivalent of hiring a bouncer to secure the door of a back-room poker game where only invited guests know the password. The only way an uninvited guest can get through ...
Get AdvancED ActionScript 3.0: Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.