This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

decoupled?  RSS feed

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read on the design pattern book (head first) that classes should be decoupled, what does that mean? can anyone give an example?

thanks
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WikiPedia often says it better than I can.

Reducing coupling is a big part of managing dependencies which is one of the core drivers in OO design. See what kind of questions the WikiPedia article raises, and lets talk more about where coupling might take you.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok...I got it. I learned the usage of the Command Design-Pattern and I realized what makes a decoupled objects.

the user's interface component and the command (the event handling) are decoupled.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you get interested in dependencies you can dig into some of the core principles of OO. HERE is a blog where Robert Martin introduces his catalog of principles. His PPP Book expands on all of these. Highly recommended.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!