Connecting the dots with Solaris and middleware In the middle

Monday Jan 14, 2008

The Update Center (UC) 2.0 Toolkit open source project that I am a part of is reusing OpenSolaris' Image Packaging System (IPS) for distribution of software and updates on a variety of OS platforms.  In addition to reusing the underlying IPS CLI and server side repository infrastructure, the Update Center Toolkit team has been keen to reuse the IPS-oriented package management GUI tools being developed by OpenSolaris.

PyGTK and Glade for OpenSolaris 

OpenSolaris is using PyGTK, the Python binding to GTK+, and the Glade GUI design tool to help them rapidly develop the new package management GUI tools for OpenSolaris. Since IPS itself is written mostly in Python, using a Python-based toolkit for the GUI applications was a natural decision.

Since the OS support needs of our Update Center Toolkit project extends beyond the platforms supported by GTK+ (e.g. GTK+ is not readily available on Aqua in Mac OS), we've had to explore some other GUI development options.  Our default approach is to use Java and Swing, but going in that direction will entail development of a substantial Java API on top of the IPS Python modules.  Unfortunately, there's no easy means to bridge the gap between Java and Python code. We've looked at Jython, but it hasn't kept up with the latest Python versions and doesn't really offer a solution for Java calling Python modules.

Exploring wxPython, wxGlade and XRC

Before we commit to the Java-based GUI route and development of  a substantial API on top of IPS, we're taking a week or so to explore a series of wxWidgets-based tools.  wxWidgets is a popular cross-platform GUI toolkit that depends on each platform's native GUI support.   That's good news for us in that Mac OS would be straightforward to support with a wxWidgets-based solution.

Given our interest in using Python, a GUI design tool and XML-based GUI resource definition, we're looking at the following technologies:

  • wxGlade - GUI design tool for wxWidgets
  • XRC - XML-based resource file format for wxWidgets
  • wxPython - the Python binding to wxWidgets

There are several other GUI design tools for wxWidget-based applications, but some of these are commercial tools which aren't suitable for our open source project.

wxGlade's role is patterned after Glade, but it doesn't share any code because it is based on using wxWidgets rather than GTK+.  wxGlade is able to export GUI designs into an XRC XML-based resource description file format that can be loaded into wxWidgets applications.  XRC files are similar to the Glade resource files mentioned above. XRC is not unique to wxGlade.  Other tools also support generation of XRC files.

Objectives of Exploring wxWidgets

These are our near-term objectives for exploring wxWidgets:

  • Platform Support: Determine how well a representative wxWidgets app looks and feels across OS platforms.
  • Dependencies: Understand the implications of dependencies of wxWidgets.
    • To what extent with wxPython require more than our minimized form of Python?
    • What is the practical download size of wxWidgets and wxPython?
    • Are there additional native and OS-specific requirements of wxWidgets that aren't usually already installed on the target platforms?
  • Rapid, Iterative Development:  How well does the use of these technologies support rapid development?
  • Ease of Reusing OpenSolaris Code: How much of the Python-based IPS interface code can we reuse while building our own wxPython-based application?

Next week the Update Center Toolkit project will compare and contrast the wxGlade/wxPython approach to a Java-based approach and make a decision as to whether to continue investing in the wxPython route or switching over to a Java-based GUI route and preparing to implement a substantial Java API over IPS.

Initial Use of wxGlade

Over the weekend I started designing a form of the UC 2.x GUI using wxGlade.  The following screenshot shows the wxGlade tools and the emerging UC 2.x GUI layout on the desktop.  (In this example I am using my Ubuntu desktop because I have been unable to locate a binary distribution of wxWidgets for OpenSolaris.  That gap will be filled as part of Project Indiana.)  Although there's not much there yet, all of the menus, the main toolbar, etc. were simple to define using wxGlade.


Next Steps

My next steps this week are to:

1) Develop Minimalist GUI: Implement a minimalist wxPython application to enable anyone to fire up the GUI as it's shown above  Basically enabling folks to rummage through the menus and to start commenting on them.

2) Add Live Package Listing: Add a package listing pane to the GUI and populate it using real package information from both an installed image and the repository.  The good news here is that much of the same IPS access code from the ipsgui tool can be reused in the wxPython-based GUI.  The following screenshot shows the current version of the PyGTK and Glade-based IPS GUI running on OpenSolaris Developer Preview.  The package listing feature shown below is what I plan to represent later this week in the wxPython-based example.



3) Run Across Platforms: Exercise the results of 2) across our primary OS platforms of interest: Windows, Mac OS, Linux and Solaris.

Once these steps are addressed, we'll have enough information concerning wxWidgets to decide on our GUI implementation direction for the Update Center Toolkit project.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed