Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5443

Re: Swing actions in separate code files - how

From Joerg Meier <joergmmeier@arcor.de>
Newsgroups comp.lang.java.gui
Subject Re: Swing actions in separate code files - how
Date 2014-07-22 12:12 +0200
Message-ID <d7kfrhta1d3g$.c8npimsoeev6.dlg@40tude.net> (permalink)
References <2qtju5F13feioU1@uni-berlin.de> <tpadnfltMYLSOFDOnZ2dnUVZ_g6dnZ2d@giganews.com>

Show all headers | View raw


On Mon, 21 Jul 2014 18:42:07 -0500, iMatt wrote:

> I discovered a method which allows a central class to provide data
> access to satellite classes. I needed a method to separate code into
> several files, and this has proven effective. The satellite classes
> have full data access to all but private variables, and can directly
> change data in the central class. This concept has been tested
> successfully on a large scale project. See what you think about it.

That sounds like the well known god class anti-pattern, one of the most
common programming mistakes. It makes testing hard, debugging harder and
unit tests almost impossible. It is basically the opposite of any good OOP
advice.

> <code>

You should take a look at some Java code conventions (I recommend the
Google ones now that the Oracle ones are 'deprecated'). Class names should
start with upper case letters, variable names should be camel cased, and
your use of spaces is mostly wrong, making your code hard to read for
anyone who has programmed in Java before.

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar


Thread

Re: Swing actions in separate code files - how iMatt <iMattThomas@zoho.com> - 2014-07-21 18:42 -0500
  Re: Swing actions in separate code files - how Joerg Meier <joergmmeier@arcor.de> - 2014-07-22 12:12 +0200

csiph-web