Sunday, August 24, 2008

PSP Adventure


Yesterday one of my students, Diego, brought his PSP (PlayStation Portable) to the class, and we had the opportunity to register Diamond Powder doing its job, through a PSP KVM.

We used the Fuel Control sample application, and the following details came up:
  • The responsiveness was very good, particularly in the brands filter screen;
  • In the absence of a keyboard this KVM implementation offers a virtual keyboard;
  • The LCDUI support takes advantage of the wide screen - the same didn't happen with some Java ME games, restricted to the screen right half.
There is a video capture right below.

If you're interested in testing Diamond Powder in your mobile device leave a comment here, or send an email to diamond-powder@inbox.com

Thanks Diego !

Wednesday, August 20, 2008

Summarize, Review, with Dynamic Fields

During data collection activities the user should have the opportunity to review info that has been entered. In the image on the right we see a review or summary screen from our fuel control application that allows the user to consider fields values, before storage.

Such screen can be easily defined in Diamond Powder schemas with the Dynamic Fileds concept: a field can use data defined in another field. In our example stringitem fileds capture their values from other fields previously manipulated by application user.

Here comes the how to:

// a review page, and its fields
schema.put("page.summary", "Please, review;" +
"summDate;summOdometer;" +
"summFuelAmount;summFuelPrice;summGSName;" +
"summGSBrand;summFacilit");

// the dynamic fields
schema.put("field.summDate", "stringitem;when:;${date}");
schema.put("field.summOdometer", "stringitem;odometer:;${odometer}");
schema.put("field.summFuelAmount", "stringitem;fuel amount:;${fuelAmount}");
schema.put("field.summFuelPrice", "stringitem;fuel price:;${fuelPrice}");
schema.put("field.summGSName", "stringitem;gas station:;${gasStationName}");
schema.put("field.summGSBrand", "stringitem;brand:;${gasStationBrand}");
schema.put("field.summFacilit", "stringitem;facilities:;${facilities}");
schema.put("help.summary", "You're just one step from saving this record. Review your entries before proceeding.");

The ${field name} notation tells Dyamond Powder where to capture information from. We are using field names defined in the same schema.

In our example (add-cmd-diamond-powder) we reserved the last page to show dynamic fields, but this is not a rule. You could mix in the same page input fields and dynamic fields.

Thursday, August 14, 2008

Add Commands

Inside a data collector flow you can browse forward and backwards through pages.
What if the user needs to access another Midlet screen in the middle of data input ?
What if the user decides to abort the data input ?

Diamond Powder provides the possibility to add commands at will to a collector, because a collector is a Form. The only issue you must keep in mind is that you can have just one OK button and just one BACK button. Besides that, you are able to add how many SCREEN, CANCEL, EXIT commands you want, and wire them with other components inside your Midlet.



The add-cmd-diammond-powder example introduces a CANCEL command in the collector. From a command you can perform any navigation logic. In our example we'll see a alert screen preventing user from loss of data, and thus the possibility to go back to the current collector.

There is no surprise in source code:

collector = new Collector(getDisplay(), getSchema(), "basicRecord");
collector.setTitle("collector");
collector.addCommand(getOkCommand1());
collector.addCommand(getBackCommand());
collector.addCommand(getCancelCommand());
collector.setCommandListener(this);

Wednesday, August 6, 2008

Diamond Powder Talk in São Paulo

In english:
On August 11th, at 7:00pm, we'll introduce the Diamond Powder project at Globalcode auditorium in São Paulo.

The following topics will be covered:

* Java ME basic concepts
* Rising productivity in Java ME with Diamond Powder
* Collaborating with Diamond Powder project
* DiamondPowder & SuperCRUD (Software Template Community)

If you're interested on collaborating with Diamond Powder project and are not able to show up, send an email, introducing yourself to diamond-powder@inbox.com.

The same in portuguese:
No dia 11 de agosto às 19h apresentaremos o projeto Diamond Powder no auditório da Globalcode em São Paulo, onde os seguintes assuntos serão abordados:

* Conceitos básicos de Java ME: para quem quer começar a desenvolver para dispositivos móveis
* Aumentando a produtividade em Java ME: para quem quer utilizar o framework Diamond Powder em projetos.
* Participando do projeto Diamond Powder: para quem quer incrementar o currículo colaborando com um projeto Open Source.
* Diamond Powder e SuperCRUD: do Mobile ao Enterprise num piscar de olhos

Caso tenha interesse e não possa comparecer, apresente-se enviando um mini-currículo para: diamond-powder@inbox.com