This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Class coupling and System coupling in the context of Package Design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Class coupling and System coupling in the context of Package Design" Watch "Class coupling and System coupling in the context of Package Design" New topic
Author

Class coupling and System coupling in the context of Package Design

Rob Sweeny
Greenhorn

Joined: Jan 14, 2010
Posts: 16
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

Joined: Jan 14, 2010
Posts: 16
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

Joined: Jul 08, 2003
Posts: 24183
    
  34

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?


[Jess in Action][AskingGoodQuestions]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37907
    
  22
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
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

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.


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
Rob Sweeny
Greenhorn

Joined: Jan 14, 2010
Posts: 16
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

Joined: Oct 13, 2005
Posts: 37907
    
  22
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

Joined: Jan 14, 2010
Posts: 16
Thanks everyone.
Looks like it's time to buy a new book!
Robert James Liguori
Author
Ranch Hand

Joined: Nov 27, 2007
Posts: 529
    
    5

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


My Blog (I frequently post on Java, JSF and NetBeans)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class coupling and System coupling in the context of Package Design
 
Similar Threads
Answers to IBM 486 sample test
organizing classes into packages
a query from Distilled
UML Sample testing questions
Separated interface Pattern and factory