Sunday, September 6, 2009

First LWUIT Book Review

Update: You can purchase the book directly from Packt here which includes both quantity discounts and an ebook option.

I recently got an email from Packt offering me a copy of the upcoming LWUIT-book from Biswajit for review, naturally I accepted and this is a review of that book which is the first published LWUIT book... Exciting. Notice that I reviewed the e-book version which is a PDF file and it features color photos etc, some aspects of the printed book might differ slightly (mostly in relation to production quality of the binding/font size/colors etc) so I won't discuss these aspects too much.
If you want to review a chapter of the book you can download the sample PDF from Packt by clicking here.

You can also purchase the book from Packt directly or via Amazon (by clicking the link to your left).

I'll start with the bottom line since this is probably what most of you want to know: I like the book, its far more refined than all other alternatives for learning LWUIT. Its very detailed goes into some things that even I forgot we had. Since this is the only published LWUIT book at the moment this should be a no-brainer for people using or considering LWUIT. Since the book goes into great details on many aspects I can pretty much guarantee that even if you used LWUIT for a while you would learn or re-learn something new by going through the entire book.
I give it 5 stars in Amazon to a large part for being a good, innovative first comer to the scene of LWUIT books.


The things I like about the book
  • Its well written and generally well organized, the very first "hello world" example seemed a bit out of place but its still a book you can just read through.
  • Its pretty accurate, while I did find some minor mistakes (e.g. Form doesn't expose BorderLayout by default) its generally pretty accurate for a book of so much details.
  • The book chooses a single good environment (the Sprint Wireless Toolkit) and uses it throughout the book, it doesn't try to "over complicate" and take a long detour on the unrelated subjects of IDE/Simulator choice.
  • Since Biswajit is unrelated to the authors of LWUIT he explained some things in ways that are different from our choices, this allows the book to be read in parallel to the developer guide/tutorial while still taking away some new information. E.g. Biswajit described margins quite differently and possibly in a simpler way than we chose to explain them.
  • It goes into some esoteric features of LWUIT such as building your own transition and motion classes which is something even I didn't explain.

Things that are decisions of interest for potential buyers

  • The book teaches LWUIT on MIDP without teaching MIDP or mobile development. This can be good, since it doesn't complicate the subject matter neither for newbies who might get overwhelmed or for more experienced developers who already know MIDP development.
  • No details of LWUIT's support for CDC, RIM, Android etc. are given in the book. The book would still be useful for developers of these platforms but some of the "magic" of building on such platforms is "problematic".
  • The book is organized more as a reference book with individual tutorials, that means you can often skim or skip through the book. This is very useful for some cases as a guide/reference, but don't expect the examples to map directly to your "real world" use cases.
  • The book focuses on the Resource Editor (mentions a bit the new LWUIT Designer version) but doesn't mention the Ant task code, this is a good choice since there is no need to confuse readers with 2 different ways of achieving the same result. However if you use the build XML approach don't expect information regarding that in this book.

The things I didn't quite like

  • No references to external sources, there aren't many links within the book e.g. to this blog, the forum etc.. No real historic review of the origins of LWUIT which help explain allot of the decisions.
  • I would have expected more in depth coverage of LWUIT's MVC, specifically in the List chapter which is quite detailed I would expect a diagram etc. It might seem obvious to some but this is still one of the hardest parts of LWUIT to grasp.
  • The book uses the getStyle().set* methods and discusses theming in chapter 9 (quite late), I think hardcoding the appearance clutters the code a bit. I would prefer "cleaner" samples without manual setting of styles. This would also simplify usage of the books sources for LWUIT 1.2+ (the book does reference the style changes in 1.2).
  • There wasn't enough discussion of the EDT, it was explained in some cases but as something which is so central to LWUIT and something that practically everyone experiences issues with I would expect far more details. I would have expected examples on how to understand that an issue relates to EDT violation, how to fix EDT issues. There are references to callSerially/AndWait only in the authoring custom components chapter and there is no reference to invokeAndBlock which is a remarkably useful yet hard to understand concept for new LWUIT users.

Friday, September 4, 2009

New LWUIT Introduction Screencast

Just in case you don't follow Terrence's blog (which you should), he just posted links to a set of screencasts one of which is a great LWUIT screencast available here.
This is a useful link to send out to your boss/colleagues who aren't familiar with LWUIT and want a quick and easy introduction/overview of the subject matter.
In other news I got a copy of the new LWUIT book and I will post a review shortly...

Tuesday, September 1, 2009

Great Looking Flickr Viewer Demo

A J2ME Developer just wrote to me with this really great looking demo of using LWUIT to communicate with flickr.
The demo shows off lots of the ways in which LWUIT can be easily customized, backgrounds, transitions, theme and menu are all very easy to customize.
The carousel effect is achieved using a horizontal list that has a fisheye render. Some of the great effects are the photos on the cork background that appear in a dialog when selected.

Great job and keep sending to lwuit at sun.com your creations.

Tuesday, August 25, 2009

New Stuff In LWUIT

Due to the update on Java.net and various updates going around some news got lost a bit in the past couple of days. Most importantly, we just released LWUIT 1.2.1 which is a bug fix release that addresses some of the issues in the current drop mostly in the Ant task which we have no other way of delivering (since it isn't yet open source).
Another thing that was probably lost is a release of our internal BlackBerry port of LWUIT, based on many fixes from Thorsten Schemm it is still not as mature as his LWUIT-incubator port neither in terms of usage or in terms of stability/functionality. We are working to converge the best approaches from both ports and create a single functional port in the long run.

We will now set our attention towards 1.3, we already have some features planned and we are considering some other ideas. I would personally like to remove some deprecated and no longer supported API's to reduce the size of LWUIT, I already started a bit in that direction and got approximately 15kb less.

Sunday, August 16, 2009

Renderers vs. Factories Moving Ahead

Chen & myself have had a rather engaging debate this past week about moving forward with elaborate components in LWUIT vs. the way components were implemented in Swing and LWUIT in the past.
Both LWUIT and Swing have two types of components those who use renders and those that don't. In Swing all components have a model regardless of whether they have a renderer, however in LWUIT we don't have models for most components due to size constraints (JAR size mostly).

Both of us are generally happy with the design of the current List component, its use of renderers allows us to do amazing things. However, looking at future components built on top of LWUIT we need to decide whether renderers are justified for them or should we limit this approach only for List.

E.g. the tree component from a recent post was built without a renderer but still had a model to produce the data. To determine the appearance of individual nodes a factory method pattern was used. There are several advantages for such an approach as well as several disadvantages which is part of the reason why we are soliciting feedback from you guys who have experience using LWUIT and would like to indicate one way or the other.

Thursday, August 13, 2009

Unique LWUIT Quran Application

Fahad from Guided Ways wrote to us and the mailing list with some images and screenshots of the Quran reading application displayed to the right (don't be confused by the Java FX logo, this is a LWUIT application).
The user interface and feature set of the application is truly unique and shows just how deeply LWUIT can be customized. Fahad has also signed the LWUIT SCA document and intends to contribute some of his changes to LWUIT back to the community. I have no idea if changes would make it back to LWUIT itself but even if they don't they would be published for people to improve on and use.

I have seen quite a few applications of this type and have to admit that my expectations were pretty low for the UI. However, Fahad has been very successful in creating a truly unique and immersive look for the application that should inspire people of all faiths.

Friday, August 7, 2009

MajiPlayer 2.x The Best Just Got Frigging Insane

The majimob applications are demos we often use to show off how far LWUIT can go on everyday devices, media applications such as MajiPlayer are always great demos even when they are badly done... However, in this case I think majimob didn't just outdo itself but rather outdid anything I ever saw even in dedicated media devices. Just check out the demo video to your right and try it for yourself on devices by going to http://majimob.com/mob/ with your device!

I tried it on our S40 2mb device and it worked GREAT! REALLY fast!
It crashed in 3D mode when entering the "all" song categories on that device but as the guys from majimob say, there is a limited amount of what can be done with that amount of RAM...

I also tried it on touch devices and the feel is superior to every player I ever tried except for maybe that one... But when you add up features like OTA seamless free synchronization etc. you end up with a pretty compelling piece of software.