Question
I currently have a Library System UML and I am trying to add a Proxy to my design. My goal is to create a rest
I currently have a Library System UML and I am trying to add a Proxy to my design. My goal is to create a rest service between the UI and the services and create another model layer for the public. The service is supposed to take the model coming in and translate it to the model the inner service needs, with the help of the Adapter Pattern.
I understand how the Adapter Pattern works but I have been struggling to understand how I can tie it in with a Proxy in my design. I understand there are different kinds of proxies (virtual, remote, protection) and for my design in particular, I was planning to create a Remote Proxy so that I could manage access between the Client and Remote Object (such as a TitleRecord).
Here is my starting point/idea for Proxy(My UML is bigger but I left out the unnecessary info):
- I have the TitleRecord(aka RealSubject - I will change the name) access the TitleRecord Class (which has an abstract getter method to get the Title from the Repository class (which is a Singleton Class).
- Including the Adapter Pattern is where I am feeling confused --> service should the model coming in and translate it to the model the inner service needs, with the help of the Adapter Pattern. An adapter pattern should convert an interface into one the client can use and a proxy provides a place holder for another object to control access to it. So if I were to implement the adapter, would the TitleRecord be the ConcreteAdapter and the Proxy be the Adaptee? I cannot seem to wrap my head around this, any feedback, resources or help is much appreciated thank you!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started