How to Protype an Application with VPME

VPM Enterprise provides special “local-to-remote” functionality for prototyping client-server applications.

When you protype a client-server application with VPM Enterprise, you normally start by creating local data and local views that are (or will be) identical to the remote server data in terms of structure and properties.

There are three reasons to protype by creating local data and local views when you use VPM Enterprise:

1.   Develop and Test Locally: You can use the local data and views to develop and test the application without the need to access the remote data.

2.   Prototype Data Locally: If the remote data doesn't already exist, you can use the local data to create the remote data through the Visual FoxPro or xCase Professional Upsizing Wizards.

3.   Create Data Dictionary: You use the local data to create a data dictionary for matching remote views. When you use the VPM Data Builder to create the data dictionary for the local data, VPM will use that data dictionary for the matching remote views.

Tip: See Creating, Setting Up and Using Matching Remote Views.

In order to use the full data-related functionality of VPM with matching remote views, data dictionary information must be available for the data accessed by the matching remote views. VPM Enterprise gets its data dictionary information for matching remote views by requiring you to:

·       Create Matching Local and Remote Views: Create local and remote views that are identical in every respect with thesame fields, same parameters, etc.

·       Add Local View to Data Builder: If you didn't create the local view through the VPM Data Builder, add the local view to the Data Builder, but you do not have to add the matching remote view to the Data Builder.

·       Set Up Data Dictionary for Local View: Enter data dictionary information for the local view in the Data Builder.

Tip: Then, when a VPM Enterprise application needs data dictionary information for a remote view, it will use the data dictionary information entered into the Data Builder for the matching local view.

Basic Steps to Protype a Client-Server Application

Tip: The key idea in using VPM Enterprise to protype a client-server application is that you must create identical local views and matching remote views that must be identical in every respect. They must have the same fields, same parameters, etc.  You use the local views during development to define view and view field properties in the Data Builder. A matching remote view will use the local view's Data Builder properties.

Here are the basic steps involved in prototyping a client-server application with VPM Enterprise:

1. Create an Application Using Local Tables and Local Views

·       Create an application that uses local tables and local views. If the remote data already exists, use its structure as the prototype for the construction of your local tables, views and CursorAdapters.

Tip: See the chapter Building Data: Views to learn how to create parameterized local and matching remote views for client-server applications.

·       You only need to create local views for tables that will eventually be accessed remotely. If you have any tables that will always be accessed locally, you can create local views for them if you like but it is not required.

·       When creating the local views, keep in mind that whatever Application Object (forms, reports, etc.) uses these views, it will eventually use remote versions of these views to access remote data. Therefore, the local and remote versions of these views must be identical, having the same fields, same parameters, etc. Your goal is for the application to work the same whether you are using local views or remote views.

2. Create Remote Data

If the remote data does not already exist, use the VFP Upsizing Wizard or xCase to create the remote data structures.

3. Create Matching Remote Views

After the remote data exists, it is time to create matching remote views. See Creating, Setting Up and Using Matching Remote Views

4. Identify and Turn On Matching Remote Views

After the remote data and matching remote views have been created, your application can start using the remote data. To identify and turn on the matching remote views, see Identifying and Turning On Matching Remote Views. The next time you run your application, it will use the remote views you turned on, instead of the local views.

5. Application Installation Considerations

·       When installing the VPM Enterprise front-end application, only those local tables, local views and local databases that will actually be used locally (on the client) need to be distributed. If all data will be remote, you don’t need to distribute any of the local tables, views and databases.

·       You will always need to distribute the databases that contain the remote views and connections.

More:

Distributing the Workload