com.smartgwt.client.docs
Interface ServerDataIntegration


public interface ServerDataIntegration

Server DataSource Integration

Server Data Integration means: This approach is in contrast to Client-side Data Integration in which client-side DataSources are configured to send and receive HTTP messages containing XML, JSON or other content.

Server-side Request Processing

Client-side DataBoundComponents will send DSRequests to the Smart GWT Server as background communications transparent to the user. Integrating Smart GWT's DataSource layer with your data model is a matter of handling these DSRequests and sending back DSResponses, in order to fulfill the 4 basic operations of the DataSource Protocol.

Out of the box, Smart GWT is set up to route all DSRequests through a special servlet called IDACall. Requests that go through IDACall have the following lifecycle:

This basic request handling flow can be customized at a number of points:

For more information on the DMI subsystem, see the {@link com.smartgwt.client.docs.DmiOverview DMI overview}, DMI class and the DMI example in the Feature Explorer.

Note that, as you continue to integrate your prototype with your backend, you can use a mixture of DataSources that have been fully integrated with your backend and DataSources that are running in "client-only" mode (see {@link com.smartgwt.client.docs.ClientOnlyDataSources}).

Important methods for handling DataSource requests

The basic flow of logic for handling DataSource requests is:

1. Determine operation type (Fetch, Add, Update, Remove) for a single request. Not necessary if you follow the recommendations for {@link com.smartgwt.client.docs.WriteCustomDataSource writing a custom DataSource} and provide your implementation via executeFetch(), executeAdd(), et al. dsRequest.getOperationType()
2. Get inbound values (Add, Update) and/or criteria (Fetch, Update, Remove) for this request. dsRequest.getFieldValue()
dsRequest.getValues()
dsRequest.getCriteria()
3. Business logic, validation, calls to data and service tiers... anything you can code. execute custom logic
4. Set status and data for the response. dsResponse.setStatus()
dsResponse.setData()

For more information, see the {@link com.smartgwt.client.rpc.RPCManager RPCManager documentation}, and the Custom ORM DataSource example., DataSource.getDataFormat(), DataSource.getDataProtocol(), DataSource.getRequestProperties(), DataSource.serverType, DataSource.tableName, DataSource.quoteTableName, DataSource.dbName, DataSource.configBean, DataSource.getDefaultTextMatchStyle(), DataSource.useAnsiJoins, DataSource.audit, com.smartgwt.client.data.DataSource#getServerObject, OperationBinding.getRequestProperties(), RestDataSource.getDataProtocol(), DSDataFormat, DSServerType