forked from MvvmCross/MvvmCross
-
Notifications
You must be signed in to change notification settings - Fork 2
Tip Calculator A recap
Jon Stoneman edited this page Sep 6, 2014
·
4 revisions
Over the course of these articles, we've covered the complete Tip Calc app on 5 platforms from one shared PCL code library using Mvvm.
I hope this was simple and easy to follow...
Just to recap what we did:
- For the core PCL library, we:
- created a Profile 259 library
- added some
MvvmCrossPCL libraries - added our services - the
Calculator - added our
TipViewModelwhich exposed properties - added our
Appwhich wired the services together and defined anIMvxAppStart - For each platform, we generally went through a process like:
- created a platform specific project
- added some
MvvmCrossPCL libraries - added some
MvvmCrossplatform specific libraries - added a
Setupclass which would initialise everything - modified the platform-specific Application to call
Setup - created a
Viewsfolder - added a platform specific
View - changed that
Viewbase class to something beginning withMvx - added a
public new TipViewModel ViewModelto link theViewto theViewModel - modified the XML for that
Viewto add the UI fields - modified those UI fields to add databinding to the
ViewModelproperties - pressed 'Run' :)
- considered some ways that the UI could be improved using platform-specific UI techniques
Generally, these same steps are what you'll follow for each MvvmCross application you want to make.
We'll cover more advanced topics in future articles.
Thanks for reading
Stuart
