Beware the GUI builder
http://www.hacknot.info/hacknot/action/showEntry?eid=76 has an excellent rant about the problems of visual editors (aka GUI builders).
While he talks specifically about Java, the same holds true for all of them. And yes, that means Visual BASIC and Delphi as well, languages which traditionally are seen as almost purely visual.
I've done several midsized Delphi applications and in all of them I ended up writing custom code to manipulate the screen layout and content on the fly, something GUI builders have always promised to make a thing of the past but fail to deliver.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Hi everyone,
Fantastic article
Richard West
freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
There's no use; these lazy turds won't change, and won't ever know that JEdit owns all IDE's.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
VI baby, VI :mrgreen: :cheesy::cool: (though I use JBuilder myself, but not before I could do everything by hand that JBuilder can do for me).
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
I'm curious as to how it lays the code out for you. Does it still follow the right form in which you want? I remember when I was like 12 and "trying" to learn VB.NET(failed miserably), I thought that was the coolest thing in the world that I had to do basicly no programming except for a few lines in methods generated for me, then show off the crappy programs to my parents. Now, I would rather do it myself rather than trying to learn how to work the programs and stuff like that. But I really enjoy using the command line. At least for now!
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
JBuilder does an excellent job. Of all the GUI builders I've used (and I've used (or rather tested) quite a few) it does the best job.
The code it creates is actually human readable, and it does a remarkable job of importing manually written code as well (even if it doesn't conform to its paradigms).
The current versions have automated code formatting options which correct things like indentation and spacing, block editing options to change say the name of a local variable instantly (select the block, edit the name, and all other occurrances in that block change as well), etc.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Personally I hate GridBagLayout :)
But don't use a single layout manager, experiment with combining them. You can place containers inside containers, using different layout managers for each as required.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
I actually prefer using the GridBagLayout. It is definantly the most powerful layout and if used correctly, can produce great looking layouts. The biggest key with any GUI layout is componitizing the whole thing. E.g.: placing like components on their own JPanel and then taking all the componitized JPanels and placing them on one larger JPanel.
The only other layout manager i use is flow layout and the only time i use it is when creating a popup windows button bar.
Regards,
Nate
It's very powerful, but the problem is, what if you have 20 components? It takes a billion lines of code with GBL, when you can simply nest layout managers, use arrays, and loop through the initialization.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
It is really ugly. The GBL is very powerful and has a neat concept to it, but it just doesn't work for my needs.....I wish it did, but it doesn't. If there was an easy way to tie it in with arrays and loops I would love it. Take a calcualtor for example. I would much rather hold ALL the buttons in an array and work from there, rather than coding everything out seperate. It's just too much code involved and it's hard to keep up with.
Normally, my approach is to use JPanels which have their own layout. In the end, I would position the JPanels using setBounds(int, int, int, int); which gives you complete control of the positioning. That saves a lot of time, because the majority of component positioning is taken care of with the jpanels, and all that's left is positioning the few jpanels that you have holding all of that.
Overall I wouldn't mind using the GBL, but it's too much cluter involved.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
I do use JBuilder, but only for prototyping and as an editor.
Love the code completion and class template features, makes coding a lot faster by removing a lot of the boilerplate work.
But, and that's the point, I do know how to do those things by hand and often do when working on other machines (like our Unix servers).
Unless and until you can do that you shouldn't use such tools.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
JB Foundation can do it, but I use JB2005 Developer myself.
Working professionally on web applications I need good JSP, XML, and other editors which the foundation edition doesn't provide.
There are several plugins for building user interfaces for Eclipse but I didn't find the ones I tried much good.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337