Coder Social home page Coder Social logo

shoreleave-pubsub's Introduction

shoreleave

A smarter client-side in ClojureScript

###Shoreleave is a collection of integrated libraries that focuses on:

  • Security
  • Idiomatic interfaces
  • Common client-side strategies
  • HTML5 capabilities
  • ClojureScript's advantages

It builds upon efforts found in other ClojureScript projects, such as Fetch and ClojureScript:One.

Shoreleave-pubsub Overview

The pubsubs namespace defines two protocols: one for specificing buses and one for "publishables"

An implementation is provide on the Google Closure pubsub system that allows for:

  • Using a function as a topic (something you can subscribe to)
  • Using an atom as a topic
  • Using an embedded web worker as a topic
  • Local storage as a topic
  • Using keywords and strings as topics (standard Closure pubsub style)

The pubsub system enables you to keep your system completely decoupled and frees you from having to liter state or DOM logic within functions. New functionality can be implemented by combining existing functions (treated like services). Cross-cutting functionality (like logging) can be looped in anywhere.

Instead, you declaratively bind pure-functions to side-effecting functions via subscriptions, or atoms to pure-functions. Entry-points into the pubsub system can be DOM listeners, like those found in Enfocus (and potential exits can be DOM actions).

This gives you the heart of Reactive JavaScript (RxJS), without the additional verbs (both a benefit and a tradeoff).

Please see the Marginalia docs for more information.

Plays well with others

Shoreleave makes no assumptions about other libraries you might be using in your app.

I have found it to pair particularly well with Enfocus

Examples and usage

Please the github wiki for examples of each library feature

License

Copyright © 2012 Paul deGrandis

Distributed under the Eclipse Public License, the same as Clojure. Please see the LICENSE_epl.html for details.

shoreleave-pubsub's People

Contributors

ohpauleez avatar

Watchers

James Cloos avatar Rob Jentzema 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.