Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

coarse-grained

 
bird cao
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explain the concept for me?
 
Jeff Walker
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by bird cao:
Can someone explain the concept for me?

Well, I don't know what you mean in regards to web services, but it generally means the subject is in larger chunks, as opposed to fine-grained, meaning smaller chunks.
E.g. MVC is a coarse grained design pattern because it at a high level, really an application level design pattern covering multiple tiers, whereas DAO is a fine grained pattern, because it's down in the resource tier, just making database accessing more generic to clients.
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider the Transfer object as coarse grained
If you are using just simple sets and gets and passing String that would be a fine grained method call.
setCustomer(String cust) {
..
}
setCustomeNumber(String custNumber){
..
}
As opposed to coarse grained where you send the transfer object called Customer which is a java object
public class Customer {
String customer ;
String custNumber ;
setCustomer(String customer){
}
setCustNumber(String custNumber) {
}
getCustomer(String customer){
}
getCustNumber(String custNumber) {
}
}
//coarse grained call
setCustomer(Customer cust) {
}
Mainly used with EJB to send coarse grained object to reduce network calls.

HTH
Dhiren
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic