Matisse or Jigloo?
Asked Answered
P

8

9

We have a dilemma; developing desktop application using Matisse or Jigloo..

Matisse has this XML form files which we are afraid of maintaining later, we don't even know should MyEclipse further support Matisse, even Netbeans - do you think they will give up OS support of Matisse?

More or less Jigloo and Matisse have similar behaviour, although Jigloo obeys more designers wish, Matisse has this strange alignment behaviour from time to time.

Jigloo generates Java code which can be edited and which in turn can cause visual editor not being able to draw form. That is probably the reason why Matisse wants to have definition of elements in more stable XML form from which it generates java code.

Matisse would not help much if there is an error in instantiating a GUI element, so putting custom elements can be also nightmare.

When typing code in Jigloo, the visual editor likes to erase picture so you have to wait for picture to show up after editing code. In Matisse you can have errors in class and still editing GUI.

Please help us by voting, what do you prefer more and why.

Pyrenees answered 31/8, 2009 at 7:51 Comment(4)
Does not really answer your question: Did you consider coding your GUI by hand? I used Matisse a lot and I got the impression that if you have to maintain GUIs its easier not to do it with a visual editor, because it's more likely that it's going to screw things up.Biparty
@sebastian: that is the main argument we should give up on matisse. Coding GUI by hand takes time, not productive. In Myecplise 7.5 I have no more crashes, and if there is problem, now I can see some stack trace..Pyrenees
@as - "Coding GUI by hand takes time, not productive." It's a question of long-term vs. short term cost. Coding a GUI by hand - takes longer initially (and you actually have to learn Swing...), but (if done right) is easier to update with changes later, less code to maintain, less chance of something just breaking or having trouble with integrating with other projects (MigLayout? GlazedLists? SwingLabs?).Isogamete
Use WindowBuilder and be happy. projects.eclipse.org/projects/tools.windowbuilderPeterus
D
14

Please don't use either! As with this answer, it's my strong opinion (after writing Swing GUIs for 10 years), that using GUI builders is, in all but the most edge-cases, a bad idea. HAND CODE YOUR GUI!

  • Whether you choose Matisse or Jigloo, it is not a standard, will fall out of favour and a better tool will come along. At that point, you will have legacy code that is nigh on impossible to maintain. This has already happened several times in the history of Java GUI builders.

  • You should avoid forcing your developers to use one IDE and it is a huge overhead to expect devs to switch to a particular IDE when looking at the GUI code. They'll be frustrated as they can't remember key bindings, project setup is out-of-date, they have the wrong version installed etc. People will make quick-fixes without the builder. At this point your code is unmaintainable in both your IDE of choice, and in the GUI builder istelf! The whole thing is a mess.

  • Designing a GUI is not, in my experience, a particularly onerous task and probably accounts for no more than 5-10% of the total development time of an application. Even if initially using Matisse or Jigloo provides you with a 50% time advantage over hand-coding the GUI, this is insignificant in the grand scheme of things. It is certainly not worth the hidden costs and impending maintenance disasters that lie ahead.

  • GridBagLayout is not hard. It just isn't! It's really simple, in fact. It will take you a few minutes to learn and after that you'll never look back. Your GUIs will look like how you want them to look and your code will be more maintainable as a result. Use GridBagLayout!

I have spent a good deal of time warning people about this before and been proven correct.

Dawkins answered 9/9, 2009 at 15:57 Comment(17)
Yes the Netbeans GUI builder is cursed. One drag and drop and it ruins your forms. Best to learn to do it properly and avoid the tears.Schematize
I would agree with you for simple cases, but when you have forms with 30-50 and more controls there is no choice but to use GUI builder. That is why I suggested the "cleanest" one in my opinion - Instantiations Swing Designer.Anderaanderea
@Eugene - as I've already said, GridBagLayout is just not hard. It's certainly capable of managing 20+ controls without becoming difficult to maintainDawkins
Agreed. GUI builders for Swing are big bolted-on hacks because Swing just was not designed with GUI builders in mind from the beginning. Leaky abstractions are bound to appear. I don't know if GridBagLayout is the most elegant choice, but I would definitely learn to do everything thing by hand really well before consider doing it another way.Nez
@Oxbow_Lakes You can make your life easier by switching to MigLayout. GridBagLayout is nothing comparing to it.Anderaanderea
@Eugene - I've looked at MiGLayout and it looks great. Until they put it in the JDK I'll probably be leaving it alone though.Dawkins
@Dawkins - leaving it alone, even if it's better? - just like ignoring Spring/Hibernate/ANT/so many more just because they're not part of the JDK.Isogamete
@Isogamete - Spring and Hibernate are non-invasive. That is, they don't litter dependencies throughout your code. Even Spring DAO can be isolated into a single-class which is Spring-specific. And Spring is just a JAR like any other. This is not the same as a GUI designer which locks you into an IDEDawkins
@Eugene - MiLayout isn't a GUI designer, it's a LayoutManager class, it doesn't lock you into an IDE. Core Spring may be non-invasive, but Spring MVC isn't, and neither is Hibernate - your web/view layer has a dependency on Spring MVC classes in the first case, and your DAO layer has a dependency on Hibernate in the second. MigLayout is the same way - it doesn't spread the dependency throughout your code, only in your classes that need to layout GUIs - and the "MigLayout" LayoutManager class is the only class you have a direct dependency on - it uses Strings to configure the layout.Isogamete
@Isogamete - I never said MigLayout did lock anyone into an IDE! This question is about Matisee and Igloo! I agree that MigLayout looks great and should be in the JDK in some form or other, no pun intended.Dawkins
@Isogamete I know what the difference is between layout and GUI designer :) I use them daily. I was suggesting MigLayout to oxbow_lakes as a better alternative to GridBagLayout.Anderaanderea
@Dawkins - sorry - my comment was about your comment "@Eugene - I've looked at MiGLayout and it looks great. Until they put it in the JDK I'll probably be leaving it alone though."Isogamete
@Isogamete - that's true. The main reason being that I write layout code so rarely, it makes up such a small proportion of my code, and I can accomplish what I want using GridBag, that I see no immediate need of an extra 3rd party dependency.Dawkins
@Dawkins - you're right - you can accomplish what you want with GridBagLayout - I can too. However, It usually takes lots of tries, recompile and rerun and visually inspect the result to get the syntax and settings just right - and even then the problem is that the layout code isn't really readable anyway - it's hard to read GridBagLayout code and know exactly what the visual result is going to be.Isogamete
Not using a gui designer is a bad idea, the productivity will be awful, and the properly aligning controls on a gui will take ages if done by handStature
@oxbow_lakes, although from a project management standpoint what you say may be true.. But the flexibility and power of Netbeans' Matisse has improved remarkably over the years. In 4+ years that I've been (exclusively) making GUIs with it, I've never once regretted it. ESPECIALLY with how much it improves with every update. It really does make Swing a lot easier AND is MUUUCH more survivable than anything else in my programs...Serious
Use WindowBuilder and be happy.Peterus
G
2

I have personally had a handful of occasions where the XML file backing a Matisse form somehow became out of sync with the code and had to resort to a backup to get it working again. This was enough to scare me away. I have no experience with Jigloo, though.

My current projects use TableLayout, extensively. It is easy to understand and (of all the layout managers I've tried) maintain. I have not found any other solution in GUI design for Java that I feel more comfortable with than coding the GUIs by hand. Moving forward, it seems like the best "future-proof" way of coding my GUIs.

I agree with Chintan on using Matisse or similar to mock up your design and then convert the layout to another layout (like TableLayout). Personally, I like using pencil and paper to do most of it. Not exactly high-tech, but it gets the job done.

Georama answered 3/9, 2009 at 22:46 Comment(0)
A
1

I wouldn't go with either. The best thing I've found so far is Instantiations Swing Designer. It is not free, but not expensive either. It supports all major Swing layouts and DOES NOT create any additional artifacts except pure Java code.

Here is the link, if your are interested.

Anderaanderea answered 2/9, 2009 at 18:52 Comment(0)
B
1

I would prefer Matisse since Netbeans is backed by Sun Microsystems and the possibility of the project being scrapped in the near futures seems blissfully low.

Also, I do not know the size of your project but I have developed some small ones and I personally use matisse to see how the layout would look and then go ahead and code everything using the Miglayout library. It increases the amount of coding a lot but gives good control and flexibility. And there is a possibility this library might be included in Java 7, consequently embedded into Matisse.

Buchenwald answered 3/9, 2009 at 21:12 Comment(1)
And Oracle buying SUN has no potential for Netbeans being cancelled/sidelined/deep-sixed? Oracle have their own development environment (it's crap, but when has that stopped anyone) and is a supporter of Eclipse.Commission
M
0

I prefer Netbeans Matise. Even if it is impossible to edit generated code, it's much more easier to design complex screens with Mattise(because of FreeForm layout).

Motorboating answered 2/9, 2009 at 16:51 Comment(0)
P
0

I haven't tried Jigloo, but I would throw a fourth one in the mix.

JFormDesigner is the best Swing UI designer that I have ever used. Like Matisse, it does create XML form files, but that is the only negative about this tool.

It supports all standard layout managers, plus some popular ones (such as JGoodies FormLayout). It has plugins for IntelliJ and eclipse and can also run as a standalone tool.

Here is the link

hth

Koen

Palestine answered 3/9, 2009 at 15:27 Comment(0)
D
0

What you can expect when you mess a file generated by a tool? Mess, isn't it? This is a very very important always forgotten by developers.

Take Matisse as an example. It generates a XML file for you and a .java file for you. Why on Earth developers start changing these classes? Later they complain that everything is messed and they point out to Matisse as the guilt of it, because Matisse doesn't do A or doesn't do B. The only thing Matisse is guilty is not being able to fix the mess promoted by developers. This is problem in the domain of Artificial Inteligence and I personally do not expect any solution soon.

There's a more or less simple solution for it: OOP.

I explain: one of the most important concepts of OOP is 'responsibility', which means that a certain class has a limited and well defined responsibility in a broader and more complex problem domain. So, Matisse generated the UI for you, which basically consists on UI elements, event handlers, etc.

Then you say: well... I need to add some logic to it otherwise the UI is innoperative. True. This is another responsibility, which cannot never be implemented in the same class generated by Matisse. Because either people is lazy or do not understand what 'responsibility' means in OOP, people implement whateber they need, add lots of variables and promote all sort of madness in a class which is definitely not responsible for business logic.

By a very simple thing like inheritance you can separate business logic in a extended class. The base class is the one produced by Matisse. The extended one is your class implemented by hand which contain implementation of event handlers, initialization of UI elements, etc.

Many developers are tempted to edit by hand the .java file produced by Matisse. The golden rule is: never, never edit the .java file by hand. Matisse provides you means of defining whatever you need and call whatever you need. Never editing resources (both .xml and .java) produced by Matisse, you guarantee that it (Matisse) will be able to load it again in case you need to change the GUI in future. Probably you will find yourself tempted to edit the .java or even the .xml file directly. Please resist this temptation and educate yourself; you will thank yourself in future.

So... you can use whatever tool you wish or whatever provides the sexiest UI elements. All tools will fail if you fail to separate UI from business logic. All tools will succeed if you succeed in your main task as programmer which is: produce decent code.

Duhon answered 4/3, 2010 at 2:32 Comment(0)
P
0

Use WindowBuilder and be happy.

https://projects.eclipse.org/projects/tools.windowbuilder

Eclipse WindowBuilder is composed of Eclipse SWT Designer and Eclipse Swing Designer and makes it very easy to create Java GUI applications without spending a lot of time writing code. Use the WYSIWYG visual designer and layout tools to create simple forms to complex windows; the Java code will be generated for you. Easily add controls using drag-and-drop, add event handlers to your controls, change various properties of controls using a property editor, internationalize your app and much more.

Generated code doesn't require any additional custom libraries to compile and run: all of the generated code can be used without having WindowBuilder installed. WindowBuilder can read and write almost any format and reverse-engineer most hand-written Java GUI code. It also supports free-form code editing (make changes anywhere, not just in special areas) and most user refactorings (you can move, rename and subdivide methods without a problem).

Peterus answered 2/6, 2022 at 21:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.