Putting It All Together
Let’s look at an example of a service that has a couple of resources that allow the client to read and write some data. The application will display a list of to-do items and allow the user to add additional items to the list.
The client will be implemented in ClojureScript and use Ajax to communicate with the service. The client code will consist of a few functions to retrieve, render, and save to-do items. Let’s look at each of these in turn.
The first function renders the items in our list.
|||(defn item-list [items]|
|||(when (not-empty items)|
|||(for [item items]|
Next we add a function called get-items to grab the ...