100 likes | 185 Views
xRM -View-Control: XRMVC. Leveraging MVC theory and practice to produce solutions that make users and data analysts happy. David Berry @crmentropy http://crmentropy.blogspot.com dberry@avtex.com. MVC Tenets Model Data View Data Transformation Control Interface xRM Equivalents of MVC
E N D
xRM-View-Control: XRMVC Leveraging MVC theory and practice to produce solutions that make users and data analysts happy.
David Berry@crmentropyhttp://crmentropy.blogspot.comdberry@avtex.com
MVC Tenets • Model Data • View Data Transformation • Control Interface • xRM Equivalents of MVC • Model Entity Schema • View Client • Control Interface Fields Control View Model
What’s an Interface Field? • An Interface Field is an attribute that has its Read and Write operations intercepted by Plugins to provide enriched and normalized data. • Example: Address, OverriddenCreatedOn
Why use Interface Fields? • Data Normalization • Data models that work for analytics, behind a UI that works for users • Achieve field security on many “OOB” attributes • Real-time aggregation • Inheritance?! • It’s supported.
Why NOT use Interface Fields? • Performance degradation over large datasets • SQL queries can be left empty-handed • “Searchable” complications • Views magnify Read operations
How to implement Interface Fields • Use a schema name post-prefix that identifies the interface’s mode: • virt_ (input to remote field) • in_ (input only; replaced by Actions) • out_ (output only; replaced by Actions) • sync_ (not “Normalized”) • calc_ (not “Normalized”) • Synchronous Plugins that watch pertinent operations: • Pre-Create • Pre-Update • Post-Retrieve (except sync_ and calc_) • Post-RetrieveMultiple (except sync_ and calc_)
Redefining xRM Concepts • “N” can be any number, including 1 • N:N is a very simple association, but sometimes N:1:N is needed • (N)Contact:(N)Contact for family • (N)Contact:(1)Descriptor:(N)Contact for brother, sister, uncle • Don’t write a custom UI, write a custom View Model • “Normalize until it hurts; denormalize until it works” • Be willing to sacrifice synchronicity for stability
What is a Shadow/Mirror Entity? • A custom entity designed to be paired with another entity (or several) for the purposes of providing extensibility scenarios that might otherwise be impractical or impossible • Marries naturally with xRMVVM practices