This repository is intended to learn and practice a bit about MVVM and Multiple ways to use bindings on the MVVM architecture
The MVVM pattern includes three key parts:
Model
View
ViewModel
Clone project
git clone https://github.com/AcademyIFCE/MVVMStudy
- Open your Xcode, select a simulator, click the play button or
cmd + R
- You can create your branch if you apple developer academy student with `git checkout -b "name-of-your-branch"
- In project we have the folders that have responsible base of project, so don't change in this file, just use this
projects.append( Project(name: "Your Name", destination: YourDestinationController.self) )
just set your name and your destination controller - To create your participation just create the folder with your name, so enjoy to create your architecture of folder
Bellow you can see more a little bit about MVVM and Binding, you can improve this text editing this Readme.md and create the PR for this
In this sample app we have the following modules/layers:
Framework responsible for linking the Interfaces to the Factories
. This should only the referenced/used in the App Module
.
Model refers either to a domain model, which represents real state content (an object-oriented approach), or to the data access layer, which represents content (a data-centric approach
As in the model-view-controller (MVC) and model-view-presenter (MVP) patterns, the view is the structure, layout, and appearance of what a user sees on the screen. It displays a representation of the model and receives the user's interaction with the view (clicks, keyboard, gestures, etc.), and it forwards the handling of these to the view model via the data binding (properties, event callbacks, etc.) that is defined to link the view and view model.
The view model is an abstraction of the view exposing public properties and commands. Instead of the controller of the MVC pattern, or the presenter of the MVP pattern, MVVM has a binder, which automates communication between the view and its bound properties in the view model. The view model has been described as a state of the data in the model The main difference between the view model and the Presenter in the MVP pattern, is that the presenter has a reference to a view whereas the view model does not. Instead, a view directly binds to properties on the view model to send and receive updates. To function efficiently, this requires a binding technology or generating boilerplate code to do the binding.