proxy-pattern Questions
2
Solved
How to create an NSProxy subclass in Swift?
Trying to add any of the init methods fails with error:
"Super init can't be called outside of the initializer", or
"Super init isn't called on all path...
Boehmer asked 18/4, 2018 at 15:20
3
Solved
So, in a library that I'm creating that uses custom elements, you obviously need to define the class in the CustomElementsRegistry before you may instantiate it.
As of right now, this is being sol...
Signalman asked 12/12, 2017 at 19:0
3
As I understood both Adapter and Proxy patterns make two distinct/different classes/objects compatible with each for communication. And both of them are Structural patterns. I am getting that both ...
Amaris asked 8/6, 2016 at 3:38
10
Solved
Can you give any good explanation what is the difference between Proxy and Decorator?
The main difference I see is that when we assume that Proxy uses composition and Decorator uses aggregation th...
Osteomyelitis asked 4/9, 2013 at 16:7
9
Solved
I would like to know what copy-on-write is and what it is used for. The term is mentioned several times in the Sun JDK tutorials.
Dromond asked 10/3, 2009 at 4:27
2
Solved
So, I was playing around with Proxy objects and while trying to see how they mix with spread syntax and de-structuring, I stubled upon this weird behavior:
const obj = {
origAttr: 'hi'
}
...
Campstool asked 11/3, 2019 at 16:15
3
If I'm on the JVM I can do this:
object Playground {
class DynamicInvocationHandler : InvocationHandler {
@Throws(Throwable::class)
override operator fun invoke(proxy: Any, method: Method, ar...
Rehearse asked 23/1, 2019 at 12:20
2
I have a class that I'd like to apply a proxy to, observing method calls and constructor calls:
Calculator.js
class Calc {
constructor(){}
add(a, b) {
return a+b;
}
minus(a, b) {
return a-b...
Deadwood asked 13/6, 2018 at 16:52
1
Solved
Suppose I have a function Foo, and I want objects constructed from it to have a bar property:
function Foo() {}
Foo.prototype.bar = 'baz'
console.log('new Foo().bar: ' + new Foo().bar)
new Foo...
Laid asked 19/12, 2017 at 17:59
1
Solved
I'm trying to create a Proxy class to another class. I want this class to be passed into the proxy in its constructor and then for the proxy to dynamically create all the same methods of this class...
Knorr asked 5/9, 2017 at 10:26
2
I'm trying to understand what are the differences between proxy and dynamic proxy patterns.
from what I've read so far the only thing that I found out is that the proxy class byte-code is created d...
Ellga asked 14/12, 2013 at 14:7
3
I knew of the proxy pattern till now and recently read this article that says a virtual proxy is basically used to defer the Object Creation process of memory-intensive components thereby speeding ...
Moynahan asked 25/7, 2011 at 16:23
2
Solved
Proxy pattern delegates the request to the Real subject after doing some additional processing like applying checks if request needs to be processed or not based on may be some credential checks.
...
Montpellier asked 28/3, 2016 at 16:40
13
Solved
I was looking at the Proxy Pattern, and to me it seems an awful lot like the Decorator, Adapter, and Bridge patterns. Am I misunderstanding something? What's the difference? Why would I use the Pro...
Brainbrainard asked 8/12, 2008 at 18:32
0
I'm trying to implement proxy pattern with swift to create an configuration object for my custom object inherited from NSObject. It would be something like UIAppearance for UIView. But I don't unde...
Uncivil asked 25/1, 2016 at 13:31
3
Solved
I'm trying to find a nice way of implementing a service which relies on a third-party library class. I also have a 'default' implementation to use as fallback in case the library is unavailable or ...
Worm asked 26/4, 2015 at 10:59
2
Solved
Suppose we have some Foo object that allows:
cout << myFoo[3];
myFoo[5] = "bar";
This calls for a proxy design-pattern (detailed by Scott Meyers here)
But now let us suppose every myFoo[i...
Jactitation asked 28/12, 2014 at 20:26
3
Solved
I'm trying to wrap a Python PyObject* in an Object class.
In Python, everything is a PyObject*.
A list is a PyObject*, and each item in the list is itself a PyObject*.
Which could even be another l...
Cupboard asked 29/12, 2014 at 12:40
1
As I understood, the Facade Pattern's intent is
to provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to ...
Erl asked 26/6, 2013 at 23:50
2
It seems that there are similarities between Proxy and Adapter pattern?
Can any one please explain what are the differences? Why we require both of them? In which problems we should use only proxy...
Demp asked 22/9, 2010 at 6:18
2
Solved
I use this code to override the window.alert function.
The function replaces breaks by \r\n.
It works fine in Firefox, but ofcourse not in IE.
Im getting the error: Property or method not supported...
Squarerigged asked 17/6, 2010 at 9:17
3
Solved
This is in response to some comments in what is so bad about singletons
There it was suggested that the proxy pattern can be used instead of a singleton to cache DB data. But I cannot see the adva...
Fulmination asked 19/1, 2010 at 15:6
1
© 2022 - 2024 — McMap. All rights reserved.