PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: jaxim on June 10, 2010, 07:16:25



Title: Suggestion on how to send reports to Omniture?
Post by: jaxim on June 10, 2010, 07:16:25
I have a question on how to architect online reporting using puremvc.
For example, I'd like to report to Comscore and/or omniture.

Usually proxies are used when you're communicating to the outside world, right? So that would mean I would create a proxy(ies) to communicate to online reporting sources. Proxies do not hear any of the framework's notifications, so that would mean I would need to create a Mediator to listen to the notifications that I would like to report. Furthermore, mediators should not tell Proxies what to do directly, so that would mean I would need a command(s) to let the reporting proxy know what notification was just dispatched.

This seems like the framework is forcing me to create extra classes when it would be simpler if the proxy could listen to the framework's notifications and thus cut all the middlemen. Is this (see below) the best way to set up a reporting architecture, or is there a better way?


1) Framework dispatches notification
2) Reporting Mediator receives notification
3) Reporting Mediator dispatches notification thru a command
4) Command tells Reporting Proxy what notification was just dispatched
5) Reporting Proxy formats the proper parameters and sends info to the reporting agent: i.e. Omniture.











Title: Re: Suggestion on how to send reports to Omniture?
Post by: puremvc on June 15, 2010, 06:21:00
Furthermore, mediators should not tell Proxies what to do directly
Not true. Mediators can invoke methods on proxies directly. This doesn't break any best practices.

So a mediator listening for notes could respond by making a proxy call that talks to the service. No need for a command unless there is a bunch of business logic to execute.

-=Cliff>