Skip to content
An example of the [Data-Context-Interaction pattern ](http://fulloo.info/) in Xamarin.iOS.
C#
Branch: master
Clone or download
Latest commit 6b25b32 Jul 23, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
XamDCI Changed directory names Jul 23, 2013
.gitignore Changed directory names Jul 23, 2013
DCISingleFile.userprefs Squashed commit of the following: Jul 17, 2013
DCI_Transfer.sln Renamed project Jul 19, 2013
DCI_Transfer.userprefs Changed directory names Jul 23, 2013
README.md Create README.md Jul 23, 2013
Readme.MD Changed directory names Jul 23, 2013

README.md

Data-Context-Interaction Example

This project shows the use of Data-Context-Interaction in a Xamarin.iOS MVC application.

WARNING: Over-Engineered!

This project is intended to illustrate techniques that are only actually applicable in far-more-complex situations. The application is over-engineered in terms of MVC and DCI is not called for in use-cases that can be implemented with a handful of lines.

WARNING: Under-Engineered!

This project's UX is intentionally terrible.

Purpose

The purpose of this project is to illustrate two techniques that are helpful in larger applications:

  • MVC with domain events; and
  • DCI

This project illustrates a "stricter" interpretation of MVC (as opposed to MVP and without the use of MVVM). Domain events (in this case, relating to the transfer of money) are used to decouple View and Controller elements from the Model. Additionally, View elements directly subscribe to these domain events, thus distinguishing this architecture from MVP. (For more discussion, see article).

DCI is a technique that is useful in complex use-cases, where the algorithm or business logic is a matter of refinement, validation by domain experts, etc. (In other words, situations more complex than what's strictly needed for this example.) This example shows the basic DCI structure:

  • The Controller establishes a Context, which corresponds to a use-case
  • The Controller creates "role-playing objects" by injecting methods ("what objects do" vs. "what objects are").
  • The use-case is defined by the explicit interaction of role-playing objects

Because C# does not have language support for Role types, Roles are defined as interfaces and injected via extension methods.

You can’t perform that action at this time.