 |
Could you cut your development time in half?
Posted by joconner on July 09, 2007 at 06:48 PM | Comments (8)
Application frameworks are supposed to save you time and effort. That's probably true for most frameworks after you slog through the complex APIs, tutorials, docs, forums, a few just-in-time courses, and maybe even a couple nightmarish starts and stops to your project due to nothing other than the framework itself. I remember working with a big, overwhelming framework back in 1998...a long time ago, and I'm just now recovering. In 1999, the project was abandoned, and the entire team was disbanded. I like to blame it on the framework...and management. You have to take a shot at management whenever you can. It was a bad experience whatever the cause, but that huge, monolithic framework factored in heavily I think. We didn't save time or effort, and almost two years of development time were just wasted. What a fiasco that was!
So, with just a little trepidation, I started to research the Swing Application Framework (JSR 296). I've already declared it an "unframework", trying to be a little silly but also trying to give a compliment too. So far, and let's hope the trend continues, the Swing Application Framework is small and easy to grasp. It provides some basic, skeletal best practices for organizing your application code. And it stops there, long before it gets overwhelming.
I think Hans Muller said someone could understand it in an hour. He's pushing the limits a little, but he's a genius too, so we can forgive him for being optimistic. Realistically, give yourself a couple hours, maybe three if you like to do a little experimenting with code too. I do. I'm basically saying that you can understand everything about this framework after a couple long lunch breaks.
To help you cut those three hours back down to just 2, I've summarized everything I've learned about the framework. I've provided a couple blog entries on the subject, but I've gone off and created a complete article about the framework too. After working so hard on the article itself, my brain just stopped working. So, I skimped a little on the article title. Lacking imagination at the last moment, I've called this article Using the Swing Application Framework. Geez, you'd think I could have come up with something a little snappier!
Could you really cut your development time in half if you adopt the Swing Application Framework? Uh...maybe. Hmm...ok, I give. I don't really know. However, I'm absolutely sure you'll save some time. The investment will be worth it, especially if you have new developers on the project. Why? Well, because new Swing developers don't always know how to set up an application, how to interact with Swing components on the event dispatch thread, how to use Actions and event handlers, or how to properly set up resources for localization, etc. This framework packages up some of these basics quite nicely, making it relatively easy to start a project correctly. Finish in half the time? Maybe not. Your mileage may vary, etc. I'm being a little dramatic with the blog title -- perhaps to make up for the boring article title, but I do know that the Swing Application Framework will help you structure your app correctly and help you adopt some best practices for handling some very common Swing application tasks. That's worth quite a lot in itself.
It shouldn't take you long to decide if the framework can help you or your team. Check out the framework reference implementation, read the article, and leave a comment about your experience.
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Isn't it a bit early for a java.sun.com article? It's a work in progress, and the classes / APIs are not final.
Posted by: kirillcool on July 09, 2007 at 10:32 PM
-
Oh yes, definitely a work in progress. As I was writing the article, the API changed, making me update a couple classes in the demo code.
Too early for jsc? I dunno, lot's of interesting material is a work in progress: JavaFX, Beans Binding, JPA, and even the Java platform itself.
Your question seems to ask whether these very early technologies, products, or APIs should be on jsc? My recent opinion is that they should. More and more APIs will be developed as open source projects, not always as part of the core platform. They have quick development cycles, and lots of change. I don't think the jsc should have to limit itself to production, core platform topics anymore.
Still, the article is definitely about alpha-level code. No doubt there. Just to be clear, I did make that point more than once in the article.
Posted by: joconner on July 10, 2007 at 12:14 AM
-
Been on my radar for some time. Thing is I'm a team leder now... should I direct my programmers in this framework direction... Problem is, I have had as programmer (I still am also) catastrophic encounters with em frameworks as you had.... done reading this I will check out stuff and perhaps go for the bar and get realy drunk as my team check it out .... and maybe bring the company down... gee I hat/love this job....
Posted by: aha42 on July 10, 2007 at 12:32 PM
-
Sorry for last notes state: I am already at bar, team loves the framework, they cowboys allways do... time for that third martini....
Posted by: aha42 on July 10, 2007 at 12:34 PM
-
For me at least the answer to the question "could you cut development time in half using Swing Application Framework" is a resounding NO. I've (except for my SCJD assignment and some hobby tools) not written any Swing code in years.
But it must be said as well that frameworks, while meant to reduce development time, often fail miserably in that regard. They may impose a certain structure on an application making it potentially easier to maintain and expand, but in reality they often require all kinds of hacks and workarounds to get them to fit the requirements for the project (or to make the requirements fit the framework, which is also often the case), causing massive frustration and increased development cycle time.
So even for people who do use Swing extensively any framework at all could mean lost productivity despite the best intent of the framework creator. That's why there are so many frameworks and many people build or modify frameworks to get a solution that works for them, adding even more development time during the project lead time.
Posted by: jwenting on July 10, 2007 at 11:09 PM
-
perhaps JavaFX or NetBeans platform can be better options.. I attendd some sessions about both technologies during Jazoon and I have two perspectives now:
JavaFX: excelent for people without classical programming skills, like designer and other fashion modelers. It could be very productive, but I don't believe a core programmer will felt comfortable dealing with an untyped and scripted language.NetBeans platform: very robust, excellent technology, but locked in NetBeans IDE.
I will try both technologies, and I plan to blog sometimes about that.. I will include Swing framework also, just for fun - and who knows if I get addicted of some of them :).
Posted by: felipegaucho on July 11, 2007 at 12:00 AM
-
The time you save while doing the simple things supported by a framework is lost by doing the complex things it is supposed to support and by trying to do things the framework authors didn't envision or understand.
Nothing to see here, move along.
Posted by: twe on July 11, 2007 at 12:41 AM
-
Goodness; have any of you tried it? It's really not that bad and, whether it saves you time or not, it ensures that certain best practices are enforced. That's really about all it does. Porting an existing application to use the launch() method instead of EventQueue.invokeLater(aRunnableThatLaunchesYourApplication) is quite simple, and you get all your internationalized resources, if present, handed to you for free, if you want them. Is that so bad?
Posted by: ljnelson on July 11, 2007 at 10:21 AM
|