Kiwi is a lightweight javascript framework designed to help you organize your javascript code. It uses the tried and tested MVC architectural pattern to separate code that is doing different things.
To keep itself and your javascript light, Kiwi tries to speak http as much as it can (especially when handling errors), and assumes you have a RESTful server resources. It also provides a few shortcuts for common ajax tasks.
There are two central concepts in Kiwi: the request and subscriptions. The request is the object that persists from a triggering event in the DOM (e.g. a click) up to the http call and usually down to the DOM again, if we want to render something. Subscriptions are the way we get different areas of the DOM to respond to certain logical actions of your application. In other words, we use subscriptions to ensure that data presented in different parts of the DOM is consistent.
Learning how to use Kiwi means simply learning how to control the request from its inception in the DOM and back. In terms of the components of MVC, the request takes the following trip:
View --> Controller --> Model --> Controller --> View
The two view steps require individual coding, while the both roles of the controller are achieved with the same code. In light of this progression, we've split the rest of the documentation into the following sections:
Going through these sections sequentially is recommended for an initial ramp-up of the framework.
There are also sections on: