Cross-Platform GUI Toolkits?
rrwood asks: "The company at which I work is about to overhaul an existing application. Strangely enough, we're primarily Macintosh-based, but are casting an eye towards cross-platform development (i.e. Windows, though I'm hopeful that an X/Linux-based version is also a possibility). Given that the app is to be a fairly rich GUI front end that talks to a database backend, I'd be interested in hearing any recommendations or advice anyone out there has to offer." Read on for more information on the toolkits currently under consideration (feel free to offer more suggestions), but we are talking toolkits here. The topic of cross-platform languages got a rather thourough treatment in a previous article.
"It's pretty much a necessity for the solution technology to include a RAD tool.
With respect to using a portable C++ core and platform-specific GUI layer (or even portable GUI layer-- keep reading), there are a few toolkits around that seem promising:
- GLUI, an OpenGL-based GUI
- Whisper, a Mac/Windows application framework
- WxWindows, a framework which supports Windows 3.1/95/98/NT, and Unix with GTK/Motif/Lesstif, and MacOS
- YAAF, Yet Another Application Framework, offering suport for Macintosh OS, Windows 95 and Windows NT, and X Windows
- CPLAT, a framework for developing MacOS and Windows (Linux soon) applications
- Ardi's Carbonless Copies technology, which is a portable rewrite of much of the MacOS API
Why is this question posted to Slashdot about once a month? The answer is never different, just always a flamefest between wxWindows and Java, with some random suggestions from other people thrown in :-)
--
In addition to which you could also start by using KDevelop and Klyix (the new RAD tool) from Inprise shouldn't be too far away...than you could have a group of programmers who are used to the QT specific issues who need to incorporate a new RAD (no big deal in my opinion).
Give it a shot...it has been working for me =)
I would recommend Motif or a Motif based framework. While programming in Motif isn't the most pleasant experience, it is extremely portable. Nearly every major OS has a Motif implementation.
If you're a MacOS oriented house, I'd assume you are going to support OS X. With the unix nature of OS X, I'd assume a GTK would be fairly easy to port, if not already done.
There is also GTK for Windows. I'm not sure how well the port is done, but if it's good enough for Mozilla......
The cross-platform nature of GTK is why Mozilla had the exact same look and feel across platforms. I'm not sure how well it would work for you, but it's something to look into.
Basic? I think they're trying to sell this...
-jpowers
-jpowers
This page has a pretty detailed overview about whats available and what platforms each toolkit works on.
"God fights on the side with the best artillery." - Napoleon, Marshal of France - speaking truth to power
The QPL is sufficient for OSS and QT is a very solid framework from which to code.
I do it on a daily basis.
Granted a Mac consideration is not there.
So, revising my earlier post, maybe wxWindows would be advisable, however, worrying about GPL in the scope of closed application development is irrelevant.
Use Mozilla. Its already got all of the cross-clatforms (Mac,Win,X,Be...), and all the gui is written in xml. Its nice and simple, easy to modify, and importantly, looks the same on all platforms!
Sure.. its isnt finished yet, but if this product wont be realsed for a while, it might be a reall good idea to investigate
/* Lobster Stick To Magnet!*/
While vaguely related, this isn't really for GUI, more for graphics in general...
If you're doing multimedia development, I'd recommend SDL (Simple DirectMedia Layer), a wrapper for X, DGA, OPenGL, DirectX and various other lower level APIs. It's available somewhere on www.devolution.com.
If you doing 3D stuff, try GLUT. This one acts as a simple windowing toolkit for various operating systems, including Windoze, X, Mac OS et al.
- Damnit, I'm dead Jim
Use the browser as your front end. That's the only way to go.
Nobody uses GUI toolkits anymore. Your front end should be HTML.
Both Tcl/Tk and Perl/Tk are easy-to-use, general-purpose language interfaces to the TK library. There are more RAD tools available for Tcl/Tk, but Perl is imo somewhat more attractive because there are more high-functionality library modules available for Perl, and I already know Perl (and being able to use a language that your programmers already know is an important issue, having an impact on development time, code reliability (fewer mistakes in a familiar language), and maintainability (easier to find programmers with Perl experience than with Tcl experience)).
Both Tcl/Tk and Perl/Tk are well-supported under MacOS, Windows (2k/98/95/NT), and various Unixes (Linux, FreeBSD, Solaris, etc). It is, perhaps, a little more work to make your Perl code portable across Windows and MacOS, but IMO easier than making your C++ portable.
If you don't like the performance of Perl, you can do what I do and write just the GUI part in Perl/Tk, and let it talk through pipes to your "real" application (written in C, or whatever).
-- Guges --
I don't want to add to the Java vs (Windows || C++) holy wars, but if you do decide to try Java, then you should also give Forte a try. Sun has recently released the basic IDE as open source under the Mozilla license. I haven't yet used it on a large project but after just playing around with it for awhile it seems to be as good as any other IDE I've used. It's written in Java, and will therefore run on any platform that supports a JRE.
Always and inevitably everyone underestimates the number of stupid individuals in circulation
Information is not Knowledge
I would assume that every platform you would conceivably want to access the database frontend from has a web browser available to the user. The correct way to create a portable database frontend is to make it web-based. You can place the frontend on a unix server stowed away somewhere convenient and users from any platform can point their web browser to the correct address and manipulate the database from there. The benefits are multifold. For starters, you can upgrade the code to a newer version without reinstalling the client on multiple machines. Any sysadmin appreciates the import of that feature. Your users are also not tied to a particular machine or location. You can allow access to your application from properly authenticated external sources and when users go on the road they can easily access the database. With the ease of use and rapid development qualities of Perl DBI or PHP as advanced as they are, there is little reason to ever write another database frontend application framework.
--
Brandon D. Valentine
At the company I work for now, we used CodeWarrior for Windows and Macintosh development. Of course, we did have a few problems and didn't really need to target the Macintosh platform anyway, so we dropped it.
So, yes, the IDE (with toolkits) did have a few problems but mostly in the way of TCP and UDP (which our application needed). The toolkits seemed to work fine.
Hope that helps.
The "Cocoa" frameworks allow you to do this, and they're a rich set of frameworks. Unfortunately the licensing prohibits wide distribution, and as of September, all the licensing options are gone completely.
The technology is there now. It has been used by Apple/NeXT for years now for development, and is used now in WebObjects for the development tools.
Other companies have developed the both general use apps (like drawing programs, db programs, etc..) and some truely amazing vertical market stuff.
Scott Anguish
http://www.stepwise.com/
I have been playing with V gui since it was mentioned in Dr. Dobbs in '95 or so. It is quite nice these days and works well between WinXX, X windows and OS/2 for those that still have need to support it.
V is freeware and has many good tutorials to help get you started quickly. They even have some pretty good language guides if you need help in that area. Overall, not as polished as some commercial cross-platform toolkits I have seen, but quite extensive for a free package.
Kindness is the language which the deaf can hear and the blind can see. - Mark Twain
fltk (Fast Light ToolKit) at http://www.fltk.org/ works for me, for Windows and Linux.
MLT - simple and robust open source multimedia framework for Linux
(Actually, it is made easier by the fact that we've been writing our code in a style ammenable to Java, so we can actually PORT much of the code rather than rewrite. A hint for those porting C/C++ to Java: don't do pointer arithmetic.).
Another alternative is HTML. A lot of database-based applications would be beta off done with HTML frontends. For example, our bug tracking database is simply an HTML frontend thrown onto a database backend.
I've looked into this too. The toolkit I am leaning towards is V, located at http://www.objectcentral.com. Well supported, and is under continous development.
-- Error: Cannot find file REALITY.SYS - Universe halted, please reboot!
I know this has allready been posted but... Make the front end web based. It has two very important attributes.
1. Cross platform.
2. Easy on network. What happens when the CFO decides he wants to access the application remotely (dial-up, extranet, telecomute...ETC)? With a Web based application it is easy.
Back end can be cross platform as well. PHP is supported on all/many systems, as well as Coldfusion, as well as ASP(Yukkie).
I would strongly recommend using Java if you'd like to write code that is truly portable and can be run on anything from a Palm Pilot, to your toaster, to Windows or Mac's new X OS. Another good reason to use Java is that with the introduction and "rave reviews" given to XML, it's a great way to combine code (Java) and data (XML) portability since both of these languages are seemingly made for one another and work quite nicely together. Good luck!
If you celebrate Xmas, befriend me (538
I work in movie visual effects and this is traditionally a Unix based culture. But with SGI completely letting the industry down we have to turn to Windows. Even before getting onto building GUIs we need to manage our basic projects. I use CVS with Makefiles under Unix. But that doesn't really sit well with Visual C/C++ which stores projects in mysterious (at least to me) binary files. What is a good cross platform revision control system that would allow me to use the Visual C++ IDE as well as Unix command line tools? I'm dreading getting onto the GUI stuff. What happens when you want OpenGL in your GUI? What happens when you want to blit hi-def images to the screen in a GUI multi-platform at 60 fps? All tough questions I think.
--
-- SIGFPE
I've been through the cross platform C++ GUI library thing twice before. It never works. Its never clean. You never quite get the results you want. The same number of people working on your current product won't be able to magically do the cross platform one no matter how good the GUI abstraction library is. Do it right and perfect. Use the native APIs.
It is available for most operating systems (Mac, Win32, Unix, etc.) and has been in use for a few years, so there is a large developer community and lots of documentation out there.
http://dev.scriptics.com/
"Classic UFO's
I sent e-mail to Paul Rademacher months ago with a patch to the GLUI 2.0 beta (which looks VERY nice and promising). The patch allowed it to compile under GCC 2.95.2 (basically fixed some casts and such). Never heard back from him. The beta has been up for quite a while (> 8 months). Does anyone know if he is still supporting/working on it, or if he is still around?
People working on 3D apps should take a look at GLUI, it is a NICE complement to the more traditional GUIs.
"It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
In places where browsers don't provide sophisticated enough widgets, e.g. combo/select boxes, you can use Java alternatives. For example, on the intranet systems I'm currently working on, we use a home-grown, XML-bound Java combo box which works just like the combos provided by typical GUI development tools.
DHTML-based apps can easily be made much more interactive than typical web apps, by using script to obtain (XML) data from the server and updating portions of pages rather than the standard browser model of reloading an entire page.
The following isn't very well organized, written on the fly, but benefits of a DHTML approach include:
- Natural client/server model enforced by browsers supports and encourages development of a well-separated layered model. Can be used to implement simple two-tier systems which talk directly to a database, or more sophisticated, flexible three+ tier systems with an object-based middle layer (developed in Java for portability.)
- The latest HTML, stylesheet (CSS) and XML/XSL standards support clear separation between "document" structure, presentation, and content. Reuse in software development is all about separating out functionality as much as possible - a blob that does 10 different things can't be reused as well as a focused entity which does one thing. CSS stylesheets allow you to reuse presentation definitions in different contexts, XML allows you to reuse data and queries, XSL (which applies a template to XML data) allows you to reuse "structure", i.e. implement the same layout for data in different contexts.
- Although HTML is often thought of as inferior to traditional programmed GUI solutions, when it comes to DHTML and the associated technologies, this is a misperception. In some respects, such as the widgets mentioned above, it is lacking, but as mentioned, this can be addressed using judiciously applied Java objects. In other respects, such as its handling of multimedia content (images, sound, movies), its hypertext capabilities, and its free-format layout, it is far superior. Applications can be developed which allow a user to navigate freely between entities far more easily than they ever could with traditional GUI database applications.
- Declarative rather than procedural model used by all these technologies (HTML, CSS, XML, XSL), lends itself to automation via toolkits.
- Prediction about the future: this technology is moving fast, and is likely to catch and outstrip existing GUI application development models quite quickly, at least when it comes to traditional database-oriented applications. Developing a system like this now is a bet on the future direction of such systems, and will avoid you having to retool and relearn in a few years time when the limitations of your non-browser-based cross-platform application become problematic.
The problems I see with this approach at the moment are:- Do-everything toolkits for this kind of application are not yet available. Although there are toolkits which work for particular layers of such an application (especially a middle object-based layer), there's nothing I know of that's oriented towards creating cross-platform "rich GUI" systems in a browser. The user-interface aspects of web application development toolkits tend to be oriented towards the simple, "list products, order product" type of application required by business-to-consumer web sites. On the positive side, you can still use products for web page design and so on, you just have to live with working quite a bit in a non-visual code mode to add your custom widgets, Javascript, etc.
- You'll be something of a pioneer developing an application like this now. All the old sayings like "pioneers are the ones with arrows in their backs" exist for good reasons. No one ever got fired for churning out another application with the same old reliable-but-limited existing technology.
Bottom line, you should at least consider a browser-based application in a case like this.You've seen the banner ads with the Penguin being shot out of a cannon (Slashot) and others on UserFriendly. Click thru one of them and check out the product at http://www.omnis.net/products/studio/index.html
I am an Omnis user (against Oracle) although I'm not using Studio yet.
Native SQL drives for Oracle, Informix, DB2, etc. on Win32, MacOS and Linux.MySQL you have to hit through ODBC.
They also have a web client, so code that you use in the GUI can also be used on a web-based app server.
Lots of links listed here:
http://www.interactive-systems.com/omnis.html
.
I've also been looking for a suitable portable GUI toolkit, but the main problem lies with that I want to have MDI support also and haven't found a one with it (as I don't really want to use QPL, I find GPL more suitable for my ideals). Also I've been looking for a mdi extension for gtk, I know gnome-libs had mdi support, but most users won't be willing to install gnome-libs to run a program(as it uses a ton of other libs) I know I probably should do it myself, but hell, I don't have any experience in lowlevel gui programming :-)
Thanks for the link :)
Cybie! aka Ralph Bonnell
The short answer is that there is currently no "complete" solution. By "complete", I mean:
Before the knees of Java-heads start jerking, let us examine how the obvious candidate falls short:
100% Pure Java
Though Java written only to Sun's API is in theory useable for a cross-platform app, there are a few pragmatic issues -- the APIs are very poor and complex, the UI layer (Swing, née AWT) sucks ass, VM idiosyncracies are rampant, and performance may be a problem (though improvements are constantly being made). On the up side, there are several RAD environments for Java, your development and deployment platforms can be (more or less) different, and database access is reasonably solid (JDBC).
More or less everything else out there is incomplete in terms of the three main criteria you have stated (UI APIs, RAD tool, DB access).
Apple's Cocoa/Yellow Box/OpenStep Frameworks
For just the Mac, the Cocoa frameworks that are a part of Mac OS X are by far the best solution. They are vastly more sophisticated, complete and robust that anything else on any platform (with the possible exception of some SmallTalk environments). Cocoa has top notch UI support (the AppKit), an eminently usable RAD environment (ProjectBuilder, InterfaceBuilder et al.) and DB access that is about 2 generations ahead of anything else (Enterprise Objects Framework). Cocoa is also completely cross-platform technically, and has been so for several years (at one point running on Mach (m68k, i386, hp-pa, sparc) & Windows (i386). So what's the problem? Apple does not currently license Cocoa for anything other than the Mac, and has indicated no plans to do so. This prevents people for whom cross-platform development is essential from using what is without a doubt the most advanced application development environment in existence. Yes, it sucks. Harrass leadership@apple.com about it.
So what are other people in the same predicament doing? Though there isn't currently a perfect, off-the-shelf answer, there are many things one can do to get close:
Other random notes: If GNUStep ever gets close to complete, your Cocoa code should trivially port to anything supported by GNUStep. Currently, the non-UI layer (Foundation) is production quality. Also, if your database schema is complex/demanding, you really, really should take a look at EOF, which is now a part of Apple's WebObjects product.
Handy-dandy URLs
Mac OS X Developer Documentation
GNUStep, a free implementation of the OPENSTEP spec.
Java 2 Documentation
I would suggest you contact someone at TrollTech (www.trolltech.com) and inquire about the status of the Macintosh port.
From what I remember a few months ago they were looking to hire some experienced Macintosh developers. Gee, I guess that means they are working on a port....
--John Cavanaugh
- True Object-Orientation: Smalltalk-80 was developed at Xerox PARC under the leadership of Alan Kay, who coined the term "Object-Oriented". In Smalltalk, everything is an object -- there are no primitive types. Simpler is better.
- Elegant Syntax: it's not like C, C++, or Java -- and why would you want it to be? OO is a new paradigm, and we can all use some help thinking in new ways
- Bit-compatible across platforms: All that's needed to switch platforms is a new virtual machine. Think Java+Swing on steroids (after 20 years of smoothing wrinkles out). VisualWorks runs on Linux, Windows, Mac, Solaris, HP-UX, and more -- and it's done these things for years.
- Fast Object Engine (Virtual Machine)
- Refactoring Browser: effortlessly refactor your code with this powerful tool
Needless to say, I'm sold -- and I'm never going back to a C-style OO language.--
Signal Ground: Linux Hardware news and reviews
From his overview of the project goals (formatting changed for slashdot):
Legitimation for the existance
The idea behind OOUIs is to leave as much of the UI creation as possible to kits on the server side and so to reduce the static information (shipped with the application) to the minimum.
This gives the largest flexibilty to adapt to the user's environment (e.g. computing platform) and preferences.
Abstraction
To make as less assumptions about the UI implementation as possible, the description of the UI should be very abstract (from the application's point of view). The description should be mostly semantical, because this provides the necessary level of abstraction. Many ideas from object-orientation are used.
This level of abstraction gives the possibility to create very different, unforseeable UIs from the description.
Modularity
Choices
Moving nearly all of the UI out of the application (modularity) gives the user freedom.
E.g. if a user likes the way, the GIMP arranges its windows, he can make all applications behave that way; if he prefers console programs, he just has to switch kits; if he has a true 3D environment, he again just has to get new kits; if he has only his cell phone available, he can still use the same application. Now, that's "portable"
Consistency
Because the concrete UIs for all applications are created by the same entity, the OOUI kit, a high level of consistency is reached.
Faster application development
Once the programmer knows how to create OOUIs, the use of them should shorten application development time, even if only one platform is targetted, because there is no need to care about UI implementation details. However, this is just a positive side-effect, not a goal.
A comfortable filemanager similar to Microsoft Windows Explorer could be created in one day. An example diagram (which represents the most important part of the OOUI description) has been developed in 2 hours. When the simple backend code using OS commands is written and some icons and texts are defined, the filemanager is finished.
(end modified quoting from Ben's OOUI overview)
--
The shareholder is always right.
I finally came to believe in the use of Mozilla for XP development when my net connection went down on my box and I was forced to use chatzilla to access irc from a windows box. when I finally got access again from my Linux box, I fired up chatzilla (just to check and see, since I had never used it on Linux) and it was identical. Every single motion, action, etc. was exactly the same across the two platforms. I guess I expect this from my browser (which is why it never struck me before with Mozilla) but other programs are supposed to be weird and unpredictable and different across platforms (even Java, at the least, has different L&F.) But with Mozilla, there is none of that. You write it once and it just works.
So, my point- go get the latest nightly builds from ftp.mozilla.org and play with them, and I think you may see the future of XP design. Or maybe not- but it is definitely worth looking into.
~luge
P.S. Oh yeah... forget Linux, Windows, and Apple. Think: "every platform in existence" and then you'll get a clue as to where Mozilla (as a XP UI development tool) is headed.
IAAL,BIANLY
People often forget that Tk is a C library, which can be accessed from other languages besides Tcl. I use Tk with C to produce stand-alone apps for Linux and Windows.
Why do you want MDI?
Actually having seperate windows is (almost)
always what you really want -- multiple
workspace windowmanagers are almost everywhere
in X, making MDI a big loss. Additionally,
the subwindows are almost certain to be managed
differently than the window manager (or native
GUI) does it, creating irritating inconsistencies.
There's a reason MDI isn't well supported. It's
mostly dead.
For every problem, there is at least one solution that is simple, neat, and wrong.
It supports XWindows/Posix, MacOS, Windows, and BeOS. When it is released, it is planned to be released as open source under the revised BSD license (or something equivalent; Andy is still evaluating licenses).
Among the features offered by this framework are:
- It is multithreaded; not many cross-platform frameworks are
- platform-independent threads and mutexes, condition variables, reader/writer locks, etc.
- thread-safe reference-counted smart pointers
- GUI with a uniquely flexible layout system
- Platform-appropriate widget renderers, so an application looks Mac-native when running on the MacOS and Windows-native when running on Windows. There is even a runtime-switchable renderer for demonstration and testing.
- Platform-indedependent TCP networking
- Database file format appropriate for large data or small (integers or multimedia movies). The databases are single files so they can be used as end-user documents.
- Wide support for debugging (assertions in the reference counted smart pointers, deadlock detection, debugging heap manager). If you leave debugging turned on most of the time during development, you'll have very few pointer bugs when you deliver builds to testers.
- platform-independent offscreen graphics buffers so you can draw into memory and blit to the screen in a portable way.
There's lots more. It's not more than a few weeks away from its 1.0 release so if you're considering a cross-platform API for a new project please consider this too.While it is about to be released as a new open source product, it is a mature platform, having been in commercial use for about five years.
A particular client-server program built on this typically has thousands of client programs running a GUI and accessing the server via the portable networking where it's using the portable database library, with the server running either on Mac or Windows depending on the user's preference, so I think it's pretty robust.
While you can break out of the cross-platform code with conditional compilation, there is only occasional need to. It is fully possible to develop an application with two machines on your desk and move back and forth between them every few minutes to compile and test on different platforms.
On thing I need to say though, before you get too excited, is that the XWindows implementation needs a bit of work, at this point mainly to implement a window menu bar in XWindows, as this is apparently not provided by the default XWindows API as it is on other platforms. Also it does not yet have support for international text, although this is planned (very likely after the 1.0 release).
-- Could you use my software consulting serv
Java, which is inherently cross-platform, boasts two very commonly used and powerful GUI toolkits, the AWT and Swing. Being built on the MVC paradigm, they're an excellent choice for OOA/D/P.
I know some people might think I'm crazy. I've been playing around alot with a couple of APIs (Xlib, GTK+, wxWindows, OpenGL/GLUT, MFC), and, well, I see all the very cool projects other people are working on, for example, I didn't know of GLUI (mentionned above), and it really sounds interesting.
:)
I also see projects about adding a new UI layer, but somehow, this worries me, there are already alot of layers for most X applications. Know, back to Xlib, how very impossible would it be to transform it into a cross-platform library? Well, not exactly cross-platform, but maybe write a wrapper for it in MacOS or Windows. It would maybe create more problems, but it would solve the "let's keep rewriting more APIs so that people will just stick with Motif".
I'm just throwing this off the top of my head, I know I'm probably wrong. But hey, if we're gonna keep talking over and over again about this (which I think isn't a bad thing to do), let's make it more spicy.
What we are now working on is a cross-platform library that will have an XML representation of an interface, and will bind to the native widget sets on whatever platform it is run on.
For example, under Linux/GNOME it will use GTK, and under Windows it will make the native Win32 calls. We feel this is almost always better than the normal method of porting a widget set across platforms, which projects such as Mozilla are doing. Advantages:
- Very fast since the native widget sets are almost always highly optimised
- High integrated since the users already have their widget sets customised to what they want
- More stable if properly done, since you dont have to deal with debugging your own widget sets (assuming there is a decent native implementation of course)
- More future proof if the native widget sets have a clean API, and if the OS is upgraded (ie windows 95->98) then you have a higher chance of your widgets surviving unscathed
The major con is that you have to deal with the lowest common denominator of common widgets, although an option we are investigating is simply implementing the extra widgets natively (eg a dll under win32), which isnt a lot of trouble.We have set a release date of around the end of august of this to be released, but the plan is for the UI code to be a completely separate library, so if anyone is interested, drop me a mail and Ill put you in touch with the head developer dude (Dominic Ludlam) for that aspect of the project.
Why not just use wxwindows since that is pretty much what it does.
Here is the URL: http://www.cfdrc.com/FOX/fox.html
Exerpt from the Forward:
One word JAVA, that is what you are looking for and you can use JDBC to talk to your databases. I think it would be a waste of time to mess around with any other platform or combination of platforms that are not truely hardware independent.
If you read the original post, he said that their app was for the Mac. I don't think they would want to leave their current customers behind.
Two fairly minor things - it's written in C++, and the rest of our suite is in C, so integration is a bit of a pain, and also since ours is a 3D application, our set has more of an emphasis on graphics handles.
:-)
... thanks for the pointer, I hadnt really looked at it seriously before, but it looks very interesting.
That, and the fact that it's kinda cool to give it a shot ourselves
Hmm, although looking at the website, it looks remarkably good
Just try taking advantage of platform-specific features from a Java program, or making a Java program work in a way that is expected by the users of native programs on each machine you might try to run it on.
Bjarne Stroustrup, inventor of C++, has much the same opinion in his statement about Java in his FAQ
.
-- Could you use my software consulting serv
I just can't pass up the opportunity to plug my very own toolkit, ftTK. ftTK was my senior thesis, a library with intended support for Xlib, Win32, and Mac OS, as well as anything else I feel like adding later. Unfortunately, ftTK is currently pretty much useless, since it doesn't yet handle user input in any sort of consistent way, and many, many other things are still non-existant. Someday....
As long as Windohs is not one of them! Damn this wheelmouse xx!!xx00.
-- Ted tsikora@powerusersbbs.com
making the i cross platforn is evil! it then makes it hard for users of all oses to use. you should learn the native apis or hire someone who knows them and follow the human interface guidelines(if there ate any for windoze).
I have to agree with this poster. I have used Tcl/Tk on cross platform projects in the past and it really does work. Lots of people can throw things like "you could try running gtk on Windows", but lets face it that is not the way to port a real applicaiton. Tcl/Tk works today, no porting needed to run your code on Linux, Windows, and the Mac. In fact, no compiling is needed as Tcl/Tk is a scripting language + a GUI. It is much easier than writing a GUI with a compiled language.
Rich GUI front end. Java. Database backend. Java (in spades -- it's very good for this). RAD. Java, Pick any of a half dozen. Platform independence. Java. Your rfp didn't mention any other requirements, why look at any other options?
Cross platform toolkits sound like a good idea. You can support more platforms with minimal effort. Good thing, right?
Well, the *goal* is a good thing. The methodology is a VERY VERY bad thing. I've only seen one toolkit with the potential to avoid the problems I'm about to describe, and it's not being used to do so.
Every GUI established conventions. These range from the trivial (CTRL-INS is copy, SHIFT-INS is paste) to the non-trivial (buttons on confirmation/warning/etc dialogs are right-aligned) to the very high-level. (actions that can be performed should be described using the present progressive tense)
Simple toolkits can only manage the simplest of these conventions (such as keystroke bindings) and even then can do so only partially... Anything where you have to explicitly state the, say, keyboard binding is beyond the control of the toolkit.
More abstract toolkits such as JFC, and Qt (probably GTK also, although I don't have any real experience with it so I can't be sure...) -- ones that use geometry managers -- can handle some of the higher-level stuff such as button alignments.
A very rich toolkit can provide even higher level stuff -- such as file open/save dialogs -- in a sufficiently generic manner.
But things such as linguistic conventions, i18n support, and broader conventions of UI layout are beyond the control of any toolkit to provide.
The end result is that an application you port winds up not feeling or acting like a native application. This throws users off and makes things harder for them. Unless they happen to be very sohpisticated users familiar with multiple GUIs of course.
The only toolkit I know of which has the *potential* for getting around this is Mozilla's XPToolkit -- and it isn't *just* the toolkit that's needed. Basically, the entire UI is written as a bunch of XML and JavaScript.
You could have platform-specific XML/JavaScript front-ends with the exact same back-end code.
But that's a hybrid solution (it has drawbacks such as having to support a fair amount of platform-specific code), requires careful design of the appliction, and is generally not feasible.
The Mozilla group certainly isn't taking advantage of it -- they just have their AOL/Netscape UI on all platforms and it is up to the user to create/find a platform-specific UI.
-JF
MrJoy.com -- Because coding is FUN!
Making a program look identical on different platforms is a popular form of user abuse. It makes life easier for the programmer, but it's guaranteed to frustrate most users. Apple's Quicktime player is a good example of this... as horrible it is on the Mac, it's even worse on Windows. You know how the Mac puts the menu bar at the top of the screen, whereas Windows attaches it to a window? Apparently the folks who ported Quicktime couldn't even handle this slight difference, so they just stick the menu at some arbitrary place on the screen, in its own little window.
I digress... The point is, interface consistency is good. But how often are people going to use the same application in more than one environment? On the other hand, how often are they going to use different applications in the same environment? That's the consistency that matters, no matter what programmers find asthetically pleasing.
MSK
PowerBuilder Unix, Windows, Macintosh...use as a front end...or the whole damn application.
Given that the app is to be a fairly rich GUI front end that talks to a database backend, I'd be interested in hearing any recommendations or advice anyone out there has to offer. Dude, fergit it. Your app needs a doofus very thin client front end. Let it talk to the the DB in the backend most indirectly. Eschew databound fields at all costs. The less that you put in the UI, the easier it is to cross platforms. Don't believe - check out stuff that promised this in the past, like Rogue Wave's Zap. 'Member LCD = Lowest Common Denomiator? that's what you're trying to reach when you make a cross platform UI. FWIW, Koder
Everything is somewhere.
http://www.fltk.org/.
here is a description from the FAQ:
What is FLTK?
FLTK (pronounced "fulltick") is a LGPL'd C++ graphical user interface toolkit for X (UNIX®), OpenGL, and WIN32 (Microsoft® Windows® NT 4.0, 95, or 98). It is currently maintained by a small group of developers across the world with a central repository in the US.
How is FLTK Licensed?
FLTK comes with complete free source code. FLTK is available under the terms of the GNU Library General Public License. Contrary to popular belief, it can be used in commercial software! (Even Bill Gates could use it.)
Well, it sounds like it suffers from a maturity problem, but surely it is a nice idea, and could probably benefit from some active use and testing.
However, like I said, the author seems to be out of touch at the moment. I'm personally interested in pursuing additional development on the base code, if the original author is no longer able to.
"It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
Whatever one does, stay away from Tk on the Mac. Even though the implimentation is getting better, it is still pretty bad and has all sorts of weird stuff in it. Trust me, don't go anywhere near it.
-- Gordon Worley
Apple's WebObjects with Java Client technology may be exactly what you are looking for. WebObjects has a cross-platform server, (Mac OS X Server, WinNT, Solaris, HP-UX -- pure Java including Linux in the next version) plus a technology called Java Client, which allows you to instantiate a thick-client Java applet or application that can run on any Java 1.1.x platform, including MacOS/MRJ, Windows (various flavors), Solaris, Linux, or anything else which has the Swing 1.1.1 package available.
To expand a bit on this, WebObjects incorporates a technology called Enterprise Objects Framework (EOF). This is an object model-based way of interacting with your database. Rows in the database become translated into Java or Objective-C objects, which you can then message. Joins between rows in different tables in the database become pointer references between different objects. As a programmer, you never have to write a single line of SQL code; all SQL interaction with the database is generated on the fly for you by EOF as you work with your object model. I can personally attest that this can be a huge win for maintainability.
The Java Client part of this comes into play by extending the reach of EOF into a Java application running on the client machine. The Java Client app can request Enterprise Objects from the WebObjects server, and work with them transparently. You can code business logic into the EO's either on the server or on the client, depending on your requirements for security and interactivity.
Just to make it clear, I am a Consulting Engineer for Apple iServices, and an employee of Apple. This technology is my livelihood, and I know it well. That being said, I have also done Web development in Microsoft Active Server Pages and Perl cgi's, and I firmly believe that the WebObjects is a vastly more capable development environment than either of the two.
Also, don't forget that Apple has just slashed the price of WebObjects from $50,000 to $699; it's now also quite affordable.
--Paul
You can find it here:
http://www.fltk.org/
It's about as cross platform as they get.
As usual, this thread has wandered pretty far from the original topic, which is a shame considering that this is a fairly important issue for a lot of people. I do actually have a little experience in this area, so here's what I know that might help:
wxWindows: If you're going to stick to a C++ cross-platform application framework, I honestly believe this is the best option. Most people don't seem to pay much attention to it, and many of those who have were burned by bugs in earlier versions, but it's really starting to come together in terms of both stability and functionality. I ported early code for a pretty complex program from MFC to wxWindows within 2 months, which impressed me considering that I wasn't familiar with either toolkit and that was my first real use of C++. I'm now doing a bit of work with wxPython, which is also going pretty well. The Mac port development tends to lag a bit behind the others, but it has been (and is being) used to deliver several commercial products, so it seems to be in usable condition; I haven't had a chance to test it myself yet. By all means, please carefully consider this option; it seems to be the most capable framework of it's type currently out there, has a respectable number of users and developers, and will get even better with more support.
CPLAT: Afraid I can't say anything as positive about this one; the MFC project I mentioned above was itself a port from CPLAT. After 2 months of development with CPLAT (ending January 2000), the developers unanimously agreed that the framework was so buggy that it would be faster to write separate versions of the program for MFC and PowerPlant. I believe there is only one developer on the project; that simply isn't enough resources to properly handle a framework of this magnitude.
Whisper: We looked at this one also, but it didn't have enough of the features we were looking for to be worth trying. It also looked to be, like CPLAT, a one-man effort.
YAAF: Another one we passed over after a brief glance. The web site didn't have much information, and I don't see any indication that it's being used much. I may have short-changed it, but I just don't see enough activity around it to indicate a really good product.
GLUI: I haven't used this or looked too closely at it yet. The lack of native widgets bothers me, though...
Carbonless Copies: Hadn't heard of this before. The web site given above hasn't been updated in a while, I haven't heard of many people using it, and it's a proprietary program; I'd be inclined to avoid it.
Regarding some of the other options people have suggested:
Java: While useful for some purposes, cross-platform GUIs arguably isn't one of them. It's relatively easy to get a Java GUI program to work cross-platform, but practically impossible to get it to work well. AWT lacks major functionality. Swing is buggy and a *massive* memory hog; don't even think about running Swing apps on computers with 32 MB of RAM, and they're not terribly happy even with 64 MB. And Java in general is lagging far behind on the Mac. Finally, it is a proprietary platform complete with all of the problems that entails. I used to really like Java, but not much progress has been made at solving some of it's critical deficiencies. I'm now hoping Python can take it's place...
Mozilla: Mozilla is useful, but it's deficiencies have been noted above; lack of native widgets, slow response time to user input, etc. I look forward to using this for some projects, but it isn't going to replace the need for a cross-platform C++ application framework.
GTK+: Doesn't work on the Mac, and won't for some time to come. Doesn't use native widgets on Windows, either (to my admittedly limited knowledge.) I agree with the wxWindows approach; use GTK+ on Windows, use the Windows API on Windows, and use the MacOS API on the Mac.
Qt: Again, doesn't work on the Mac and doesn't use native widgets on Windows.
Tk: Doesn't have native look and feel, and last I checked has some issues on MacOS. I've also gotten the impression that the widget selection isn't as rich as that of wxWindows, although I haven't looked at it closely enough to judge for myself.
On the topic of RAD tools; wxWindows does not yet have a usable RAD tool, although the wxStudio IDE is under development and there is a working dialog and panel editor. wxPython has the Boa Constructor IDE which seems to be almost in usable condition; it could also be argued that compared to using C++, even manually writing Python code practically *is* a RAD environment.
Hope this successfully addresses some of the issues, and hope it isn't buried so far down in the responses that it never gets noticed...
I think we have need for cross-platform GUI toolkits, whose also offer web-browsers and smaller devices such as portable phones as interface options in addition to just traditional Windows, Mac, ...
Currently the best way to do that is to try to separate application from UI and to build different frontends. I sure hope we're going to get such a toolkits in near future.
Of course if you're targetting to native GUI sets and HTML and such, the descriptions of the UI should be more higher-level than in most applications, maybe containing some hints which is the preferred way to get the functionality.
Bad thing is that I don't know any toolkit this sophisticated. Maybe XUL and a set of parsers for it or something is the way to go to implement this.
I'd recommend using Java and I believe there are lots of advantages:
:-).
Portability
===========
Often discussed but actually quite good. Try using two virtual machines (e.g. Sun and IBM) during development and I believe you will easily find most portability issues. In my experience those issues most of the time are only minor differences like the following: a method defined as returning an Object[] might in the case of an empty array return a null pointer or an empty array. You can work around this easily and write a portable program [if (result == null || result.length == 0)].
Support
=======
You can get virtual machines or programming tools from various sources and there is lots of documentation, literature, classes, etc. This is not available for most small cross platform toolkits.
Nice language
=============
You might argue about this, but I like Java as a language. In my experience most of the things you might imagine are possible without major hacks (at least most things I can imagine
Speed
=====
If you're not into 3D game programming or do have extreme wishes (as supporting 66MHz 486), I believe that speed isn't much of an issue any more and I have three reasons: first, todays hardware is rather fast. Today you hardly can buy a machine with less than 500MHz. Second virtual machines get faster with compilation techniques, etc.
But I believe my third point is an important one: even though modern GUIs work event driven and mostly react on events, Java gives you the oportunity to design software in a way that can use the processor cycles between user interactions (and normally there goes a lot of CPU power unused - at least outside of action gaming).
You can easily create background threads which already prepare dialogues which will be used in the future. Of course you have to change your application design to a multi-threaded architecture.
Dynamic layout
==============
One of the things I like most with Java and AWT/Swing as a GUI is the possibility of layout management. Your program can create layouts on the fly. This supports a more generic programming. Try yourself how easy it is to create a nice layout without pixel calculation and how easy you can have your dialogues generated by a program.
No, I would swat you.
Ramble on!
mfspr r3, pc / lvxl v0, 0, r3 / li r0, 16 / stvxl v0, r3, r0
Check out Project Upper/Mute, an all-around awesome compiler fra
http://gtk-mac.sourceforge.net/
Really soon. This will make Gtk cross-platform on everything that counts. :)
_Deirdre
What is the Best GUI Framework?
Cross-Platform Development Tools?
Both of those articles did not specifically address cross-platform and GUIs, but many of the responses did.
--weenie NT4 user: bite me!
--weenie NT4 user: bite me!
"Computers are nothing but a perfect illusion of order" -- Iggy Pop
See also Macbird,
http://sourceforge.net/project/?group_id=1101
http://macbird.userland.com/
Mac only, now, but Open Source (MIT license)
Actually, there is something that's pretty good. Smalltalk. VisualWorks (by ParcPlace) supports MacOS, Windows, Linux, Solaris and HP.
VisualWorks has a RAD environment, database access (an OO-Relational framework).
It's been around for years and is very mature.
The downside, of course, is that you need to know and be willing to support Smalltalk.
My Company has been considering UIML. UIML is an XML dialect, designed for specifying interfaces for multiple different platforms, machines, etc. It is then either compiled to native code, or loaded at run time and interpreted. Similar to libglade, and such, but potentially much more powerful.
Potential drawbacks are that it is still young, and may not develop enough momentum to carry on. Also at the moment there is only one Renderer, which is java based. What we have been doing is rendering the gui in Java/AWT and then using JNI to call our existing C++ code. It has been working fairly well, although I wish the renderer offered more complete support for the spec.
All in all though, I think it is a good way to go.
>~~~~~~~~~~~~~~~~
>~~~~~~~~~~~~~~~~
Pilchie
You got it - a Java applet that uses HTTP, to avoid problems with firewalls. It's easy enough, since standard Java has the URLConnection class which works fine, if you don't need HTTPS support.
Sun has an example which uses URLConnection.
Another useful tool we use is IBM's XML4J, now part of the Apache project. There are a number of useful Java, XML and other tools at the same site (alphaWorks), it's worth browsing around.
Finally, here's the XML-related Apache site.