Generating the proxy objects – PB Docs 70

Generating the proxy objects

About proxy objects

Each remote object contained in a server application has a
corresponding class definition in the client application. The class
definition on the client can contain the complete implementation
of the remote object, or simply a proxy object that provides a representation
of the remote object’s interface. In either case, you can
access remote objects on a distributed server. However, only the proxy
object is required on the client for distributed processing.

note.gif Local driver not supported with 6.0 and 7.0 proxy objects You cannot use the Local driver to test a distributed application
if you have 6.0 or 7.0 proxy objects in the library list for the

Advantages of using proxy objects

By deploying proxy objects in your client applications, you
can reduce the size of your clients and also add a layer of security
by preventing the clients from accessing sensitive business algorithms.
However, if you want to have the option to instantiate the objects
locally, you need to have the complete implementation for the objects
available in the client application.

What you need to do

To generate one or more proxy objects for a client application,
you need to create a new project in the Project painter. The new
project lists the objects that will be included and specifies the
name of the output library that will contain the generated proxy

proc.gif To generate one or more proxy objects:

  1. Select File>New from the menu

  2. On the Project tab, select the Proxy Library icon.

    The Project painter workspace displays.

  3. Select Edit>Select Objects from the menu

    The Select Objects dialog box displays.

  4. In the Libraries box, select one or more PBL files
    that contain user objects for which you want to create proxy objects.

  5. In the Objects box, select the user objects for
    which you want to generate proxies and click OK.

    If you select an object that participates in an object hierarchy, PowerBuilder
    will automatically generate proxies for the selected object’s ancestors.

  6. Select Edit>Properties from the menu

    The Properties for Proxy Library dialog box displays.

  7. Enter a filename for the target PBL in the Output
    Library box.

  8. Select Clear Output Library for Each Build if
    you do not want PowerBuilder to append the generated proxy objects
    to an existing library (if one with the same name already exists).
    If you select this checkbox, PowerBuilder will overwrite the existing
    PBL with a new one that contains the generated proxy objects.

  9. If you do not want PowerBuilder to prompt you
    before overwriting the output file when a library with the same
    name already exists, deselect Prompt For Overwrite.

  10. Click OK.

  11. When you have finished defining the project object,
    save the object by selecting File>Save from the menu bar.

  12. Click the Build button in the Project PainterBar.

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x