wxEmbedded Beta Released
An anonymous reader writes "Robert Roebling has announced the first beta release of wxEmbedded, a new open source graphical windowing environment for small devices. Here is a brief overview from Roebling about wxEmbedded, along with some background on the wxWindows project from which wxEmbedded is derived."
WxWindows is one of the most magnificent development projects in existence and the fact we hear so little about it is shame upon the technological press in general and the open source information resources in particular.
WxWindows has for years fullfilled the Java promisse in C++: write once, compile and run anywhere, natively. Their approach to the cross-platform problem was always far superior than the Java approach. And I really don't care about recompilation, machines compile code, not me.
Their main public relations problem seems to be the use of an adult language, C++. Yes there are pointers (scaring, isn't it, a type that holds a memory address), there are templates (mostly scary, trully generic containers) and your program interface looks like everything else in the operating system it is running (ludicrous).
And yet, more than nine years later those guys are still there giving the community such a tool. Trully amazing.
But their goal is to make it work on WinCE and Linux, so I guess that's great news. That will alow us to develop commercial applications with zero licensing cost for these PDAs
The Raven
The Raven
You can't live with them, you can't live without them.
Garbage collection is nothing more, nothing less than pointer manipulation. Even in Java. The fact that you can't see or manipulate them is just an insult to the intelligence of the average programmer (or, if I was to flame, a concession to the intelligence of that same average programmer - that guy they keep in a vault in the Paris Museum basement along with the meter bar and the kilo ball), not a indication they are not there.
You pointed to another important feature I forgot to mention. WxWindows is light years ahead of Win32 or GTK (I have no experience with the Mac port) in terms of code organisation, general API sanity and naming conventions.
After I learned the structure (and here their documentation shines) of the library, I prefer to use Wx instead of native APIs everytime.
You consider an adult language one that (potentially) requires that programmers be mindful of things. This may be an "adult" language, but overall I'm more motivated to work within a language like C# or Java, for the same reason I'd work in C++ or Scheme over C (or C over assembler): higher level constructs take away my micromanaging of bits of the machine, allowing me to focus more on the structure of the problem I'm modelling and working with.
Yes, it's great that pointers put hair on your chest, and that C++ is where Real Men get their rocks off, but don't write off other languages for this reason. It's like writting off French or Japanese because, "English is good enough."
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
I started using wxWindows about 10 months ago (January 2002). I was in the planning stages of a complete rewrite of an application (shameless plug) and had carte blanche to decide what toolkit and development environment I would be using.
After doing some fairly extensive research I came across wxWindows. I'll admit, I don't find the website too easy to navigate-- it seems too different from most other free software websites, but there is a lot of information there. One of the interesting things is that the documentation is GREAT. Normally you don't see detailed documentation like this in any open source or free software project, and many times not even in commercial products (think MFC). With that said, I'll admit that for some complex tasks the documentation is lacking. However, at that point you look at the code which is just absolutely beautiful.
You can tell that wxWindows was created by people who thoroughly understand OO programming, and more importantly understand the specifics of programming OO in C++. C++ is /not/ a toy language. Unlike some other toolkits or frameworks which attempt to hide "complexities" from the programmer, wxWindows exposes nearly everything. When using wxWindows you /WILL/ need to deal with pointers. However, every effort has been made to free memory when and how is appropriate. Some classes really are just reference counters (wxBitmap, wxImage, GDI Objects, etc.). Other classes have their own memory allocation/deallocation scheme. When dealing with window creation you simply use the new operator to allocate the window. Part of a window's constructor is a pointer to its parent. Parents will delete children.
There is no overall "garbage collector". Everything is done just as any reasonable programmer would expect it, and these behaviors are detailed in the documentation. wxWindows is the only toolkit I have seen designed with C++ in mind. Sure.. there is QT, but the Moc is a hack (/me ducks), and QT programming just doesn't hit the right nerve in my mind.
For those looking to get a quick start with wxWindows I'd say to first browse the documentation (especially the topic overviews) and get a feel for how wxWindows deals with things in general. Then grab wxWindows and do the standard configure business (might I suggest you install to its own prefix like /opt/wx). The main makefile does not build the samples. To build a sample, go into the build directory and run make from there. The samples are excellent. For one thing you will get a feel for how the general programming is done with wxWindows. You will be able to take a sample and use it as a starting point for your application. The samples are also great when you are having a problem that shows up in your app and you need a simple testcase. Just add some code to the appropriate sample and see what the behavior is.
I could go on and on, but the bottom line is that if you have not tried wxWindows, you need to. Don't be put off by C++. Just because you have tried foobar C++ toolkit and thought C++ sucked does not mean wxWindows is the same way. I would even say it's not too much of a stretch that even a Visual Basic programmer could get accustomed to it so long as they actually had at least some grasp of C++ in general. This is especially true for those people who use VB simply because it is "faster and easier than C++" when what they really mean is that it's faster and easier than MFC (which it is). Once you see wxWindows and get to know what a real toolkit should be, you'll not want to use anything else.
I was not writing other languages off. As a matter of fact (and market) I am today a Java programmer.
I should perhaps apologise for being too vague. I consider Java a good language, too. I also consider Python a good language (and Zope is a pretty nice tool). I also like some other languages I will not mention to protect myself from a language flame war (both for quoting or failing to quote something).
My point was more addressed to all the criticism (some of it deserved, most just a nod from language developers and the tech press to mental lazyness) C++ received for being too complex, too big, too low level etc, during the recent years. Perhaps I am old fashioned but I still belive in Knuth's harsh words about the supposed difficulties of learning his book's fictional Assembler - I just don't think someone who calls him/herself a programmer have any excuse for being unable to learn and use any language (OK, except Forth - you have to be a Budhist Martian to like Forth).
Hiding pointers behind a language supported interface (class, generic, etc.) is a Very Good Thing (tm).
Here is where we differ a little. I would say "Having the option of hiding pointers behind a language supported interface (class, generic, etc.) is a Very Good Thing (tm).". My main concern here is not that the pointers are abstracted for the sake of development sanity, my concern is that I can't de-abstract them when I want to and assume full intellectual responsability for my acts.
By the way, my comment about garbage collection and pointer manipulation was not meant to be exclusive. Obviously I know there are tenths of other operations in a functional collector. I was just stressing the point in question, namely pointers.
TrollTech has Win32 and MacOSX versions of Qt (natch), but both are available only under proprietary, GPL-incompatible-if-there's-no-exception-clause licenses. The licensing of wxWindows's various incarnations seems to be a significant plus in its favor, at least for GPL'ed cross-platform GUI apps.
iSKUNK!
A 200MHz ARM with 64Mbytes of RAM is many times as powerful as the workstations that X11 was originally developed for. In fact, even a few years ago, a 200MHz RISC machine was considered a high-end machine. Arguments that such a handheld is so limited that it needs a special window system are just laughable. The small screen on these devices actually means that any window system needs even fewer resources than a desktop.
Furthermore, the self-proclaimed "embedded" windowing systems for handhelds often do worse than X11. X servers running on the Agenda or Zaurus take 1.3Mbytes of memory. This is a fraction of what, for example, Qt/Embedded takes. Furthermore, applications written for X11 using an embedded or lightweight X11 toolkit also tend to be a fraction of the size of those written in Qt/Embedded. Drawing speed of the X11-based solution is usually faster as well in my experience.
There are certainly release-quality X servers available for Linux handhelds--why shouldn't they be? They are simply using the mature dumb frame buffer code from the desktop version, requiring almost no changes. On my Zaurus, on the other hand, I have already experienced GUI deadlocks a number of times that weren't fixable without rebooting the handheld--not really surprising for a toolkit that is so tightly integrated with the display system and also is comparatively new.
There is no technical reason whatsoever to develop new "embedded" window systems for today's PDAs.
Comment removed based on user account deletion
This might not make sense, but I have been thinking about a windowing environment as a far larger concept. I thought the environment consist of all of these for example: X-Windows, Window Manager, and a GUI Toolkit (like wxembedded) --> wxembedded is NOT a windowing environment according to this description. I am asking this because it is about time for me to finally start using correct terms, if this is wrong :)
You make some good points about Qt's adoption - definitely helps to get a major open source project to adopt a GUI toolkit. However, Qt is not viable for non-open-source developers or sysadmins who want to write cross-platform GUI-based scripts in Perl/Python. Its per-seat development cost is aimed at commercial C++ applications, so wxPerl/WxPython are ideal.
GNOME/Gtk are nice but getting them working on a Windows box is painful - wxWindows provides a simpler approach. To use wxPerl, you just install the Wx module from CPAN, read the tutorials, and off you go - no license fees.
Also, there's a GUI design tool for Wx, called wxDesigner - it's commercial but the cost is very reasonable, under $300 for 10 licenses, and it supports C++, Perl and Python.
By the way, am I the only person who sees Perl and Python as more similar than different? Of course, each one has advantages, but perhaps it is the similarity that drives the language wars...
More screenshots of wxEmbedded (and specifically wxDesigner) are available here:
http://www.roebling.de/sshots.html
There are images from it running under MacOS X, MacOS 9 as well as X11.
To make a pun demonstrates the highest understanding of a language
wxWindows is pretty heavy weight compared to Qt, FLTK, FOX, etc., and the other toolkits (with the exception of Qt) are totally open-sourced with "designer" apps.
We shied away from wxWindows several years ago because of binary compatibility issues (in the vendor GUI libraries, not in WxWindows) and because of the bloat. I'd be interested to see how wxEmbedded measures up...
I print, therefore I am.
Here's what I can think of off the top of my head. It's probably not complete, so I hope other people feel free to add to this list:
:)).
One of the fellows I work with calls properties "syntactic sugar," but when dealing with classes, using properties in C# and managed C++ is great. If you've used Java at all, you know how much you use get/set functions. These make the notation for the common case (one arg set, void get) that much easier.
Similarly, C# allows indexing into data structures based on a string (similar a PHP feature) where you have data = classinsntance["stringIndex"]).
C# and Java all have a complete object hierachy. This guarantees certain methods are always available to every object, such as toString() and other basics which aid debugging.
Java has (IMO) slightly better exception handling support than the other languages because you must either catch a specific possible exception, or declare it to be thrown. This allows compile time checking of your exception handling path, something not possible in C++ and C# (MS decided that it didn't scale well for large projects, nuts to that
And, of course, C# and Java are garbage collected (this is probably the most important one). It lets you get more out of OO when you don't try to think about the machine resources. You need a connection somewhere? Instantiate a connection class. Don't need it? Let it go out of scope. Need another one? Instantiate it. No create a class instance, then reuse it over and over again. It makes the design of the class simpler because you can throw any "I can't connect" exceptions in one place (the constructor), and otherwise assume you have a valid connection elsewehere (this assumes, that your network connections don't go away, but I've simplified this a bit to get the design point across).
And, while I know that C++ has now a standard string class, Java and C# have both had one from the beginning, discouraging programmers from starting with character arrays and wrapping them in their own (incorrect) string class.
The richness of the Java and C# object classes (not the specific Sun or Microsoft name spaces, the general ones) are enough to make any programmer happy.
Java also will optionally enforce IEEE 754 on double/float operations, allowing you to have complex math code which works the same regardless of the quirks of the FPU on the local CPU.
---
Thanks for reading this far.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
I don't think I'll see Java for PIC work any time soon :)
I'm all for using the best tool for the job, but in most cases a higher level language is a better tool because I reduce the amount of time I (the programmer) must work with some aspects of the code which the machine can do for me.
I'm not sure about the "no mission critical" critical, though.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
I was discussing the way the original author seemed to be suffering from a case of, "C++ is the very best ever, and only Real Programmers use it -- and they use in exclusively." He acknowledge it did sound a bit like that, and rather gracefully apologized (do read the thread, it is a good one).
As for being mindful of the metal, I agree more with that if we are talking about a true embedded environment (or even just a lean environment, like a PalmIII). The iPaqs they have out ship with 3 times the horse power of my original DX4-100 486. I see no reason why those machines can't take advantage of J2ME and other great portable environments (there is even J2ME for PalmOS, but it's fairly slow).
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
I remember Forth also, I first saw it as a very fast compiler for the Apple II. Besides Reverse Polish Notation, one also learns that a stack can work wonders beyond measure. But I wouldn't recomend it for everyone, the paradigm shift from "normal" languages is fairly great. Scarily so.
I don't do much (any) C++, and it shows :) We do use Boost where I currently am doing my 9-5, but my interaction with it has been minimal (set it up so I can build the C++ sections of the project on my workstation).
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
Here's a question. I'm a fairly competent Qt programmer, but I've never used WxWindows. What are the advantages and disadvantages of WxWindows over Qt? I'm not interested so much in cross-platform issues as I am being able to write good code that is easy to maintain.
A Government Is a Body of People, Usually Notably Ungoverned