coarse-grained objects

Could someone please provide a definition/explanation of a coarse-grained object as opposed to a fine-grained one? I have a general understanding of the term, but not enough understanding to be able to explain them myself. Thanks

"Java Tom", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.

This name is obviously a pseudonym, and will be turnd off soon, so please choose a new name immediately.

Originally posted by Java Tom:Could someone please provide a definition/explanation of a coarse-grained object as opposed to a fine-grained one? I have a general understanding of the term, but not enough understanding to be able to explain them myself. Thanks

Good question. I am also interested in any consensus on the answer. I will share my current understanding and my personal way of explaining this: Fine-grained objects are building blocks which traditionally we programmers have glued together at compile-time. They have visibility to the programmers and these objects can be viewed as 'how' we build a component. (in C++ I used to say that they disappeared at compile time - not quite true in Java). Course-grained objects (e.g. components, applications, libraries) are constructed from many fine-grained objects. These course-grained objects are more commonly glued together at run-time (late-binding). They are often the output of a development process not the input. They have system level visibility, well defined interfaces and can be considered a unit of delivery/deployment. From programmers perspective they can be viewed as �what� is being developed vs �how�.

Communicate<BR>Architect<BR>Simplify

Tom Obermeyer
Greenhorn

Joined: Mar 16, 2001
Posts: 7

posted Mar 16, 2001 10:07:00

0

Thanks Paul. I left my question broad, but I was really pondering the incorporation of the concept of coarse-grained objects with regards to Enterprise JavaBeans design and development. How would you go about developing coarse-grained EJBs from object models that model "fine-grained" objects? It seems like a coarse-grained object would have the properties and behaviors of several objects in the model. At what point would your EJB be to "coarse?"