Last but not least: we need to allow the user to delete a listed item. So, we
can change the template used to create the list items to include a delete
button. Here’s what I have, simple and ugly.
Now, we need to take into account the post for that Delete button. Because we
have made this a POST, we can handle it in the POST handler that we defined
in
Story 3.
And, that’s it. Everything works. It’s not pretty: the UI, the code. It would
be nice to convert the POST that destroys a task into a DELETE message;
however, that’s deeper than this article should go.
And, obviously, plates leaves a lot to be desired. I actually had a
different implementation in my GET handler for this story and found that
plates falls apart with its “simple” (read: buggy) HTML parser. I would
like a DOM to actually handle this; however, as they mention in the
documentation, those options do not perform quickly enough.
But, this is it: flatiron. Overall, I like its unobtrusive nature. I think
I will find it easy to build applications atop this framework.