[Gambas-user] off-topic: Metaclasses and Aspect-Oriented Programming (AOP)
Nelson Ferraz
nferraz at ...184...
Sat Sep 6 00:42:48 CEST 2003
Some interesting articles from IBM developerWorks:
--
February 26, 2003 - Most readers are already familiar with the concepts
of object-oriented programming: inheritance, encapsulation,
polymorphism. But the creation of objects of a given class, with certain
parents, is usually thought of as a "just so" operation. It turns out
that a number of new programming constructs become either easier, or
possible at all, when you can customize the process of object creation.
Metaclasses enable certain types of "aspect-oriented programming," for
example, you can enhance classes with features like tracing
capabilities, object persistence, exception logging, and more.
http://www-106.ibm.com/developerworks/linux/library/l-pymeta.html
--
August 28, 2003 - Michele and David's initial developerWorks article on
metaclass programming prompted quite a bit of feedback, some of it from
perplexed readers trying to grasp the subtleties of Python metaclasses.
This article revisits the working of metaclasses and their relation to
other OOP concepts. It contrasts class instantiation with inheritance,
distinguishes classmethods and metamethods, and explains and solves
metaclass conflicts.
http://www-106.ibm.com/developerworks/linux/library/l-pymeta2/?ca=dgr-lnxw02MetaClass2
--
See also:
Putting Metaclasses to Work by Ira R. Forman and Scott Danforth
(Addison-Wesley; 1999)
Guido van Rossum's essay, "Unifying types and classes in Python 2.2"
http://www.python.org/2.2/descrintro.html
Guide to Python introspection
http://www-106.ibm.com/developerworks/library/l-pyint.html
Improve modularity with aspect-oriented programming
http://www-106.ibm.com/developerworks/java/library/j-aspectj/
[]s
Nelson
More information about the User
mailing list