Feeds

Giving some Juce to cross-platform tools

Juce in the spotlight

Combat fraud and increase customer satisfaction

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!).

High performance access to file storage

More from The Register

next story
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Ditch the sync, paddle in the Streem: Upstart offers syncless sharing
Upload, delete and carry on sharing afterwards?
prev story

Whitepapers

Designing a defence for mobile apps
In this whitepaper learn the various considerations for defending mobile applications; from the mobile application architecture itself to the myriad testing technologies needed to properly assess mobile applications risk.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.