PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: flexphp on April 01, 2008, 01:22:43



Title: Transversal functionalities
Post by: flexphp on April 01, 2008, 01:22:43
Hi again,

In any project I could imagine, they are transversal functionalities, which apply the same logic in any Business Object (User, Product, Agenda...) like:
  - localisation of labels
  - form validation
  - user feedback messages
  - acl management (admin could access any fields but user can modify only few of them, ex. user can change his password, but admin can change the username)

Those do not integrate very well with notification process who are more 'verticaly' or 'channel' oriented (from proxies to user interfaces and vice-versa)
To make a comparison with a company, notifications are the reporting to/from the hierarchy, but general services (HR, office supplies...) are transversal and have a cross services structure.

Any idea how to implement such layers in pureMVC??

Thanks all


Title: Re: Transversal functionalities
Post by: flexphp on April 01, 2008, 02:15:31
Could we accept that any Business Object proxy could talk to 'transversal proxies' directly?

Ex.: ProductProxy set/retrieve data via exposed API to/from:
 - ConfigProxy
 - LocaleProxy
 - AclProxy
 - ValidationProxy
 - MessageProxy

Good practice?

Cheers all,
Patrick


Title: Re: Transversal functionalities
Post by: puremvc on April 02, 2008, 07:42:39
There's no problem with having one proxy retrieve and talk to another. Of course it's a coupling, but the Model is typically more of a part/whole where one part may expect/depend on another, as do database tables for instance.

In the View, we don't want to have mediators retrieve and act upon each other since notifications are perfectly fine for communications and there is no need to tie them closer than that. It produces more portable View Component/Mediator pair, which are far more likely to be reused outside the app they are a part of.

-=Cliff>


Title: Re: Transversal functionalities
Post by: flexphp on April 02, 2008, 12:18:38
Thanks Cliff!!