Method and apparatus of using a single computer program source code base to provide a program that is operable in either a client-server mode or a standalone mode

   
   

A method and apparatus for using a single computer program code base to provide a program that is operable in either a client-server mode or a standalone mode are provided. In one embodiment, a client logic element has one or more proxy objects, each of which implement an interface that is neutral with respect to the client-server mode and the standalone mode. A server logic element has one or more service objects. Each of the service objects implements the interface. The interface implementations are not bound to any code that is specific to the client-server version or the standalone version. In the stand-alone version, the client side logic invokes the server side logic directly through the interfaces, as implemented by the service objects. In the client-server version, the client side logic invokes the server side logic through the same set of Java interfaces. However, the interfaces are implemented by the proxy objects, which internally implement a transport mechanism to forward the method invocation and parameters to the server side through a servlet API. In response, a servlet identifies the corresponding service object and invokes the corresponding method with serialized parameters. When the method returns, the resulting object, which can be a new proxy object, is serialized back into the proxy object for the invocation and from there the result is returned to the client side logic. Using this mechanism, the client side logic only interacts with the Java interfaces, without the need to know whether it is dealing with service objects or proxy objects. Accordingly, the client side logic is shielded from any version-specific code. In addition, the same runtime environment can support both the client-server version and the standalone version.

Un método y un aparato para usar un solo programa de computadora cifran la base para proporcionar un programa que sea operable en o un modo del servidor de cliente o se proporciona un modo independiente. En una encarnación, un elemento de la lógica del cliente tiene unos o más objetos del poder, cada uno que de instrumento un interfaz que es neutral con respecto al modo del servidor de cliente y al modo independiente. Un elemento de la lógica del servidor tiene unos o más objetos del servicio. Cada uno del servicio se opone los instrumentos el interfaz. Las puestas en práctica del interfaz no están limitadas a ningún código que sea específico a la versión del servidor de cliente o a la versión independiente. En la versión independiente, la lógica del lado del cliente invoca la lógica del lado del servidor directamente a través de los interfaces, como puesto en ejecucio'n por el servicio se opone. En la versión del servidor de cliente, la lógica del lado del cliente invoca la lógica del lado del servidor a través del mismo sistema de los interfaces de Java. Sin embargo, los interfaces son puestos en ejecucio'n por los objetos del poder, que internamente ponen un mecanismo del transporte en ejecucio'n para remitir la invocación del método y los parámetros al servidor echan a un lado con un servlet API. En respuesta, un servlet identifica el objeto correspondiente del servicio e invoca el método correspondiente con parámetros serializados. Cuando el método vuelve, el objeto que resulta, que puede ser un nuevo objeto del poder, se serializa nuevamente dentro del objeto del poder para la invocación y allí del resultado se vuelve a la lógica del lado del cliente. Usando este mecanismo, la lógica del lado del cliente obra recíprocamente solamente con los interfaces de Java, sin la necesidad de saber si se está ocupando de los objetos del servicio o de los objetos del poder. Por consiguiente, la lógica del lado del cliente se blinda de cualquier código versio'n-especi'fico. Además, el mismo ambiente runtime puede apoyar la versión del servidor de cliente y la versión independiente.

 
Web www.patentalert.com

< Program control apparatus and method and apparatus for memory allocation ensuring execution of a process exclusively and ensuring real time operation, without locking computer system

< System and method for distribution and delivery of media context and other data to aircraft passengers

> Software system and methods for testing transactional servers

> Method and apparatus for decomposing and verifying configurable hardware

~ 00121