• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class coupling and System coupling in the context of Package Design

 
Rob Sweeny
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Here's what I understand about Package Design:

Packages are like containers for classes
they define where classes are located in the hierarchical directory structure
and also promote code reuse, maintainability , encapsulation (on a grand scale), and modularity.

What I dont' get are the following two statements:

Package dependencies are reduced with Class coupling.
Package dependencies are reduced with System coupling.

What is Class Coupling and System Coupling?

Thanks, Rob
 
Rob Sweeny
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this the appropriate forum for this question?

If not, is there a way to 'move' it to another? Or do i have to repost it?

Thanks
Rob

 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob,

Let's see. First, yes, there probably is a better forum for this; I'm not going to move it though until we get a better understanding of where you're at.

As far as not understanding those two statements: I don't understand them either, and I've been around the block a few times. Where did you get them from? They don't make much sense as is -- maybe they're being taken out of context?
 
Campbell Ritchie
Sheriff
Posts: 48378
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never heard of system coupling and class coupling either, but I think questions about ordinary coupling are usually discussed here. So let's keep this thread here, at least for the time being.
 
salvin francis
Bartender
Posts: 1263
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i remember my mentor teach me:

A good code should be highly cohesive and loosely coupled.

Highly cohesive: Each entity must achieve a clear defined task.
Loosly coupled: Each entity must be least dependent on other entity

I too, have not heard about System and Class coupling.
 
Rob Sweeny
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got them from "Sun Certified Java Associate Study Guide" by Liguori and Finegen.

more context from the book:

"When you design Java packages, such as grouping of classes, the following key areas should be concidered:"

Package Attribute - Benfits of Applying the Package Attribute

Class Coupling - Package dependencies are reduced with class coupling
System Coupling - Package dependencies are reduced with system coupling
Package Size - Typically, larger packages support reusabilty, whereas smaller
------------------packages support maintainabilty.
Maintainability - Often, software changes can be limited to a single package when
-------------------the package houses focused functionality
Naming - Consider conventions when naming packages. Use reverse domain
-----------name for package structure. Use lowercase characters delimted with
-----------underscores to seperate words in package names

Hope this helps
 
Campbell Ritchie
Sheriff
Posts: 48378
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am afraid that doesn't help. You might do well to go to Amazon and see the quality of the reviews that book received there.
 
Rob Sweeny
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone.
Looks like it's time to buy a new book!
 
Robert James Liguori
Author
Ranch Hand
Posts: 551
5
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Sweeny wrote:

What I dont' get are the following two statements:

Package dependencies are reduced with Class coupling.
Package dependencies are reduced with System coupling.

What is Class Coupling and System Coupling?

Thanks, Rob


Class coupling indicates the number of dependencies (associations) a method or type has on other types. System coupling can be thought of in a similar manner, though with systems. Note: These terms can be found through various online resources.

To clarify the text in the book, when there is a high number of dependencies, the number of affected packages should be reduced based on software design. That is, place dependent classes in the same package where possible.

Hope this helps,
Robert Liguori

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic