• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class coupling and System coupling in the context of Package Design

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 79240
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79240
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks everyone.
Looks like it's time to buy a new book!
 
Author
Posts: 587
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
reply
    Bookmark Topic Watch Topic
  • New Topic