Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Mastering PowerBuilder

HomePrevious Lesson: Transport Object Functions
Next Lesson: Application Object Events for Distributed PB

Remote Objects & Proxy Objects

In the distributed computing model, you implement all the business logic using Custom class User Objects and place them on the server side. These objects are called Remote Objects since they are away from the client application.

Then how do you access those objects from the client application?

You can access Remote objects via Proxy objects. Proxy objects are the skeletons of Remote objects and sits on the client side. These objects contain prototype of public functions and instance variables. The function prototype includes number of arguments, each argument datatype, how that argument is passed and the function return type, etc. Protected and Private variables/function are not accessible from other objects and are not included in the prototype.

Proxy objects themselves are not editable directly, but are generated by PowerBuilder. To create proxy objects, you need to display New dialog box by selecting File > New menu option and double-click on 'Proxy Library' option located under Projects tab page. Then select the output library, and all objects for which you want to create proxy objects. If you are accessing other objects from those selected objects, PowerBuilder automatically adds them to the list under the 'Implicitly Included Objects' category.

As long as the prototype does not change, you do not need to recreate proxy objects every time you change the remote object.

In the client application scripts you need to refer to the proxy object and the proxy object in-turn routes all the function/event calls transparently to the actual user object that is sitting in the server application. Before you use the proxy object in the client application programming, you need to make an additional call, CreateInstance()—to make an association between the proxy object and the remote object. CreateInstance()creates an instance of the remote object on the server.

Before you create the executable, move all actual user objects that have proxy object set to the server application and keeps proxy objects in the client application.
HomePrevious Lesson: Transport Object Functions
Next Lesson: Application Object Events for Distributed PB

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com