2

After having worked on Web design and Android, I finally started work on a desktop software, until I hit a major delay in my development cycle when I actually started UI Design for Desktop. The experience so far is a pain. I decided to use Java to code the program, because then I could use cross-platform APIs for sockets and wireless interfaces (which my program relies heavily on, and works successfully).

Web and Android UI design:

HTML/CSS/Javascript ; XML/Android API --> Offers high flexibility, customization, quick UI development cycle.

Java desktop UI design

AWT/Swing/Swing FX -->

  1. Almost no customization possible, as seen from issues here and here. When customization is possible, implementing it highly increases development time as seen here. It also increases code-complexity and in most cases, the solution is native, and not applicable cross-platform (at least Linux,Windows,Mac). The native, default look is really not most UI designers want.

  2. Drag-and-drop options are good , improve development time eg. Window Builder. But options like adding an ImageView is missing. And, if customization mentioned in point 2,is required, the auto-generated code has to be modified heavily, totally negating the use of Drag-n-drop.

Can anyone suggest me a really good or close-to-good UI tool , or say UI Engine (if one exists) , that has the following features:

    1. Quick development time. Drag-n-drop, HTML/CSS/XML like methods to design.

    2. Everything is cross-platform, including customization solutions.

    3. High degree of customization. Developer designs what looks good to him/her,
       without increasing time-to-develop much.

    4. Also cross-language. That is, has wrappers for all major programming languages,
       like C++,Java,Python etc.

The best approach or tools, in my opinion:

  1. Qt Framework . Very good for UI, but it'd really be good if it has wrappers for Java and other languages. It will not reduce development time, and will require hand coding, but the interface can be made to look really good and
    usable.

  2. WxPython . Another good tool, would be cool if it has wrappers for other languages.

  3. Some tool, that lets design desktop UI with HTML/CSS/XML-like syntax and ease-of-use.

  4. Stop thinking of UI tools and either

    a. Just stop complaining and use the defaults and existing tools and native looks.

    b. Hand code everything, and customize individually for each platform.

    c. Take a graphic canvas in Java and program UI, like you'd program a scene in a game.

Please suggest if you think otherwise, or if there are better,easier options available.

Thanks.

Community
  • 1
  • 1
sanjeev mk
  • 4,276
  • 6
  • 44
  • 69

2 Answers2

6

"Almost no customization possible" is in my opinion, short sighted, you could look here for information on look and feels, which, if your adventurous, you could create your own. Many of the issues people have with customisation of Swing comes down more to a lack of understanding then the inflexibility of the API, in fact, I've found Swing to among the most flexible and customisable toolkits around - IMHO.

You could also look here about how to make your own components

What you have to realise is, as you move closer to "quick tools" you start to reduce the flexibility and customisability, as these tools start to lock you in.

I don't have experience with WindowBuilder, but NetBeans form designer allows you to include any component that is within the projects class path, including any you've build or downloaded.

I agree that one of the criticisms often leveled at Swing is how long it can take to get it up and running. This comes down to an API designed for flexibility and customisability. It's up to the end developer to build the libraries around the API that best suits their needs.

Most people will tell you to avoid the screen builders in favour of hand coding. Personally, I like the screen builders, but I insist that my junior developers build a good understanding of how layout managers work and build design techniques like compound layouts.

I think one of the problems a lot of people have is forgetting to build the application. While I like a good looking application, I'd still prefer one that actually does what it was designed for and does it well, over looking pretty.

IMHO

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
  • @MadProgrammer , thanks for your input. I agree that functionality is more important than looks.I started the UI design after I accomplished and verified the core functionality of the software. When it comes to small-sized software, it's hard to believe that UI design actually requires more time, than developing the functionality. I had checked out LNF, and customization with Swing, though possible, increases dev time , and solutions are not always cross-platform. – sanjeev mk Jan 19 '13 at 21:35
  • If you check out how to make rounded corner JFrames (link given in question), you'd realize, that the solution provided by Java 6, is not elegant, and is actually a workaround provided using translucency, which highly increases complexity of the code, and is not guaranteed to work all the time. – sanjeev mk Jan 19 '13 at 21:38
  • 1
    So, require Java 7 instead. It's the same thing as saying you want to use a feature from .Net 4, but you want to use .Net 2. If you have a particular feature requirement, then require the user to be using the API version you need. As a side note, we use transparent windows in out application and use Java 6 on both Windows and Macs just fine. I don't know why your getting upset about having to actually do some work. – MadProgrammer Jan 19 '13 at 22:32
  • 1
    If you want something, then your going to have to work for it. No API is ever going to meet eveybodies needs and Swing is one of the most flexible (IMHO) for this, as it makes no apologies for been basic, but how many APIs do you know provide (if limited) support for HTML out of the box, for most of its text rendering! – MadProgrammer Jan 19 '13 at 22:33
2

I will talk in terms of Qt

1. Quick development time. Drag-n-drop, HTML/CSS/XML like methods to design.

Qt provides an excellent development environment:

  1. Qt Creator Cross-Platform IDE
  2. Qt Quick Designer
  3. Qt Designer
  4. Internationalization Tools
  5. HTML Help System
  6. Visual Studio Add-in and Eclipse Integration
  7. Cross-Platform Build Tools

You can read about the QtDesigner at the given link. It provides you a simple what-you-see-is-what-you-get (WYSIWYG) kind of interface and generated auto code for you. Other modules like internationalization are also great to use if you want your UI to be multilingual.

2. Everything is cross-platform, including customization solutions.

Qt works on the following platforms:

  1. Windows – Qt for Microsoft Windows XP, Vista, 7.
  2. Windows CE, Mobile – Qt for Windows CE and Windows Mobile.
  3. Symbian – Qt for the Symbian platform.
  4. OS X – Qt for Apple OS X; supports applications on Cocoa.
  5. X11 – Qt for X Window System (GNU/Linux, FreeBSD, HP-UX, Solaris, AIX, etc.).
  6. Embedded Linux – Qt for embedded platforms: personal digital assistant, smartphone. Maemo, MeeGo – Qt for Maemo, merged with Moblin to MeeGo
  7. Wayland – Qt for Wayland display server. Qt applications can switch between graphical backends like X and Wayland at load time with the -platform command line option

External ports

Since Nokia opened the Qt source code to the community on Gitorious various ports have been appearing. Here are some of them:

  1. Qt for OpenSolaris – Qt for OpenSolaris
  2. Qt for Haiku – Qt for Haiku
  3. Qt for OS/2 – Qt for OS/2 eCS platform
  4. Qt-iPhone – experimental development of Qt for iPhone
  5. Qt for webOS – experimental development of Qt for webOS on Palm Pre
  6. Qt for Amazon Kindle DX – experimental development of Qt for Amazon Kindle DX
  7. Necessitas – Qt for Android
  8. Qt for BlackBerry – Qt for BlackBerry

3. High degree of customization. Developer designs what looks good to him/her, without increasing time-to-develop much.

Discussed above.

4. Also cross-language. That is, has wrappers for all major programming languages, like C++,Java,Python etc.

You wouldnt believe the list here. They cover almost everything including Ada, Pascal, Perl, PHP, Ruby, Python and Java.


I have given the above information assuming that you are planning to make Desktop Applications with the 'native' widget look and feel.And I would like to add something, more.

  1. If by any chance you are flexible enough to make UI which doesn't really have the 'buttons' etc and is more like 'Smart Phone UIs', don't go anywhere else than using Qt-Quick.

  2. Fast, easy, powerful, flexible. Infact, they have started providing some support for direct desktop widgets in qml itself. See here.

  3. With the rapidly changing look and feel of the modern desktops, trend seems to be go towards a future with Phone and Desktop UIs merging at some point!

With hardly any innovation happening in the desktop side, they seems to be moving towards whatever new is coming in the Phone world. Well, see whats happening in Windows Metro kind of UI?

Just in case, you can read here how you can make Metro like UI is qml!.

And with Qt5 coming in, things just got better!. Read this to see how it could bridge the gap between Desktops and Phone's UI.

P.S. Views might be a little biased, am too much of Qt fan and Java hater, both. :- )

Community
  • 1
  • 1
Amit Tomar
  • 4,800
  • 6
  • 50
  • 83