Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Suggestion on how to send reports to Omniture?  (Read 5504 times)
jaxim
Full Member
***
Posts: 22


View Profile Email
« 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.









Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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>
Logged
Pages: [1]
Print