hey wat r fine grained & coarse grained objects. which of them shud be used and in which condition Dean Jones
posted 13 years ago
A fine-grained object is an object that contains a 'small' amount of data, while a coarse-grained object contains a larger amount of data, typically containing several fine-grained objects. To demonstrate, let's say that we've created a system for entering orders. Typical objects in this system would be Customers, Orders, and Order Items. An Order Item would be a fine-grained object, as it contains the details about a single-ordered item, such as description, qty, price, etc. An Order would be a coarse-grained object, as it contains many Order Items and a Customer object as well. Which should be used where depends on the application. In the example above, if a customer service rep wants to retrieve data regarding a particular order from a network server, it makes more sense to retrieve the Order object and display that data on the screen rather than retrieve all the Order Item objects individually. Hope that helps.