The Artima Developer Community
Sponsored Link

Java Buzz Forum
Why getter and setter methods are evil

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jay

Posts: 158
Nickname: jarchitect
Registered: Jul, 2003

Jay is creator of Architectslobby.org
Why getter and setter methods are evil Posted: Sep 8, 2003 7:37 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Jay.
Original Post: Why getter and setter methods are evil
Feed Title: Architectslobby
Feed URL: /index_generic.php?
Feed Description: An exclusive community for Enterprise Architects
Latest Java Buzz Posts
Latest Java Buzz Posts by Jay
Latest Posts From Architectslobby

Advertisement
Make your code more maintainable by avoiding accessors. The getter/setter idiom is a commonplace feature in many Java programs. Most of these accessor methods, however, are unnecessary and can severely impact your systems' maintainability. Using accessors violates the basic object-oriented (OO) principle of encapsulation, so you should avoid them. This article discusses getter/setter cons and offers an alternative design methodology.

Read: Why getter and setter methods are evil

Topic: Sun to Join Eclipse Project in 6 Months? Previous Topic   Next Topic Topic: PooledExecutor and ThreadLocal

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use