Method for managing client services across browser pages
摘要:
A service manager for managing services and objects called by browser scripts is employed. The Web browser script is not in direct communication with the service manager; instead, a connector object is mapped by the script into the scripting space. For function calls that the script would previously make to the service or object directly, the script makes a call to a connector object. Depending on the browser brand, the connector object is of a different format e.g., an ActiveX control or a Plug-In. The first time such a connector object is created and mapped into a scripting space, the service manager is initiated and all of the services and objects that are managed by the service manager are loaded. The connector object packages the function call to a service for interpretation by the service manager. A script wrapper is a small object between the scripting space and the connector object, and allows script to be written without regard to different browser brands. The service manager then forwards the service call to the corresponding service or object within its control. The service then performs according to the call and information can flow back to the script via the service manager and connector object e.g., an ActiveX control interface or Plug-In interface. Services managed by the service manager can also send information regarding events to the scripting space by way of the service manager, the connector object, and the script wrapper. An event handler can be implemented by the script author if the event is of interest to the script. As a result of the service manager managing the objects, the destruction and re-creation of objects that typically occurs when objects are mapped directly into the scripting space are avoided. All that is destroyed and re-created are the communication channels (namely the connector object and the script wrapper) between the scripting space and the services that are managed by the service manager. This allows any state within the service to persist across different Web pages, thereby improving users' browsing experience and/or increasing the efficient use of computing resources.
信息查询
0/0