?
Solved

Efficient Java Software Design

Posted on 2005-03-28
6
Medium Priority
?
175 Views
Last Modified: 2010-03-31
First let me preface my questions by saying I have a great knowledge of Java programming, in terms of how to logically create/solve a task. Where I lack knowledge is in the "big picture" of software design. For the first time, I am developing a fully functional software package and I often find myself confused as to how to efficiently organize and build my software. For instance, one portion of my program involves a JInternalFrame which would hold a JLabel that holds a picture, upon which users plot out data points. I find that I am unsure of what would be the most modular, efficient, upgradeable method of organizing both the GUI and user data. In the example with JInternalFrame, where should mouseevents/keyevents be processed? Where should popupmenus/menubar actions be processed? How should this portion of my program operate in relation to the overall program? How should another portion of the program access this portion's data? These are the type of questions I usually find myself unable to answer. Since this is my first "real" software package I know that I will end up making many many changes to different portions of the package, and if I do not implement an efficient design of organizing data, I will make much more work for myself.

Thank you in advance,
CJ
0
Comment
Question by:potatoes44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 5

Accepted Solution

by:
Naeemg earned 136 total points
ID: 13645572
ad a JPanel for your Jlabel that u want user to plot images on it.
don't worry about events, every event will do its own work efficiently.
and while u r reading data u may use threads.
and also u may use thread for ur all events, that, one event is plotting, while other event is available for actions. etc. or reading data.
tell me ur all actions u want to perform ?
0
 
LVL 15

Assisted Solution

by:aozarov
aozarov earned 132 total points
ID: 13645751
I don't think that "were to put your listeners" should be part of your "big picture" when you are designing software.
By applying iterative development you will find yourself applying such related changes without a blink.
Separating GUI handling and data is important and well documented concept (MVC see for e.g. http://c2.com/cgi/wiki?ModelViewController).
There are many other patterns (good development practice) which you can read about and apply when appropriate (see
http://www.javaworld.com/columns/jw-java-design-patterns-index.shtml or http://www.patterndepot.com/put/8/JavaPatterns.htm (free book))
0
 
LVL 6

Assisted Solution

by:mightyone
mightyone earned 132 total points
ID: 13650164
To make support and updates easier it is good to have a fine granulated and efficient Package design! If you tend to programm rather in new classes than methods a Update could mean just replacing a .class file. but leaving all calling classes intact.

according to your requirements i would suggest to encapsule all your eventhandler and listeners in seperate class files. Another benefit is easier reuse of class files for other projects.

One thing you should always consider is your gui design from point of view Unicode and i18n! This will strongly affect all your gui design from frames down to scrollbars....
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question