Purpose
- Allows for object level access contro lby acting as a pass through entity or a placeholder object.
Use when
- Access contorl for the original object is required.
- Added functionality is required when an object is accessed.
Proxy Pattern
- Proxy pattern provides a surrogate or placeholder for another object to contorl access to it.
The Roles of Helper Objects
- Request From Client to Server
- Client Side : The client calls a method on the client helper, as if the cleint helper were the actual service. Then the client helper takes care of forwarding that request to the server.
- Server Side : The service helper receives the request from the client helper, via a Socket connection, unpacks the information about the call and then invokes the real method on the real service object. - Reply From Server to Client
- Server Side : The service helper gets the return value from the service, packs it, and ships it back to the client helper.
- Client Side : The client helper unpacks the information and returns the value to the client object.
Serialization basics
- Serialization
- the process of transforming an in-memory object to a byte stream. - Deserialization
- the inverse process of reconstructiong an object from a byte stream to the same state in which the object was previously serialized. - An empty interface is called a marker interface.
'Computer Science' 카테고리의 다른 글
Prototype Pattern (0) | 2021.07.30 |
---|---|
Chain-of-Responsibility Pattern (0) | 2021.07.30 |
Design Pattern Study (0) | 2021.07.29 |
Facade pattern (0) | 2021.07.29 |
Things to think about when designing a sofware structure (0) | 2021.07.29 |
댓글