basvisions.blogg.se

Dropbox api coffescript
Dropbox api coffescript







dropbox api coffescript

to create a task named “Buy milk”, create the empty file “active/Buy milk” (implemented by addTask in the Tasks class).to initialize the task database, create two folders, active and done (implemented by the mkdir calls in the load method in the Tasks class).Operations on tasks cleanly map to Dropbox file operations in Dropbox. Tasks are grouped under two folders, active and done. Each task is stored as a file whose name is the task’s description. The data model design favors ease of development and debugging. Fortunately, today’s announcement fixes everything!Ĭheckbox uses the “App folder” Dropbox access level, so Dropbox automatically creates a directory for my app data in my users’ Dropboxes. Deploying the apps was a problem on its own, and left me yearning for the minimalistic “ copy to Dropbox” approach. To my despair, the code for having small applications store per-user data was much longer than the actual application code. I was afraid I’d make a mistake, so I ended up writing complex scripts to handle the deployment. Finally, deploying a new version of the application involved pulling the updated code from a git repository, migrating the database schema, and restarting the application server. My applications then needed accounts and authentication to ensure that users wouldn’t overwrite each others’ data. I needed a database to store the data and an application server to talk to the database server. However, up until now, having to handle per-user data has been a different story. I’ve been using this beautiful, simple paradigm for all my applications that don’t need to store per-user data. Dropbox syncs the files to its servers, and even lets me revert a bad deployment.

dropbox api coffescript

For example, the deployment process for my Dropbox-hosted applications is the cp command (copy if you’re on Windows). My interest in static Web apps is greatly influenced by how easy they are to deploy. JavaScript runs on users’ browsers, so all the application’s files are static, and can be served by any plain old file server such as nginx, pretty much any Web hosting service, and your humble Dropbox. Thanks to recent improvements in browser support and VM performance, I often find myself writing small and medium applications completely in JavaScript, whenever I can get away with it.









Dropbox api coffescript