Day 2: Dividing Up the Solution
Or, Building a Shared Business-Logic Layer
Today we’ll build the shared business logic of the calculator. Xamarin’s ability to share a project among multiple platform-specific projects is one of its strong suits. It allows us to write business logic once and share it to multiple projects.
Building a Shared Calculator Model
The business logic for a calculator isn’t extremely complex, but it does have a few gotchas if we don’t code it correctly. With that in mind, we’ll build the model testing first.
Testing the Calculator Model
First, get the tests that Xamarin Studio generated working, or at least not failing. Then ...