Having been traumatised many years ago when using MFC/C++ to develop
front-end code, I've religiously avoided GUI work since and stuck to
back-end / server-side projects. So I'm a bit of a novice when it
comes to designing Swing-based applications.
I'm now having to do more and more GUI work to support my current
projects, so I started looking for tutorial / best-practices materials
on the net. I was somewhat surprised to find that there's a dearth of
this sort of information. A quick Google search of 'swing best
practices' comes up with a couple of books and a few sites that
generally just re-iterate the APIs.
What I'm looking for are some Swing design best-practices akin to the
ones that are readily available for plain OO, J2EE design, etc.
Are there any?
For example:
- what's the best way to implement a wizard?
- how to minimise dependencies in a complex GUI?
- etc
Any pointers to useful books, sites, articles, example apps, etc.
appreciated.
- sarge 5 13845 sa*********@hotmail.com (Chris) wrote in message news:<56**************************@posting.google. com>...
[snipped...] What I'm looking for are some Swing design best-practices akin to the ones that are readily available for plain OO, J2EE design, etc.
What you have to understand is that Object Orientation and Enterprise
computing are both 'methodologies', to varying degrees, as well as just
technologies.
Swing is just a tool for writing UI software - it isn't a different
way of structuring and designing software in itself. As such, while
there are plenty of books and on-line resources devoted to how to
create good user interfaces (HCI, etc) I suspect there is little on
how to structure their design from a source code viewpoint (little
which is specific to UI coding anyway!)
Are there any?
For example: - what's the best way to implement a wizard?
I suspect CardLayout would fit the job.
- how to minimise dependencies in a complex GUI?
You mean from a HCI viewpoint (ie. designing elegant interfaces) or
from a coding point of view? The issues surrounding compartmental-
ising and re-using Swing code are probably identical to handling any
other complex structures. You might want to take a look at the way
UI components work as Java Beans, as this offers a formalised way of
linking components together. Also take a look at the 'model'
interfaces which are used to connect Swing components to 'outside'
data structures.
- etc
Any pointers to useful books, sites, articles, example apps, etc. appreciated.
Its not entirely clear whether you want a guide to good interface
design, a "How to...?" on creating user interfaces (like a Wizard)
or some sort of design methodology specific to writing GUI code...
-FISH- ><>
Perhaps I didn't make my point very clear.
What I'm after are some design patterns for writing Swing code.
As an analogy: you can look at the Java APIs or Java in a Nutshell,
but it doesn't tell you how to minimise inter-dependencies between
classes and avoid exposing implementation details using
getters/setters - for that you'd use the Builder pattern.
Similarly, I can look at the Swing APIs or examples on java.sun.com,
but they don't tell me how to use those components effectively, i.e. I
KNOW how to use a JTabbedPane in isolation for example, what I'm less
clear on is the BEST way to use it in the context of a large, complex
GUI.
If the examples of code I've seen of large applications are the norm
then I think I'll not bother, because they were basically
unmaintainable spaghetti, harking back to the dark days of MFC/C++
that I mentioned. I'm sure there must be better design idioms
relating specifically to Swing (or any event-based Windows-style API)
that promote good OO principles.
So, where are those sites that allow me to short-circuit my knowledge
of how to design GOOD Swing apps? Or does anyone know/have any
examples of well-designed (in their opinion) large-ish Swing apps?
- sarge
You can refer Swing Second Edition, by Matthew Robinson and Pavel vorobiev. http://www.manning.com/robinson2/index.html
Thanks,
Sameer
Chris wrote: Perhaps I didn't make my point very clear.
What I'm after are some design patterns for writing Swing code.
As an analogy: you can look at the Java APIs or Java in a Nutshell, but it doesn't tell you how to minimise inter-dependencies between classes and avoid exposing implementation details using getters/setters - for that you'd use the Builder pattern.
Similarly, I can look at the Swing APIs or examples on java.sun.com, but they don't tell me how to use those components effectively, i.e. I KNOW how to use a JTabbedPane in isolation for example, what I'm less clear on is the BEST way to use it in the context of a large, complex GUI.
If the examples of code I've seen of large applications are the norm then I think I'll not bother, because they were basically unmaintainable spaghetti, harking back to the dark days of MFC/C++ that I mentioned. I'm sure there must be better design idioms relating specifically to Swing (or any event-based Windows-style API) that promote good OO principles.
So, where are those sites that allow me to short-circuit my knowledge of how to design GOOD Swing apps? Or does anyone know/have any examples of well-designed (in their opinion) large-ish Swing apps?
- sarge
~ Let us linux ~
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
> Any pointers to useful books, sites, articles, example apps, etc. appreciated.
A useful book for you could be
Graphic Java: Mastering the JFC (Swing), Volume II
Prentice Hall
When I started in Java GUI development, I found the most and best
informations in this comp.lang.java.* groups.
Klaus
Here are a bunch of points regarding Swing coding : http://www.javapractices.com/TableOfContents.cjp#Swing
The site also has an example Swing app : http://www.javapractices.com/Topic170.cjp
(The source is available for a small fee)
Chris wrote: Having been traumatised many years ago when using MFC/C++ to develop front-end code, I've religiously avoided GUI work since and stuck to back-end / server-side projects. So I'm a bit of a novice when it comes to designing Swing-based applications.
I'm now having to do more and more GUI work to support my current projects, so I started looking for tutorial / best-practices materials on the net. I was somewhat surprised to find that there's a dearth of this sort of information. A quick Google search of 'swing best practices' comes up with a couple of books and a few sites that generally just re-iterate the APIs.
What I'm looking for are some Swing design best-practices akin to the ones that are readily available for plain OO, J2EE design, etc.
Are there any?
For example: - what's the best way to implement a wizard? - how to minimise dependencies in a complex GUI? - etc
Any pointers to useful books, sites, articles, example apps, etc. appreciated.
- sarge
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Don Vaillancourt |
last post by:
Hello all,
Over the years as I design more database schemas the more I come up with
patterns in database design. The more patterns I recognize...
|
by: Jay |
last post by:
The GOF text is widely considered the definitive book on
the topic.
Design Patterns: Elements of Reusable Object-Oriented
Softare, Erich Gamma,...
|
by: Josh28 |
last post by:
Hi
We are a group of two chaps just out of undergrad, we created
a software to automate the use of Design Patterns. We have put it up
at Source...
|
by: John Salerno |
last post by:
Here are a few I'm considering:
Design Patterns Explained : A New Perspective on Object-Oriented Design
(2nd Edition) (Software Patterns Series) ...
|
by: Carlo Stonebanks |
last post by:
I have the infamous GoF Design Patterns boo - it's been sittin gon my shelf
for years. I have a huge reading list and find this book a rather dry...
|
by: Krivenok Dmitry |
last post by:
Hello All!
I am trying to implement my own Design Patterns Library.
I have read the following documentation about Observer Pattern:
1) Design...
|
by: =?Utf-8?B?bWF2cmlja18xMDE=?= |
last post by:
Hi,
I would like to know more about design patterns and specifically using C#.
Can any one recommend a good book?
Thanks
|
by: vital |
last post by:
Hi,
I am designing the middle tier of a project.
It has 6 classes and microsoft application data access block.
The six classes are DBServices,...
|
by: r035198x |
last post by:
I have put together this article to give people starting Swing an awareness of issues that need to be considered when creating a Swing application....
|
by: tammygombez |
last post by:
Hey fellow JavaFX developers,
I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
| |