Title: Questions about some design decisions regarding proxies Post by: njm on March 03, 2009, 01:22:44 Hi All,
I've been reviewing PureMVC, and have a few questions about its architecture:
Aside from this, I find PureMVC to be a very well-engineered library and would like to thank all its contributors for their hard work. Cheers, Nick Title: Re: Questions about some design decisions regarding proxies Post by: Tekool on March 03, 2009, 02:40:22 1>Why not let users to register multiple proxies of the same class with different names, and decouple this view-specific logic from the proxies themselves?
It is the Proxy default behavior. Look at the Proxy class constructor default arguments : (proxyName:String=null, data:Object=null). It's only a convention to use a constant as proxy name when you did not need to create multiple proxies of the same class in your application. 2>Why should proxies be required to expose their data object? Not sure here, but I think it's a good practice to give access to the data when the proxy's data is a VO. You can use it as *protected* or *private* to give the data the good type in the Proxy itself. I found it useful in UnitTests to verify from the Test that the proxy acts as expected on the data. |