In this section, we will cover how RestKit might be integrated with our application User Interface.
The application we are building is a typical business app. It heavily uses tables (such as UITableViewController
) to present the loaded data (list of objects) to the user. In our case, the types of data that are available from the web service for presentation to the user in a table view are:
Databases
Collections
Documents
Plans
Indexes
Invoices
Deployments
Each of these table view controllers does basically the same thing, it loads a list of objects through a GET request on a specific path, and shows it to the user. It also provides the ability to edit the list with actions, such as delete an object, edit an object, and add a new object. So, for keeping our code clean and not repeating it, the advice is to create a generic table view controller, with properties and methods that our subclasses will define/override. Such an approach of creating generic controllers...