Coder Social home page Coder Social logo

zine's Introduction

Zine OS

DIY E-Zine and Operating System

Interfaces

FS Interface

Read a blob from a path, returns a promise fulfilled with the blob object. The blob is annotated with the path i.e.: blob.path == path

read: (path) ->

Write a blob to a path, returns a promise that is fulfilled when the write succeeds.

write: (path, blob) ->

Delete a file at a path, returns a promise that is fulfilled when the delete succeeds.

delete: (path) ->

Returns a promise

list: (directoryPath) ->

FileEntry Interface

path:
size:
type:
updatedAt:

FolderEntry Interface

folder: true
path:

Application Interface

Application objects are views (they have an element, usually a UI window).

element: DOMElement
exit: -> # Exit the app and remove its element from the DOM
send: -> Promise
saved: -> Boolean

Apps can communicate with each other by sending messages via the send method. Since apps can be running inside iframes or other places all data needs to be able to survive transit through the structured clone algorithm: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

send returns a promise that is fulfilled with the result of the method or rejected with an error. The first argument of send is the name of the method to invoke in the application, the following arguments are the parameters to be passed to that method.

exit gives the app a chance to respond and prompt to cancel to prevent losing unsaved work. (TODO)

TODO: Add methods for binding/connecting observables. TODO: Add methods for connecting streams.

System Interface

Apps should be able to read and write to the file system in a simple manner.

readFile: (path) ->

readAsText: (path) ->

readTree: (path) ->

writeFile: (path, blob) ->

deleteFile: (path) ->

The system provides easy ways to launch applications:

# TODO: Better name and arguments
launchAppByAppData: (data) ->

zine's People

Contributors

strd6 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.