Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Would Someone Consider To Use SWT (or another native widget library) Again These Days For Portable Platforms / Applications?

DZone's Guide to

Would Someone Consider To Use SWT (or another native widget library) Again These Days For Portable Platforms / Applications?

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

Everything started with AWT in JDK 1.0. It came with JDK 1.0, and it used (actually uses—is still there) native widgets for rendering. I still remember the excitement, as it was introduced around 1998 (with JDK 1.2). Everyone was excited, although even the JTextFields weren't rendered correctly. Swing took the opposite approach—it rendered the components itself—so it was somehow OS independent. Only about three years later Eclipse was introduced with the SWT. It took a similar approach to AWT—because of the responsiveness problems of Swing and the native look and feel. At the time it was a viable solution for a given problem (although e.g. the performance of other Swing applications was really good). These days the responsiveness of Swing is just phenomenal (just ask IntelliJ / NetBeans users about it :-)), and Eclipse (forms) look very different to the native Windows applications (Outlook, Office, OneNote etc.). The new platforms like Flex, Silverlight, even Java FX, do not even try to achieve a perfect, native, look and feel—many nice demos just look totally different (which can be a good thing).

A native UI toolkit is harder to maintain for different platforms, because you have to test different operating systems (32 and 64 bits), and emulate some widgets, since they are not available for every given platform. So there is more effort to achieve the same goal (a decent toolkit). Furthermore, SWT can only wrap existing native widgets, so the usable API is somehow limited. It's not always fun to work with it. Just ask a developer (after a beer) with SWT / JFace experience, whether he/she really enjoys it. You will get interesting answers... :-).

Regarding the maintenance overhead and portability issues—it remains a really interesting question. Would e.g. Eclipse start with SWT again—or provide a lightweight alternative approach?

From: http://blog.adam-bien.com/

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Published at DZone with permission of adam bien. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}