This section explains the high-level design of the frontend and backend.
Application design follows a slightly different version of the Model-View-Controller (MVC) pattern, with the addition of the Actions
, Store
, State
, and Communication
layers to simplify the controller layer of the traditional iOS application MVC pattern. All application layers are explained in the following sections.
Plain old model structures. These models do not have any logic and only consist of properties. There are four types of model:
TodoRequest
: This is astruct
that is used in backend request calls and conforms toRequestProtocol
Todo
: This is astruct
that representsTodo
data, and uses theArgo
andCurry
libraries to decode the object from JSONTodoViewModel
andTodosViewModel
: These structs represent data and are used in views and shown to the userTodoLens
: These lenses modify theTodo
model
All the aforementioned models are immutable value types.