Backbase is a very powerful Rich Internet Application javascript library. I’ve conducted some research on the databinding capabilities and I want to share it with those who are doing RIA development.

Databinding Overview

Backbase provides some rich widgets that can be placed in a web page, and they will be

interpreted by a javascript library called ‘Client Runtime’ and rendered into HTML and display

in browser.

Some of the widgets need to consume some external data like ListGrid which will display some

XML or JSON data in browser, the data source of which can be local or remote.

Data binding refers to the process of representing data as an object. This allows our application

to access the data in the XML from the object which is considered as the data source.

We can have a look at a diagram which is from the official documentation of Backbase.

You can see from above figure that what user sees is the user interface that provides the view information about some data in a form of a table. The Data Bindnig and User Interface reside in client (browser) side, and the Server and Database reside in server side.

The Data Source represents a generic interface to the table view. If we want to have a Data Source in the page, just place a dataSource BTL tag in the html then it will be used to make the connection to a data source. The data can be stored locally or remotely, and can be written as XML or as a JavaScript object (JSON).

When we say the word ‘locally’ that means the data source resides on client browser, and respectively ‘remotely’ means the data source resides on server side.

The ‘locally’ data will be downloaded from server whenever a data consumer consumes the data, and after that time it will be stored on the memory of client side. And also the paging and sorting will be done on client side.

The ‘remotely’ data will be downloaded and displayed on client side when a data consumer requests that data, and the requests will contain some information about which row or page the data consumer wants. And the paging and sorting of the data will be done on server side. That means the server side should have a request processor which can process the read/update/delete/create as well as paging and sorting functionalities. And the request processor can be written by server side script such as PHP, JSP, Servlet etc.

The main concern for determining to employ server-side or client-side paging or sorting, will be the size of your data set. If the data set is large and if it is not necessary or possible to display all the data on the client, server-side paging is the answer. If the amount of data is relatively small, then mostly it is advisable to use client paging.

Be aware that you cannot combine server-side and client-side paging. If your dataSource is remote, then paging should be done on the server. We will have a detailed discussing on the local and remote data and mechanism in next part.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

You may also like following posts