블로그 이미지
LifeisSimple

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Notice

2010. 12. 29. 17:30 Brain Trainning/NoSQL
좀 오래되긴 했지만... 그래도 간단하게 잘 설명된것 같습니다. 


To illustrate how easy and straightforward writing applications for CouchDB is, we are going to build a simple todo-list application in Javascript. You should be familiar with HTMLand Javascript and the DOM. You do not need any Ajaxexperience. Although we are going to use it, all will be abstracted away.

The interface is quite plain, as is the functionality. This is only to demonstrate how to work with CouchDB and not meant as a real application. We could turn this into something nice with some spit & polish.

Say hello to our todo app

How it works

We take a top level view here, working our way from the user’s perspective down to the actual code. This ensures we do not screw up the application for the user by mapping its inner workings to the user’s model.

When you open the app you are greeted with an empty input box and a list of todos (or no todos, in case you were working hard). You can type in a single-line todo item, hit enter and that line appears on top of the list. Finally, the input field gets reset and you can enter another item. To mark an item done, click the X next to it. It will disappear.

Boy this looks trivial, but it captures the essence of a todo list. There are plenty of opportunities how to improve things, but let’s nail the basics first.


....


posted by LifeisSimple