Discussion Questions for Riel, Chapter 9
Persistence
-
Can you describe the concept 'persistence in space' in more detail? (David
D)
-
Could you explain the theory of presistence and its two sub-types a little
more? (Saugar)
-
Can an Object be truly persistent? I assumed that when using a database, as
the book mentioned, for persistence this was just saving the data in the
object not the object itself. (Mike L.)
-
Would objects that use persistence in space still be able to utilize
persistence in time? (Alex)
Shallow and Deep Copies
-
What are the key differences between Deep copy and shallow copy? is one
more advatageous than the other, or does its usability just depend on the
circumstanaces or the situation? (Gaurav)
-
What is the advantage of shallow copies over deep copies asides from
conservation of memory space? (monica)
-
Could shallow copying be implemented in such a way (as a wrapper) that the
developer would not have to keep track of objects using the memory address?
Is this a part of garbage collection? (Elijah)
Logical and Physical Design
-
In software design, Should we start with logical design first, then make
changes according to physical design or We start with physical design, then
generate logical design? What's the difference?(Sheng)
-
Hueristic 9.1 says "Object-oriented designers should not allow physical
design criteria to corrupt their logical designs. However, physical design
criteria are often used in the decision-making process at the logical
design time." How does the second part of the heuristic not contradict the
first part? Is using the physical design criteria in decision-making process
not corrupting the logical design time? (Saugar)
-
Riel writes that when caught between 2 equivalent designs, physical design
considerations may be useful in making a decision. But shouldn't the
physical design be a factor right from the time of initial logical design
desicion making? (monica)
Wrappers
-
What is the difference between a wrapper and an interface? (Jonathan)
-
Are there any inherent dangers to using wrappes? (Eric)
-
How does one manage the program that is wrapped by a wrappter? (that is,
if the program needs to be updated, what changes have to be made tothe
wrapper thats the go-between?) (Eric)
Programming Language (e.g., Java, C++, Smalltalk) Issues
-
Does Java have a template feature like C++? What are the differences
between strong and weak type checking? (Mike C)
-
Is there a one-to-one correspondence between meta-classes and normal
classes in SmallTalk, or can there be multiple instances (classes) of a
single meta-class? (John)
-
What kind of additional behavior can SmallTalk meta-classes take on that
C++ template classes can't? (John)
-
Does Java have the notion of meta-classes? (John)
-
Can you give an example of a Destructor in Java? (David D)
Concurrency
-
Are "active objects" the only way to do concurrent programming in
object-oriented programming languages? How are they implemented? (Alex)
-
What's the difference bewteen concurrent object-oriented programming and
parallel programming? (Sheng)
-
How does parallel programming work and what is an example of a program that
does it successfully? How does concurrent object-oriented programming
relate to problems with parallel programming? (Mike C)
-
I was under the impression that certain types of programming languages
(functional, and maybe declarative) actually reduce the complexity of
programming for concurrency. Is this true? If so, will such programming
languages become more popular as concurrency becomes necessary for keeping
up with Moore's Law? (John)
Other Questions
-
Riel mentions an author who argued against "minimal public interfaces"
arguing that there were classes "whose semantics seem to break". What is an
example of this? (Elijah)
-
When Riel talks about constructors as minimal public interface he says that
it should not be possible for users of a class to create objects in an
invalid state (all methods should be ready after creation). Does this mean
that after an object has been created every method in that object should be
able to be called? (Mike L.)
-
Is there a difference between a metaclass used to capture class-specific
data, and class that is part of an inheritance hierarchy? (Jonathan)
-
From chapter 8, what are the advantages and disadvantages of using
Metaclasses and Language-level keyword to deal with Class-specific and
Object-specific behavior? How are they different in other languages and
design patterns? (chayapan)
-
I did not understand how we implement polymorphism in a nonobject oriented
language? (Gaurav)
-
How does the last topic in chapter 8, "a Useful Abstract Class That Is Not
a Base Class," relates to the Class-specific and Object-specific behavior
issue? (chayapan)
This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/223.fa05/readings/riel-9.shtml