See buying choices for this item to see if it's one of the millions that are eligible for Amazon Prime.

12 used & new from $47.72

Have one to sell? Sell yours here
 
 
Putting Metaclasses to Work
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get yours here.
 
  

Putting Metaclasses to Work (Paperback)

by Ira R. Forman (Author)
5.0 out of 5 stars See all reviews (3 customer reviews)


Available from these sellers.


1 new from $179.99 10 used from $47.72 1 collectible from $150.00

Editorial Reviews

Product Description
Metaclasses offer great promise to the world of object-oriented programming The authors present a specific "instruction set" for programming metaclasses and use this set to illustrate how metaclasses fit into the object-oriented programming paradigm.

From the Inside Flap

In object-oriented programming, objects are created as instances of classes. This book deals with the kind of object model in which classes are themselves objects (that is, classes are created as instances of other classes). We have discovered the key to designing such a model so as to improve markedly the levels of composability and reusability attainable in object-oriented programming. Our goal in writing this book is to convey our discovery to others interested in object-oriented programming.

If one thinks of objects as cookies, then classes are analogous to cookie cutters. Cookie cutters are templates that are used to make and determine the properties of cookies; classes make and determine the properties of objects. But how are cookie cutters themselves made? Let us say that they are pressed from sheet metal using a cookie cutter press (a piece of heavy machinery). So, if a cookie cutter press is used to make cookie cutters, what is used to make classes? The answer is a metaclass. Although a cookie cutter press does not directly make cookies (because it makes cookie cutters), it does determine properties of cookies. In a very similar way, a metaclass can determine the properties of objects, because it builds a class that makes objects. Our solution for greater reusability is based on the use of metaclasses to isolate and implement object properties.

Metaclasses alone are not enough to attain the improved levels of composability and reusability. This book introduces a new kind of object model called a monotonic reflective class-based model. In this new model, inheritance extends beyond instance variables and methods into a new dimension in which the relationship between a class and its metaclass is also inherited. This extension, called inheritance of metaclass constraints, is our key discovery. In the resulting technology, not only can metaclasses isolate and implement individual properties, but the composition of the metaclasses isolates and implements the composite property. That is, if one metaclass implements property P while another implements property Q, the composite metaclass implements the property P and Q. This degree of composability does not happen by accident; it is engineered by the proper design of metaclasses and other primitive capabilities within our technology.

In the course of developing the abovementioned ideas, this book explains concepts that are generally useful to and appreciated by anyone interested in object-oriented programming. This book develops object technology from first principles. In doing so, it motivates and demystifies metaclasses, shows how to construct them and compose them, and presents examples of their use. By reading this book, you will learn not only our technology but also the general principles of reflection in object technology.

This book returns to the source of power of object-oriented programming--the synergy of knowledge representation and programming--to yield a major improvement. Consider the following linguistic interpretation of the evolution of computer programming. In the 1950s and 1960s, programming was about commanding the computer--verbs. In the 1970s, this approach proved deficient. A new paradigm arose in which the specification of abstract data types and then classes--nouns--became foremost for the programmer. This paradigm, object-oriented programming, has evolved throughout the 1980s and 1990s. Although powerful and useful, object-oriented programming has proved deficient in isolating properties of objects--adjectives--so that the code that implements a property can be reused. Our technology has an abstraction for adjectives (metaclasses) to complement the nouns (classes) and verbs (methods) of today's object technology. Furthermore, as we will show, composition of metaclasses is as easy as putting a sequence of adjectives in front of a noun when we speak. Organization of This Book Chapter 1 motivates our work with a compelling story for both individual programmers and the organizations for which they work. Chapter 2 introduces our theory of reflective class-based object-oriented models. The theory is built up from first principles (for example, every object has a class, all classes are objects, and so on). Chapter 3 introduces a new semantic concept for object models: inheritance of metaclass constraints. This concept implies a new invariant on the class structure of an object model with metaclasses. Inheritance of metaclass constraints is fundamental to ensuring proper class composition. Chapters 4 and 5 together explain how the object model becomes object-oriented programming by binding the structures developed in Chapter 2 to programming language constructs (in particular, we use C++). This book is about a new way of looking at object-oriented programming in general; we purposefully do not introduce a new programming language syntax. Chapter 6 presents the basic metaobject protocol for our object model. The metaobject protocol is used to program new metaclasses that isolate reusable properties. Chapter 7 uses the metaobject protocol to create a new abstraction, the cooperative metaclass, which is used to attain composability of metaclasses. The combination of Chapters 6 and 7 is the entire metaobject protocol; the separation is for pedagogical purposes. Chapters 8, 9, and 10 contain useful examples of metaclasses that can be built with our metaobject protocol and the cooperative metaclass. These are examples of commonly needed object properties that cannot be isolated and reused in the current programming languages. Chapter 11 presents and solves the problem of release-to-release binary compatibility. Subclassing between separately compiled units has been troublesome in object-oriented programming. We formalize and solve the problem, and state the implications of the solution for object models with metaclasses. Basis for Claims

This book presents new techniques in object-oriented programming, and you have the right to ask our basis for claiming that these techniques are effective. We developed and used these techniques over a four-year period in the evolution of IBMis SOMobjects Toolkit. Most of the important metaclasses described in this book are based on metaclasses implemented in IBMis SOMobjects Toolkit 3.0, although not all of them have publicly available interfaces (those without public interfaces are used to program other parts of the toolkit). All of these metaclasses have been used by the authors or other SOM programmers to write real programs.

The metaclasses of IBMis SOMobjects Toolkit 3.0 are written using the toolkitis metaobject protocol. To make this book as readable as possible, we have simplified that protocol. In addition, we have taken the opportunity in writing this book to improve the toolkitis metaobject protocol. Because of these two factors, our metaobject protocol (the one in this book) is SOM-like, but is not SOM.

Because we have deviated from IBMis SOMobjects Toolkit 3.0 in this book, we have provided a simulation of the object model, our metaobject protocol, and an implementation of all metaclasses in this book that runs on the object model simulation. This is programmed in Java (because of its portability) and can be downloaded from the following URL awl/cseng/titles/0-201-43305-2. Consult the ireadmei file for further information about the simulation. Audience

This book is intended for programmers, researchers in object-oriented programming, and students in computer science. It is written at the level of senior undergraduates studying computer science. There are two prerequisites for reading this book:

An aquaintance of the basic ideas of object-oriented programming, because we do not go into detail as to why encapsulation, polymorphism, and inheritance are important A minimal understanding of discrete mathematics, which can be obtained from any number of books (in particular, 53 is an excellent choice) Acknowledgments

Throughout the six years of work that led to this book, we have benefited from discussions with and comments from many friends and colleagues. We thank Liane Acker, Govind Balakrishnan, Arindam Banerji, Michael Cheng, Ravi Condamoor, Mike Conner, George Copeland, Diane Copenhaver, Brad Cox, Nissim Francez, Kevin Greene, Ted Goldstein, Mike Heytens, Duane Hughes, Shmuel Katz, Gregor Kiczales, Donovan Kolbly, Hillel Kolodner, Vinoj Kumar, John Lamping, Rene Llames, Hari Madduri, Andy Martin, Simon Nash, Harold Ossher, Andy Palay, Jim Platt, Tom Pennello, Larry Raper, Cliff Reeves, Charlie Richter, Brian Ritter, Frederick Rivard, Kim Rochat, Jerry Ronga, Roger Sessions, Erin Shepler, Marc Smith, Robert Stroud, Brian Watt, and Cun Xiao for their aid in achieving our goal. Special thanks go to Derek Beatty, David Boles, Michael Cheng, Nathaniel Forman, John Lamping, Doug Lea, Charlie Richter, Leick Robinson, Brett Schuchert, Kent Spaulding, and Gerhart Werner for their comments on the draft of this book. Special acknowledgment must go to the designers and implementors of the original version of SOM: Mike Conner, Andy Martin, and Larry Raper.

0201433052P04062001

See all Editorial Reviews


Product Details

  • Paperback: 300 pages
  • Publisher: Addison Wesley Longman (October 1998)
  • Language: English
  • ISBN-10: 0201433052
  • ISBN-13: 978-0201433050
  • Product Dimensions: 9.2 x 7.3 x 0.6 inches
  • Shipping Weight: 1.2 pounds
  • Average Customer Review: 5.0 out of 5 stars See all reviews (3 customer reviews)
  • Amazon.com Sales Rank: #473,407 in Books (See Bestsellers in Books)

Look Inside This Book


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(1)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
No one has tagged this product for Amazon search yet. Why not be the first to suggest a search for which it should appear?

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

3 Reviews
5 star:
 (3)
4 star:    (0)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
5.0 out of 5 stars (3 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
5 of 6 people found the following review helpful:
5.0 out of 5 stars This book contributed to the design for metaclasses in Python 2.2, April 24, 2007
By Guido van Rossum (California, USA) - See all my reviews
(REAL NAME)   
Too bad this is out of print; I keep referring to it as the best tutorial I know for the difficult subject of cooperative multiple inheritance, supported by Python via the super() function.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
4 of 6 people found the following review helpful:
5.0 out of 5 stars This is a book worth owning, December 12, 2000
This book is a difficult read, but well worth the effort. It takes you through the motivation for metaobjects, the implementation and intricacies of the metaobject protocol, and finally some examples that prove the power of the metaobjects.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
2 of 4 people found the following review helpful:
5.0 out of 5 stars This is a book worth owning, December 12, 2000
The book is a difficult read, but well worth the effort. It explains all of the implementation, details, intricacies, and finally the power and advantages of metaclasses.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (0 discussions)
  Discussion Replies Latest Post
  No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]


Active discussions in related forums
  Discussion Replies Latest Post
Does anyone use Discovering Geometry: An Investigative Approach? 4 11 hours ago
Textbooks for Kindle DX? 38 13 hours ago
   


Product Information from the Amapedia Community

Beta (What's this?)

Look for Similar Items by Category


Turn On the Savings

Home Improvement Value Center
Shop for bathroom faucets in the Home Improvement Value Center, where the savings can flow as much as 50% off brand-name products.

Shop the Value Center

 

Big Savings in Books

Bargain Books
Find great titles at fantastic prices in our Bargain Books Store.
 

Dive into Summer Reading

Summer Reading for Kids and Teens
Don't even think about hitting the beach without browsing the books in our Summer Reading Store. Discover bestsellers, paperback picks, beach reads, and more terrific titles all summer long.
 

Accessorize Your Tools

Shop for Tool Accessories
From drill bits to fasteners, find all the tool accessories you need in Home Improvement.

Shop for tool accessories

 

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.



Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers
Paranoia
Paranoia by Joseph Finder
My Soul to Lose
My Soul to Lose by Rachel Vincent
Glenn Beck's Common Sense
Glenn Beck's Common Sense

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates