Riel, Chapter 3
Discussion Questions submitted for Chapter 3 of Riel.
God Classes
-
What exactly is a god class? What are the characteristics of a god class?
--Hisako
-
Does Object-Oriented Program with a god class still maintain an advantage
over an action-oriented program performing the same function? Patrick Dowd
-
I'm having a bit of a hard time understanding exactly why the God class is
always bad. Could you give some examples of how and why it causes problems?
-
How do you know when you have a good balance between god-like classes and a
proliferation of classes? -Jim Finnessy
-
Is it acceptable to have god classes or a proliferation of classes if they
model the real world? -Jim
-
When writing a program (in particular when migrating a system) one can
easily create a god class. The resolution of this problem is to devide up
different parts. But then you face the proliferation of classes
problem. Are there steps with which one might go about deviding up the god
class without remaining too much of a god class but at the same time also
not falling into the proliferation of classes problem? -Jonathan Kensler
-
Could controller classes be clarified? I understand the VCR example, but I
don't see how to apply it to OOP.
-
The book seems to advocate a balance between god-classes and proliferation
of classes, but how is that balance maintained if a project keeps
expanding? Should classes perhaps be consolidated when too many begin to
exist? -Todd
-
How often does avoidance of proliferation of classes end up creating a new
problem of a god class? Patrick Dowd
-
What is the difference between a controller class and an interface in java?
George Yeboah
-
Heuristic 3.2 states that we should be suspicious of classes whose names
contain Driver, Manager, System, Subsystem. What are these and how are they
different? Elias Vafiadis
Agent Classes
-
Can you clarify the role of agent classes?
-
Could you please expland on the definition of Agent classes? -Todd
-
Why have agent classes when they will eventually be removed? Elias Vafiadis
-
When is it good and not good to use agent classes? (Sam Vanderhyden)
-
In preliminary design should we include Agent classes even it we think that
there is a good chance that it would be irrelevant? Steve F
-
Is the Librarian irrelevant after all? If so, how come the PrereqChecker
was not irrelevant in the course-scheduling system domain? Desi Dimova
-
Riel says that Jacobson recommends the use of decouplers such as the
librarian class, but Riel does not like them. It seems like they would slow
down performance, but is s there a time when they are necessary? -Peter
Likarish
-
In figures 3.11 and 3.12, what is actually different in the appearance of
the code. Is CallProcessingBlock no longer a class? Steve F
Proliferation of Classes
-
The chapter mentions several ways to cut down on the number of classes,
eliminating agents, irrelevant classes, and those outside of the system. At
the same time it states that "god" classes should be avoided. What, other
than common sense, can be used to determine the necessity of a class? josh
vickery
-
How is the problem of proliferation of classes handled in java? George
Yeboah
Accessor Methods
-
What are accessor methods and how may they be dangerous? Taha
-
Why do too many accessor methods cause a behavioral problem? --Hisako
-
An example for Heuristic 3.3 would be nice. (Raz Magar)
-
How much should accessor procedures such as get() and set() be treated as
warning signs for improper incapsulation of data and procedures? How often
are these kind of accessor procedures used in well-designed code? (-Nick)
-
How does having many accesor methods in classes defined in their public
interface imply that the related data and behavior are not being kept in
one place?
Other Questions
-
The author discusses his heuristics in terms of his personal opinions, in
contrast to several other models and examples. Do you agree with the
decisions the author choses to make in all these cases? If so, why do you
feel his view is superior? If not, which ones do you feel differently about
and why?
-
In the object-oriented farm example, should there be a milkman or not? Desi
Dimova
-
Is there a good formula for migrating from action based to object oriented
other than examining the given code extensively?
-
Are there any specific ways of going about trying to model the real world?
-Jonathan Kensler
-
What is a "wrapper class" and how is it used? Taha
-
Is a class outside of the system automatically an irrelevant class? Or is
it possible that it is needed, just poorly done? -Peter Likarish
-
What steps would we take if we were to convert an action-oriented model to
an object-oriented one? ~yasir.
-
Is Riel suggesting in this chapter that the action-oriented paradigm would
never be preferable over the object-oriented paradigm? --Khong
-
Riel suggests keeping data and behavior in one place. Isn't this tantamount
to taking an action-oriented approach? Anthony
-
The section "When the action-oriented paradigm goes right" implies that
object oriented design or coding results in a better project when
programmers or designers are not trully excellent, since it enforces the
paradigm. What if something is better expressed in an action-oriented
manner, Java and C++ allow for programmers to step out of the object
oriented framework to address the problem in an imperitive manner, is this,
from the authors view, bad? josh vickery
-
In what ways is inheritance and derived classes differently?
-
Is object-oriented programming less intuitive than action-oriented
paradigms? (i.e., is it harder to learn object-oriented languages as
opposed to function- or data-driven languages?) (-Nick)
-
Riel's playful/tongue-in-cheek language in his explanations or
illustrations of the object/classes/accessor issues in the chapter often
obscures the ideas presented. Can we outline the basic concepts behind poor
object-oriented design? --Khong
-
When does heuristic 3.6(Model the real world whenever possible) become more
important than the other heurestics in conflict? Anthony
-
I am not sure if I understand the example given for Heuristic 3.5. Could
you explain it in class or give us a different example which is easier to
follow. (Raz Magar)
-
Is it always a good idea to package data and functionality even if it
doesn't model the real world (such as the vcr example), or are there
situations when it is better to model a solution after the real world? (Sam
Vanderhyden)
This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/223.sp02/read-riel3.html