advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Wouldn't you like to be able to design GUIs in a medium that wasn't entirely dependent on a specific development environment or delivery platform—and then be able to activate that GUI from the language of your choice, AND have it run in any platform? Do you care? Do you agree with this editorial? Tell us why or why not in the talk.editors.devx discussion group.
Partners & Affiliates
advertisement
advertisement
Average Rating: 4/5 | Rate this item | 2 users have rated this item.
 Print Print
 
SWT, XML Put True Cross-platform GUIs Within Reach
The reality of a single cross-language, cross-platform GUI interface programming model is in sight, based on an XML description language supported by fast native runtimes. Will Mozilla, Eclipse, or someone else step in and complete the last mile that gives all developers a common way to design and program fast cross-platform user interfaces? 

advertisement
he Java world has a new toy called SWT (the Standard Widget Toolkit), created by IBM and integrated with the Eclipse development environment. SWT is a platform-specific runtime that exposes "widget" objects such as text boxes, scrollbars, and other familiar GUI controls to Java developers, but uses JNI to make native code calls to create and interact with those controls. Using SWT, Java developers can build responsive GUI applications that are essentially indistinguishable from native platform GUIs.

That's not to say that SWT applications aren't cross-platform; they are (mostly). There are SWT implementations for Windows (Win32), Windows CE, Motif (Linux, AIX, HP/UX, Solaris), GTK (Linux), and several others. The SWT runtime changes when you run your application on these different operating systems, but as long as your application code uses standard widgets it can run unchanged. (Not all implementations are feature-complete; you can check the current status at Eclipse.org.) Sure, some platforms have widgets and capabilities that others don't have, but all the implementations include a core set of widgets—and programming to the core set from Java is identical across all the platforms.

Some Java developers—and Sun itself—object to SWT because it ties applications to platform-specific code, thus breaking the cross-platform nature of applications written without such dependencies-—such as those written with Swing. But many developers eschew the purist attitude and are using SWT anyway because it improves the performance of Java applications, making them more competitive with applications targeted to specific platforms.

The developers on the Mozilla project, faced with a similar problem—how to create a cross-platform browser—came up with a different type of solution, called XUL (XML-based User Interface Language), which uses an XML-formatted language to define a description of the interface objects. That's the first big difference between XUL and SWT. While both define "widgets," the SWT implementation includes the code to create and activate the widgets, while XUL simply describes them. In Mozilla, you can control the interface elements with C, C++, Python, or JavaScript, and you can control the appearance or style of the widgets using CSS (Cascading Style Sheets).

So far, SWT implementations target desktop applications, while Mozilla's XUL currently targets browser-based applications. But there's no real reason why they have to remain in those niches; both are ways to describe and activate controls. It doesn't really matter whether those controls run in a browser or in a desktop application.

  Next Page: Open Source, Cross-platform
Page 1: IntroductionPage 2: Open Source, Cross-platform
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES