Feeds

Giving some Juce to cross-platform tools

Juce in the spotlight

Intelligent flash storage arrays

Hands on Last month I looked at Qt, the popular C++ cross-platform framework which underpins the KDE desktop, and a whole lot more. This time, I'm continuing that same theme by taking a look at another cross-platform C++ library called Juce (OK, no jokes about Apple Juce!)

Chances are pretty good that you've never actually heard of Juce: I certainly hadn't until Reg Developer reader Iain McGuire pointed me in the right direction. I downloaded the demo and was immediately smitten. Nice one, Iain!

Juce overview

Perhaps the most remarkable thing about Juce is that it's the work of one talented developer – Julian Storer. According to Wikipedia (see entry for "Tracktion"), the Juce C++ class library arose out of the work that Julian put into the development of his popular digital audio production suite. More on Tracktion here, but you can download Juce from the official website.

The library supports development on Mac OS X, Windows and Linux. It's currently at version 1.4, and you can freely download the complete source code tree from the website (around 2.5 MBytes). Don't bother looking for platform-specific source code downloads because there aren't any; all three platforms are integrated within the same source tree – more on that later. If you're not ready to start delving around in Julian's source code, and would rather get a feel for what Juce can do, there are pre-built binaries (for Mac and Windows) of a very impressive demo program which shows some of the library's main capabilities.

If you download the Win32 version of the demo, you might be surprised to discover that the EXE file tips the scales at a sylphlike 751 KBytes. That's quite impressive for a stand-alone program developed with a cross-platform library and no DLL dependencies. However, inquisitive bugger that I am, a quick sniff with HexEdit instantly revealed that Mr Storer had used the UPX compressor to scrunch the demo executable. Even so, at around 1.7 Mbytes (the uncompressed size), I'm still impressed. Static builds with other cross-platform libraries are often very much larger.

Screenshot demonstrating transparency, image rotation, and the ability to work with SVG graphics.

The most negative thing I can say about the demo is that I didn't like the washed-out pastel colour scheme, although I don't like XP's "Fisher-Price" look either; I'm hard to please where user interface aesthetics are concerned (check out Figure 1 and notice the subtle shadowing under the disk drive). What you will find, if you've got Windows and a Mac, is that the program looks identical when running on both platforms. The reason for this – as discerning readers will suspect by scrutinising the screenshots – is that Juce doesn't use the native widgets provided by each platform (a widget, in the context of cross-platform development, is a user interface control). Instead, the implementation of each widget is built right into the Juce library.

As already stated, this has the advantage of giving you identical results on each platform, and the further advantage that you're not at the mercy of whatever versioning vagaries Microsoft might plonk into the next iteration of (e.g.) the Common Controls DLL. On the negative side, the punters might not like the Juce equivalent of the control's they're familiar with. Then again, because full source code is included, you're free to tinker with the look and feel as much as you want. Most of the Juce widgets adopt a somewhat OS X-like look and feel - most notably push buttons.

You'll see that even the window frame is rendered by the Juce library. If this is a bit too outré for your target audience, there's an option to render using the native windowing system.

Note: Well actually, there's a small problem here: if you run the Juce demo under OS X, bring up a drop-down menu and then click on and drag away the native window frame, the menu will remain onscreen and get "left behind" rather than collapsing as it should. This bug doesn't affect the Win32 port (The Juce website proclaims that the number of known bugs is always zero because as soon as Julian hears about a bug, he fixes it immediately. Go to it, Julian!).

Providing a secure and efficient Helpdesk

More from The Register

next story
Preview redux: Microsoft ships new Windows 10 build with 7,000 changes
Latest bleeding-edge bits borrow Action Center from Windows Phone
Google opens Inbox – email for people too thick to handle email
Print this article out and give it to someone tech-y if you get stuck
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
Entity Framework goes 'code first' as Microsoft pulls visual design tool
Visual Studio database diagramming's out the window
Google+ goes TITSUP. But WHO knew? How long? Anyone ... Hello ...
Wobbly Gmail, Contacts, Calendar on the other hand ...
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
prev story

Whitepapers

Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
New hybrid storage solutions
Tackling data challenges through emerging hybrid storage solutions that enable optimum database performance whilst managing costs and increasingly large data stores.