I'm a software engineer with 10 years experience in application development, having worked with Web (Perl, PHP, JavaScript, JSP, Servlets, Flash, ASP), Enterprise (Java EE) and Mobile software (Symbian C++, Java ME, Flash Lite, Python). Currently working as Forum Nokia Technology Expert with many exciting technologies.
Check my blog for more articles and fun stuff: http://rawsocket.org
dcrocha | 14 May, 2008 22:23
Sexy UIs are all the rage today, right? FlashLite apps, WRT Widgets, WidSets, all of them have distinctive user experiences which differ greatly from the way we interact with native S40 and S60 applications. More colors, more animations, better usability, all making up a great way for developers to differentiate their applications and make them more attractive to the end user.
In Java MIDlets however, you are stuck with a very poor UI toolkit, the LCDUI, which has very few components and few options on how to alter their appearance; most of the time you're giving hints to the underlying implementation regarding the way you want the components to be displayed. Even if you do so, however, there's still a big chance your hints will be ignored and the UI will be rendered differently on each device. This can be a pain if you are developing for many different phones, with different screen sizes, input methods and form factors. Actually, to be fair, this can be a pain even if your target is a single device.
To circumvent these challenges, developers had either to developer their own UI toolkits, based on raw Canvasses, or use a 3rd. party toolkit such as J2ME Polish, which is great but requires a paid license to develop commercial applications, and this can be an unbearable cost to a small developer.
Searching the web and some mailing lists, I found this very interesting project, called LTWUI (Lightweight UI Toolkit), which is a cross-device UI toolkit created to provide developers with the possibility of developing compelling user interfaces without writing painful low-level Canvas code. It's based on Swing programming paradigm and it's key functionalities are:

LWTUI demo midlet running on E61i
It's still in Early Access release but you can go to the project page and download it so you can play around with the toolkit and run its demos on emulators and real devices. The great thing is that the library is released under the Sun Licensing Agreement (SLA) which makes it usable by commercial applications without having to pay any fee.
I ran the LWTUIDemo midlet on my Nokia E61i and N95 and it worked beautifully. It's a bit slow though, but nothing that compromises the user experience. I recorded a video of LWTUI running on my N95, so you can see what's up for use in your Java apps; I guarantee you will enjoy it.
Last but not least, the project is open source, so you can contribute to it, just go to the project page for more details on how to participate.
Here's the video, enjoy it:
[]s
Daniel
Java, S60, Series 40, eSWT |
Next |
Previous |
Comments (10) |
Trackbacks (1)
dcrocha | 15/05/2008, 13:38
Hi Njzk2, I didn't see a table of supported devices either, but as they say "cross-device" and the library is pure Java, I assume it runs on every device, which is great. I for example tested with success in N95, E61i, E61, 6131 (!) and many others, be them S40 or S60. How great is that?
WebSeed | 15/05/2008, 14:22
Thanks for this info Daniel. J2ME had been crying out for a decent UI library. Native UI components are very poor and feature-poor. Other libraries I've tried invariably suffer from fragmentation issues, or they concentrate on gimmicky eye candy rather than building a solid GUI foundation.
I actually really like the approach taken by WidSets whereby you can define the look of the UI components using CSS - just wish it was a available also as a 3rd party library for J2ME developers.
Anyway, will try LWUIT out now...
vprise | 15/05/2008, 17:38
Hi Daniel,
thanks for the great writeup and video ;-)
A few points raised in your comments article:
1. Its LWUIT = Lightweight UI Toolkit not LWTUI.
2. We don't require JSR 184, this is purely for the 3D transitions. The LWUITDemo works on MIDP 2.0 CLDC 1.1 devices and if 184 is unsupported the transition options for 3D won't appear.
3. We had success with reasonable devices from Motorola, Nokia, SE etc. Blackberry is currently broken but will get fixed in the next drop. Some Samsung, LG, WinMo etc. devices work with odd performance.
4. For some reason S60 devices are slower than they should be (even slower than S40 devices for some tasks). We are investigating the S60 performance issues and hope to resolve them soon.
5. We have a CSS like themeing engine that allows you to download a theme OTA and install it on the fly. We supply a designer oriented tool that allows your UI developers to customize the look and feel of your application.
The library will be open source this summer, please feel free to ask questions and join the mailing list in our java.net project.
Thanks.
Shai.
mapesteguia | 15/05/2008, 19:40
Hi Daniel, we have a demo project running on j2me polish and we'll try to switch it to LWUIT, however my question is more basic. Is there any way using J2ME to "customize" menues for s40 platform devices? this means to add options for instance in the address book in order to have the ability to lauch a middlet from it?. Imagine an http chat app. developed in a middlet that can be launched directly from the address book of an s40 device adding an extra option in the menu bar.
Thanks in advance. MartÃn.
matbal | 16/05/2008, 07:38
Thanks for pointing out LWUIT!
@WebSeed: Did you already try the mentioned J2ME Polish? It uses CSS for defining layouts and formats.
@mapesteguia: Unfortunately, I'm quite sure that there's no way to modify system menus using J2ME.
WebSeed | 16/05/2008, 08:18
I've just tried LWUIT. Lots of promise, but too slow on S60 to be useful at the moment. If this can be sorted out, I'll definitely look to use it in the future. As for 3D cube transitions etc. (using M3G) this seems a bit gimmicky in my opinion - would prefer to see basic functionality speeded up. Whenever I see an interesting feature my first thoughts turn to how this is going to break compatility with certain phone platforms etc.
@matbal: Yes, I've tried Polish in the past and even used it for one or two projects and yes, you're right, it uses CSS to define look and feel. However, there seemed to be some implementation problems with the platform - for instance, I could crash my phone using the example applications by rapidly going to/from certain screens. I kind of felt like too much emphasis was placed on the development of new stuff, whilst the base functionality was still slightly buggy (I've not tried it within last 6 months so might be better now).
bbeaulant | 20/05/2008, 06:05
I'm happy to see this excitement arround JavaMe UI toolkits. I recently post my own UI toolkit based on XML and CSS approach : Kuix (http://www.kalmeo.org/projects/kuix) and it could be very interesting for the community to be able to choose the toolkit according to its needs.
I took a look at the demo, and it seems to be promising, but very slow at the moment event on the wtk emulator. The part I'd prefer are the 3D transitions.
Larry101 | 02/06/2008, 11:59
Just came across this by accident and can't believe I haven't noticed it before. JavaMe has been crying out for something like this for ages. I've just spent ages writing Canvas code and my own components to get a decent looking UI and it was a painful experience. Memory usage looks pretty good on the demo (between 2 and 3 MB it seems). It seems to hand the CPU a bit of a beating though. And I especially like the fonts and transitions. Pity about the speed. Would be interested to see how it performs in a slightly less ambitious example.
tahco | 11/10/2008, 11:52
i whant theme creator for make theme n95
thanks.
supported devices ?
njzk2 | 15/05/2008, 08:44
Hi Daniel, thanks for the tip.
Do you have infos on the supported devices, i couldn't find specific informations on the site ?