Archive for March, 2012

GenericListCellRenderer – Revisiting the Twitter “Infinite List” demo

It appears the previous posting was pretty popular, so I thought I’d continue on the subject a little further.  For this posting, I’ll revisit the Twitter client introduced in that post, and make it just a little prettier. I’ll be demonstrating how to utilize the GenericListCellRenderer to display the tweets, and how to display the Twitter avatars on our infinite list using Codename One’s ImageDownloadService.
Read more…

6 comments - What do you think?  Posted by Eric Coolman - March 29, 2012 at 6:43 am

Categories: Development, Tips & Tricks   Tags: , , , , , , , , , , , , ,

Lazy Loading – Implementing an “Infinite List” in Codename One

In one of my projects I’m working on, I have a list that currently contains up to 12000 items (and growing).  Of course, I’m not going to attempt to load the entire list in my initializer.  Instead, I decided to go with a lazy loading technique that you might have noticed in the Twitter and Facebook apps on your mobile device, commonly referred to as the ‘Infinite List’.  The way it works is, the app loads a small batch of statuses on initialization, this way there is no noticeable delay on startup.  Then if the user scrolls down to the bottom of the list, another batch of statuses is loaded and appended to the list on the fly. Read more…

1 comment - What do you think?  Posted by Eric Coolman - March 28, 2012 at 9:04 am

Categories: Development, Tips & Tricks   Tags: , , , , , , , , , , , , ,

Expression Language for Consuming JSON and XML Webservices from Mobile

The latest release of Codename One (Version 0.1 build 20120325 as of this writing) will include a new feature that will increase productivity when consuming JSON and XML webservices from mobile, or working with structured data in general.  The code discussed in this blog entry can be found in the API documentation under the new package:

com.codename1.processing

In short, the new com.codename1.processing.Result class provides a subset of XPath, but it is not limited to just XML documents, it can also work with JSON documents, and even with raw hashtables. Read more…

4 comments - What do you think?  Posted by Eric Coolman - March 25, 2012 at 9:09 am

Categories: Development, Tips & Tricks   Tags: , , , , , , , , , , , ,

Easily Debug Webservice Calls from Mobile Device, Eclipse, Netbeans

I just want to share a tip that will make life much easier when dealing with webservices. Often, when developers need to debug webservice calls, they will start by blindly making API calls to inspect the headers and payload to determine what they are receiving from the webservice. There is a much easier way that does not involve modifying your code at all, nor is there a great deal of setup, it takes about 2 minutes total.

UPDATE @ 2012-04-12 – The Codename One guys have been busy!  They introduced some new debugging tools built into the Simulator, thanks!

Read more…

3 comments - What do you think?  Posted by Eric Coolman - March 21, 2012 at 1:24 pm

Categories: Development, Tips & Tricks   Tags: , , , , , , , , , , , , , , ,

Codename One, a Mobile Development Toolchain on Steroids

There’s a new suite of open source tools currently just entering public beta as of this writing, that is going to offer a dramatic increase in productivity in mobile development like never seen before.   We’ve heard the terms ‘write once, run everywhere’ and ‘rapid application development‘ thrown around for years since Java first introduced it’s JVM somewhere around 15 years ago, but in mobile computing, I’ve never witnessed the kind of rapid coding that I’ve experienced with Codename One over the last week of beta testing.  It’s seriously powerful. Read more…

Be the first to comment - What do you think?  Posted by Eric Coolman - March 10, 2012 at 1:17 pm

Categories: Development, Product Reviews   Tags: , , , , , , , , , , , , , ,

© 2010 Gadget Reviews from Coolman.ca

Switch to our mobile site