webservice client - Implementation of Proxy Design Pattern -



webservice client - Implementation of Proxy Design Pattern -

proxy pattern in wikipedia site : http://en.wikipedia.org/wiki/proxy_pattern understand programme in 1 computer. inquire me questions realization in 2 computers. in reality, in "real life", suppose : 1) interface subject duplicated same name, in client (computer a) , in server (computer b) => right ? 2) object of class proxy in client (computer a) 3) object of classe realsubject in server (computer b) 4) in constructor of class proxy, instance of realsubject created => right ? in point 4, if right, how possible instantiate in computer a, class located in computer b ? how do illustration if class b web service ? give thanks in advance.

1) interface subject duplicated same name, in client (computer a) , in server (computer b) => right ? yes, always.

2) object of class proxy in client (computer a) yes

3) object of class realsubject in server (computer b) yes

4) in constructor of class proxy, instance of realsubject created => right ? in constructor or other means, maybe the realsubject created , have reference it.

"the [...] proxy, can add together additional functionality object of involvement without changing object's code." wikipedia.

for calling web service, simple have web service proxy, encapsulate phone call ws.

something like:

class webserviceproxy { private webservice ws; public dowsaction() { // here create phone call actual web service: setup parameters, check security etc, whatever need . ... // phone call actual web service: ws.dowsaction() } }

so needs web service utilize local class, , not have things related phone call doing in method.

design-patterns webservice-client proxy-pattern

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -