Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java, GUI builder or hand coding? [closed]

My company software has a lot of forms, till now we wrote the code by hand (MVC way).

We are considering to start using GUI builder.

There are few problems with using a Builder.

  1. Parts of the code are not readable.
  2. Parts of the code are not editable.
  3. It will be harder to edit the code later.
  4. We will have to continue using the builder in the future, even if we want to replace builder or write by hand, and no one can assure that the tool will be available and supported in the future.

I want to learn from others experience:

  • Do you recommend using tool or should we continue write code by hand?
  • Which builder is better?
  • How does he deal with the problems? (Is there any other problems?)
like image 245
Billbo bug Avatar asked Jan 22 '09 07:01

Billbo bug


People also ask

Is Java good for making GUI?

Java seems to have the best built in support for GUI programming, however, C++ using the MFC libraries has more than adequate tools for GUI development and may be a better choice when speed and efficiency are important.

Is GUI hard in Java?

Many instructors who have taught Java at the introductory level, however, report that GUI programming is difficult for beginners, which makes it harder to take advantage of the many attractive features that Java offers.

Do I need to learn GUI in Java?

Hence my recommendation: don't use a GUI builder for learning, because it hides all the important things which help to really understand what's going on. Use a good Java/Swing tutorial and start typing your applications. After you understand the basics, you can use a GUI builder for prototyping.

What is Java GUI builder?

This program is a WYSIWYG GUI builder and code generator tool for Java development, written in Visual Basic. This program lets you place AWT components (buttons, and so on) on a panel, drag and drop components from a toolbar (such as the Visual Basic IDE style) and then generate the source code for JDK 1.1.


2 Answers

For just a few forms I recommend using a Builder. It will get the done way faster. However, if you have a lot of forms that you need to maintain for some time, I recommend against a builder. For this case the time you spend in reading the code and maintenance is much larger than the initial design time. So, while the builder saves you some time at the initial phase, it makes code reading and maintenance more difficult. More over, it makes code re-use, even in the form of copy and paste from one form to another, more difficult.

I don't know if you are referring to web or desktop applications, but in general I haven't found a Java Gui builder that produces elegant output. Netbeans Swing generated code for example is a mess. Perhaps, if a nice builder were available I would change my mind. I had no problem using Visual Studio's form designer - it produces nice code that you can read and understand.

For desktop applications have a look at MiGLayout. It's a layout manager, not a builder, for Swing and SWT that will make your life easier.

like image 108
kgiannakakis Avatar answered Sep 17 '22 13:09

kgiannakakis


By using a good builder the development will be a lot faster.

The anxiety you have of not being able to modify the code may be due to you have a lot of logic in the view where it does not belong. Actually this change may help you to move logic from the view which is good precisely for the ability to change the visual elements with out breaking the code.

As per the "unreadable" you should consider use a better GUI generator. I've heard only positive things about NetBeans, and I have used IntelliJ GUI builder whose code is pretty clean.

On both the source code is readable and editable, but only for minor tweaks. For major ones, well use the GUI builder.

I think for a small number of forms, there is no problem in proceeding by hand, but since you have "many of them" as you just said, using this tools will be most beneficial.

like image 42
OscarRyz Avatar answered Sep 21 '22 13:09

OscarRyz