Hi All,
Thanks to the creator, Cliff, for this framework. I am architecting the Flex UI for a brand new enterprise app that will evolve to be very complex. I selected PureMVC over the other contenders.
The thing my brain is wresting with is the Proxy and it's intended use.
We have many DTOs sent to and from the server (java). We generate AS3 versions of these. We also have a set of service beans like UserManager, AccountManager, etc which return these DTOs and take them as arguments (and we generate service stubs for these too).
This is all well and good but I am trying to figure out how the Proxy fits in.
1. Proxy for each DTO? We have like 40 DTOs already (and this will grow). I don't think I want to have a proxy wrap each DTO as it's internal "data". Maybe I am misreading the intention of the proxy?
The main things the proxy seems to provide, in terms of it's connection to to the rest of the framework, is that you can look them up by name and they can send notifications (which I can do with AppFacade anyway).
2. Proxy makes remote service calls? Something about the model talking to the server just seems weird to me. I donno, just feels more like a controller type task. I guess I was thinking the model is more like an object graph, and the services (web for now, but could be other persistence framework later) act on these beans to get/set whatever on them. Do people really have these "smart" proxies that go and fetch data from services and throw events when it is done? I guess it kinda makes sense that the Proxy may get data, set it on itself, and throw an event (just cause of the set it on itself part), but still feels like code I would put in a service layer or persistence layer or something -- basically a set of services the Controller (or whoever) users.
Am I missing something?
Thanks for any help and for the well thought out framework.
|