Two weekends ago I went to visit my friend Craig in Biddeford, Maine. I picked up Mike Haight on the way. We had a great time at the beach. Maine water is surprisingly cold! Most of the time we weren't at the beach we were playing poker. I have never really played poker before, but it's a lot of fun. There was a ton of traffic (even at 7PM on
(
Read more... )
Don't get me wrong. Swing has it's downsides. For one, it's buggy. There have been times when I've racked by brain for hours trying to figure something out. After consulting the bug database, I find it's a known bug that will be fixed at an indeterminate date in the next release. The JTable component (which is very useful) is known to be slow. Swing's pluggable look and feel is a blessing and a curse. It's really cool in concept, but it leads people to skin their applications. From a human factors stand point, skinning is wrong.
Without starting a flame war, I'd be interested to know why you hate Swing so much.
As far as "Click...click...drag...done!", I think that is the complete wrong way to go about doing GUI design. This comes down to personal preference. I like the control that coding a GUI gives you. The limitations of the click-click-drag approach prevent me from considering it as a viable option. Any sort of complex layout (which is nearly required for most applications) becomes unmanageable or sometimes impossible.
Reply
Reply
At work the other day, we watched a video about "immediate mode guis" which are guis that are made similarly to an immediate mode rendering pipeline. I can't find a link on Google to any page describing it. Most of the links refer to a different gui paradigm with the same name. Needless to say, it seemed pretty ridiculous. There was a lot of hand waving.
I'd be interested if you have any thoughts on a better approach to GUI programming. You said you don't, but if anything comes to you, let me know.
Reply
Really, the reasons you mentioned on why you like Swing are actually many of the reasons why I do not like it. I cannot stand the layout managers. I know that with the later releases you can use a null manager and position things exactly as you like, but even then I still am not a fan. The reason I do not like the layout managers is because it takes me forever to actually get something to look nice. Then, the person drags the window to make it bigger...and now it doesn't look right. I actually enjoy programming code behind GUI's to make them resize/change exactly how I want them to. The speed is another huge issue. Like for my SE project, there was no way we could have used Swing components to develop a nice game/interface. The listeners are *extremely* slow to move and manage. I guess most of those aren't really directly part of the Swing package, but Swing uses them. I also am not a big fan of Swing because it is Java. However, I do agree with you that it is nice how easy it is to extend the components to your liking. Though just as a side note, according to one of the head developers of Java (It was so long ago that I read the article), he felt that putting "extends" into the language is one of Java's biggest flaws.
But I mean, you are right in that it comes down to personal preference. You feel it necessary to code the adding of components to the GUI. I don't. It probably has a lot more to do with how we started creating our first GUIs and how complex of a GUI we are creating. I started with VB and just have felt like no other system for GUI development has made it as easy and quick to develop my GUI applications. But also, most of the coding projects I create have minimal interfaces. Most of them are behind-the-scenes processes that don't require much interaction with the user.
However, I recently have actually been interested in testing different languages to try and compare them side to side. Not for speed, but just ease of use, development time, etc. To do it, I'm working on writing the application in almost every language that supports what I want. I am using everything from C to PHP. Maybe doing this project in Java will give me a better understanding of why you like Swing. And perhaps even cause me to change my opinion.
Reply
Leave a comment