Thursday Oct 16, 2008

Visual Databinding in Netbeans Mobility 6.5

We just have reached code freeze in Netbeans organization, it means no more P3's bug fixes for this release. I think it's a good time to present next new feature of Netbeans Mobility 6.5 which is Visual Databinding. You should be familiar with idea of data binding but just to refresh your memory... - idea behind this technology is to "bind" any kind of data source (Data Base, Web Service, etc ...) to the data receiver which is very often UI elements. Basically it helps to create program which (for example) can automatically update state of UI based on changes in data source or/and vice versa. The Visual Designer in version 6.5 has ability to bind MIDP UI components with data source of any kind, it can be Web Service like in the example listed below or something else like UI component. It's very flexible. Screen below shows places in Visual Designer where you can find tools to help you create application using data binding technology.

Major part of this feature is Mobility Databinding library as well new set of custom components: DataSet and IndexableDataSet (components in the Moblity Palette marks with red square in the screen shot). Those components are providing layer of communication between source and data receiver (MIDP UI). Most of the parameters are editable using Visual Designer through new Property Editors and Screen Designer.

Binding is very easy, using property editor user chooses one of the available DataSets and provides basic information like Expression Language query. You can find more information about this feature in the specification also there is tutorial coming up soon. Another thing is to implement logic in the source code of DataSet or IndexableDataSet component. Particular implementation depends of the type of data source. One of the DataSets components in the Visual Designer has logic already implemented, name of this component is ComponentsDataSet. This component provides easy to implement communication between MIDP UI widgets and database of contacts on mobile device. If you want to try Visual Databinding use latest build of Netbeans 6.5 (with Mobility included).

Example below shows weather status based on the City and Country. Both examples utilize public Weather Web Service. In this application DataSet component suites as a layer between Web Service client and MIDP UI. Web Service Client has been created using Mobility End to End technology. Author of those two examples is Andrei Chistiakov. Below you can see screenshot of this application running on Nokia S40.

Currently Visual Designer doesn't support Visual Databinding for SVG Rich Components but I'm showing this as a example of the Rich SVG Components in action. In future releases we also add support for Visual Databinding to the Rich SVG Components.

Examples:

Download Global Weather with MIDP UI and Visual Databinding

Download Global Weather with Rich SVG Components (no databinding)

About

Stuff about Java ME, NetBeans Mobility, mobile devices and more...

Karol Harezlak is the Netbeans Visual Mobile Designer lead at Sun Microsystems

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today