[Ldsoss] Non-Web Application Frameworks
Ben Galbraith
junk at galbraiths.org
Tue Nov 21 17:17:59 EST 2006
Coming to this thread a bit late. I am a founding member of the JSR
296 Expert Group; there's not much to say about that effort yet, but
keep an eye on it. Your feedback as to what it should handle (the
list below) is good and we're certainly targeting much of that.
RE: JGoodies, which is a one man show: Karsten Lentzch. Karsten's
stuff is good; use it whenever it applies to your problem domain. I
have two complaints: Looks is starting to look dated; Bindings is
very complex.
RE: Eclipse. I don't disagree with previous comments. RCP is well-
architected but under-documented and hard-to-use. The SWT toolkit
upon which it is based is good if you to write Windows programs in
Java, but I'm not crazy about its behavior on the Mac.
RE: Other frameworks. Keep your eye on March 9th -- there's a
conference I'm putting on called Desktop Matters in the Bay Area;
there may be some announcements there that address the issues you're
discussing. The Spring RCP is nice but it's incomplete and under
documented; it attempts to be like Eclipse RCP but for Swing.
RE: Your list:
1. Error/Exception handling -- what help are you looking for here?
2. Logging -- use log4j
3. Menus, buttons, controls. If you use an MVC architecture for your
app, copying values back and forth to your view tier can be tedious.
Use a binding framework to automate this. JGoodies Bindings is the
only viable one out there; you should look at it, but you'll need to
write some code to make it easier to use. I created my own binding
framework for various reasons. Otherwise, Swing does a lot of the
work towards making it somewhat easy to create actions that can
manifest themselves in menus or buttons or different types of
controls. I extended this mechanism to let me associate actions with
any event in any control. It's easy to do and makes life easy.
4. Window management. What do you have in mind here? I don't see off-
hand how window management relates to fonts and styles, but you can
use Swing's look-and-feel mechanism to swap out themes pretty easily.
5. Look and Feel management. This works capably in vanilla swing.
Just change the look-and-feel with Swing's API. Swing's default look,
Metal with the Ocean theme (in Java 5) stinks. Unfortunately, there's
not much better out there. JGoodies Plastic is okay, Incors Alloy is
okay, Synthetica and its themes are okay. Sun has a very nice look
(codenamed Nimbus) in-house that they may choose to implement in Java
at some point. I'm working to accelerate this process and may have
some news to announce sometime soon.
6. Tables. Swing gives you editable tables out of the box. Sorting is
part of Java 6 and can be obtained today via the SwingLabs open-
source project on java.net. You can also use one of the various
vendor-provided tables, such as JIDE's components. I've done a ton of
work on making tables easier in my consulting and may have an
announcement on open sourcing that work around March 9. Spring RCP
also has some good work, such as providing a table that reflects on
object properties.
7. Multi-threading. Rich topic. Sun has their SwingWorker class which
you can use a baseline. There are other third-party projects that
help in this area (FoxTrot, Spin) but nothing goes as far as it ought
to. At the risk of sounding like a broken record, I've done some work
in this area, watch for March 9 announcement.
8. Copy/paste. Beyond what Java gives you out of the box, what are
you looking for?
9. Message boxes. JOptionPane is a factory for dialogs in Swing. It
does a capable job with small messages. You'll need to hand-roll
support for something more ambitious. Check out SwingLabs for help here.
10. File access. Hmm... Java's pretty rich here, what do you need?
11. Properties. What do you mean?
I've given a few presentations on these topics -- perhaps the most
relevant will be the recent talk I gave at 2006 JavaOne:
http://developers.sun.com/learning/javaoneonline/2006//desktop/
TS-1913.html
My laser-focus with Swing is helping developers be productive with it
and the talk ("Eight Ways To Be More Productive with Swing") tries to
address that.
If you're overall impression is that you wish there was just an
existing framework that could handle this stuff for you -- the bad
news is that there isn't, but the good news is that there's a lot of
activity in this area. I think 2007 will be an interesting year for
Desktop Java, especially with some of the great enhancements Java 6
is bringing to the table (though perhaps Adobe's Apollo project and
MSFT's WPF will steal some of this thunder).
Good luck,
Ben
On Oct 31, 2006, at 12:20 PM, Mitch Butler wrote:
> I'm a low-level OS-type guy with a reasonable amount of Java
> knowledge. However, I'm a beginner at things like GUIs and Swing. I
> have an idea for a Java Application that I would like to develop.
> It will a standalone program that runs on a single machine and must
> have a reasonably good GUI.
>
> I've been teaching myself Swing, and all that stuff is very cool.
> But I find myself having to write too much stuff from scratch that
> I know has been done before. Plus my framework stuff doesn't look
> very nice! I need an Application Framework to hang my code on.
>
> I stayed up late last night (too late according to my wife!)
> searching the Web, and I found a few candidates: Aloe, JSR 296,
> JGoodies, Eclipse, XUI. There are also a whole host of other
> frameworks (too many!) that are targeted more at Web-type
> applications (AJAX, JLense, Radicore, etc.). I don't think I'm
> ready for those yet. But then I don't know, as I will want to learn
> Web App development eventually.
>
> Anyway, does anyone have experience with those that I mentioned or
> others that I don't know about yet? I want to be able to quickly
> and easily prototype my ideas. I'm looking for something that helps
> me with the following kinds of things:
>
> - Error/Exception handling
> - Logging (of events and special conditions)
> - Menus, buttons, controls
> - Window management (changing fonts and styles)
> - Look and Feel management (I want to try different L&Fs to see
> what I like)
> - Tables of data, sortable in different ways, and editable
> - Printing facilities for reports
> - Multi-threading (kicking off a background task, and updating the
> GUI with progress)
> - Copy/Paste
> - Message boxes
> - File access
> - Properties
>
> The one thing I don't need is a database. My data is reasonably
> small, so I plan to just serialize the objects into a file and
> reload them into memory whenever the App starts up. That is
> actually the kind of code that I am pretty good at. It is the GUI
> stuff that gives me fits.
>
> I'm using Eclipse as my IDE, and I especially like the idea of
> actually using Eclipse as the framework itself (RCP). But that
> sounds like a huge learning curve and perhaps overkill, and I want
> to have something working soon in my spare time.
>
> Anyway, I suppose if I spent several weeks with each of the above
> technologies, I could eventually figure out which one meets my
> needs best. But I don't want to do that right now (lazy me!). So,
> I'm looking for advice from those who have more experience in this
> area.
> _______________________________________________
> Ldsoss mailing list
> Ldsoss at lists.ldsoss.org
> http://lists.ldsoss.org/mailman/listinfo/ldsoss
More information about the Ldsoss
mailing list