GithubHelp home page GithubHelp logo

boscojwho / jtpdropboxfilesmanager Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 136 KB

A wrapper class for Dropbox's Sync API for iOS that handles asynchronous, atomic CRUD operations with an easy-to-use API.

Home Page: www.jot-app.com

License: Apache License 2.0

Objective-C 100.00%

jtpdropboxfilesmanager's Introduction

JTPDropboxFilesManager

Summary: A wrapper class for Dropbox's Sync API for iOS that handles asynchronous, atomic CRUD operations with an easy-to-use API. JTPDropboxFilesManager allows for lighter view controllers. This class is currently used in Jot โ€“ Refined Text Editor (www.jot-app.com).

JTPDropboxFilesManager is a controller class that deals with the fact that, at any given time, there may be multiple DBFile instances that are downloading, uploading or idle. Its purpose is to prevent erroneous overwrites, conflicted copies, and data corruption. Additionally, this class ensures that any instance of DBFile is the newest version before it is returned to the caller. This class is intended to be used by multiple classes that range from Dropbox directory controllers to Text Kit model/view classes.

@discussion Typically, a user will open, edit, and close a file, in that order. In such a scenario, managing read/write operations is relatively simple. However, more often than not, the user may do things differently.

@discussion CASE 1: Users may quickly open and close the same file. To prevent erroneous overwrites, conflicted copies, and data corruption, any operation on that file should be serially queued.

@discussion CASE 2: Users may choose to open and close multiple files in quick succession. In this case, operations on different files may run concurrently in the background. However, like 'CASE 1', operations on a single file should always be serially queued.

@discussion Files are indirectly accessed via DBPath. Each file is uniqued by its [DBPath stringValue], which is used as a key in an NSDictionary for accessing files.

@warning Clients must explicity call -close on DBFile instances. You should do this when the file's user interface is closed (i.e. user closes the file's text view). Calls will be enqueued serially, but make sure that you call -close after all other operations on that file have been enqueued.

jtpdropboxfilesmanager's People

Contributors

boscojwho avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.