Kbase 18249: What are SmartDataObject Proxy (_cl) Files?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/26/2011 |
|
Status: Unverified
GOAL:
What are SmartDataObject Proxy (_cl) Files?
GOAL:
Client side SmartDataObject file explained
FACT(s) (Environment):
Windows 32 Intel
Progress 9.x
OpenEdge 10.x
Windows NT 32 Intel/Windows 2000
FIX:
SmartDataObjects theoretically have three parts:
- Frontend portion:
Communicates with visualizations (SmartDataViewers and SmartDataBrowsers) and does not need to be connected to a database.
- Backend portion:
Communicates with the database to perform updates and must be connected to a database.
- Communication portion:
Handles communication between the frontend and backend portions of the SmartDataObject.
SmartDataObject proxies are a version of a SmartDataObject that does not contain code to access the database (backend portion). When a SmartDataObject is created for the Customer table for example, the following files are generated by the AppBuilder (regardless of the remote/local configuration for the partition this SmartDataObject runs on):
dcust.w (Full SmartDataObject)
dcust.i (RowObject definitions)
dcust.r
dcust_cl.w (Client proxy)
dcust_cl.r
dcust_cl.w contains the following code:
/* dcust_cl.w - non-db proxy for dcust.w */
&GLOBAL-DEFINE DB-REQUIRED FALSE
{dcust.w}
The DB-REQUIRED parameter is used to determine whether the code that accesses the database (query definitions), and any code that you choose to make DB-Required from the Section Editor, is to be compiled into a version of the SmartDataObject. Use of DB-REQUIRED makes the client proxy version of the SmartDataObject streamlined because it does not include code that accesses the database.
In the above example, dcust_cl.w is the same file as dcust.w without the backend portion that communicates with the database.
A SmartDataObject can run in three three modes:
- Local:
The full SmartDataObject will run locally connected to a Database (dcust.w).
- Remote with proxy on client:
The proxy SmartDataObject (dcust_cl.w) runs on the client and the full SmartDataObject (dcust.w) runs remotely on an AppServer. This happens if the partition is configured to run remotely and the client is not connected to the database at runtime.
- Remote with full SDO on client:
The full SmartDataObject runs on both the client and AppServer remotely. This happens if the partition is configured to run remotely and the client is connected to the database at runtime. The decision to use the full SmartDataObject or the client proxy version is based on whether or not the proper databases are connected (independent from the decision to run remotely or locally). Because the partition is an instance property of the SDO, only after start up of the SmartDataObject (or its proxy) is it determined which partition is to be used and whether or not it is to be executed in a local or remote fashion.
Your SmartDataObject should run the same way whether you are running the proxy version or the full version, but the full version includes more code that is not executed by the client in a remote configuration.
Any test of your SmartDataObject application with the AppBuilder is always a test of the full version of the SmartDataObject on the client because in design mode, a SmartDataObject must always be connected to a database. This means that the full version, not the proxy version, is run. Before deployment, test your proxy version of the SmartDataObject from the Procedure Editor after you disconnect from the database.
If you intend to use SmartDataObjects with open clients, that is, running them on an AppServer as the business logic for a Java or ActiveX user interface, you must use the full SmartDataObject (not the client proxy _cl file) with ProxyGen to generate the open client proxy.