Framework: NUI

And now for something … ok, not completely different, but largely different: a cross-platform application framework for the iPhone, OS X, Win32, and Linux. No, seriously.

We are happy to announce the release of NUI:

NUI is a C++ application framework that runs on the iPhone, MacOSX (universal), Win32 and Linux.
Its main distinctive features is its use of 3D hardware to render the UI via OpenGL, GL Es and Direct3D.

Its features include:
– Low level abstraction: string, files, paths, streams, network, timers, threads, mutexes, etc.
– Widget layout engine
– Really many widgets: text, grids, boxes, collumn views, tree views, etc.
– Integrated widget tree visual introspection/debugging
– Web-like CSS engine
– Modern rendering and compositing engine
– Animations for widgets and their attributes
– Attributes to remote control widgets
– Audio IO and Audio file loading/saving (including compressed audio files decoding)
– Stable and proven lib: many applications have been released since 2001 with NUI at their core.

Intriguing, no? In general we’re solid advocates of the OS specific front end approach, which has a way of turning out much better than attempting to share code if you use decent MVC design, but if you do have the kind of application that lends itself to an OpenGL interface, this could be an interesting option indeed.

h/t: mac-opengl!

Alex | April 11, 2009
  • Adrian April 12, 2009 at 3:36 am
    Well... after trying it (with high expectations I must say), some disappointment: 1) I couldn't get the iPhone demo to work, neither on OS 2.0, 2.1, 2.2, 2.2.1 (on an iPhone) or 3.0 beta (on an iPod Touch). 2) The initial compile time of the lib takes ages in a brand new MacBook (thankfully, normally that happens only once, and then you link your own code to it, but again) 3) The final binary of the demo is 6.6 MB (normal, since the lib is not available in the iPhone and must be statically linked), but that makes the installation process via the USB cable rather long. 4) (purely subjective one) the lib classes are all prefixed with "nui", which makes the Doxygen class browser choke. I suppose they must have started the project when the namespace support in C compilers was limited, but then again... and the code uses the hungarian notation of prefixes in variables which I don't like much in compiled languages (actually I find it useless when having a compiler), but then again, that's me. 5) The documentation in the Redmine is still in its infancy. At least they have the Doxygen API doc. But there's a lot to do still. 6) Oh, and great, after trying again to run the demo my iPhone rebooted. Anyway... Don't get me wrong; I'm 100% for an alternative GUI toolkit for the iPhone, and even better, cross platform in C (which I like a lot). But this doesn't cut it... yet. We're getting closer. I'm really looking forward for the day when JUCE will be available on the iPhone... at less than 900 KB the lib for any of its supported platforms, I'm sure the approach Jules Storer used (multiple inheritance, some templates here and there) is the way to go for the iPhone as well.
  • Sebastien Metrot April 22, 2009 at 4:57 pm
    Hi Adrian! I'm sorry to read about your disapointment with NUI. 1) has been fixed a few days ago. Sorry for that. 2) there are many, many many things in NUI. The compilation times are a chore for us too but then it also is a part of the value of the lib: it contains many useful features. 3) I'm looking for ways to improve that. I may remove some parts of the lib on the iPhone and make them optionnal for embedded platforms. 4) I had no pbm with doxygen. We DON'T use hungarian notation. The only tree prefixes we use are m for class members, p for pointers and r for reference. 5) This is being improved as we speak. There are new article in the wiki almost daily (and I'm talking real article, not just a couple of lines...). We heard you and we're working hard on it :-). 6) sorry for that. It should be ok now. The demo runs fine on all our iPhones, on all the OSes we can test. Cheers, Sébastien

Leave a Reply