Coder Social home page Coder Social logo

robo's Introduction

Robo

Great things have small beginnings. Again.

Build Status

What is Robo?

Robo is a frontend Coffeescript framework that is effectively a combination of micro-libraries, opinionated classes and patterns, and prescriptive project structure and build steps.

Again

Robo has be re-imagined, re-started, and re-written several times. This time, it's in Coffeescript... so it's back to scratch one.

Framework Components

Events

Events are the low-level construct that power Robo's dynamic features. The eventing functions are found on the event/WithEvents class and can be mixed into any class.

It features both the on/off style of setting up callbacks for when an event is triggered, and listenTo/stopListening to invert the responsibility of keeping track of the events.

class Eventer extends Base
  @uses WithEvents # mixin pattern via robo/util/Base

  constructor: ->
    @on alert: (m) -> console.log "alert: #{m}"

a = new Eventer
a.trigger 'alert', 'some message'

Output:

alert: some message

Full documentation for the WithEvents mixin

Observable Objects

Most significant parts of Robo are built around the idea of observable objects. This lets us build dynamic applications that react to data changes and have rich behavior, all handled in a standard way.

Robo comes stock with several observable types: ObservableObject, ObservableList, ObservableDictionary, ObservableSet.

ObservableObject Example

class Person extends ObservableObject
  @observable firstName: 'John'
  @observable lastName: 'Doe'
  @observable fullName: -> "#{@firstName} #{@lastName}"

person = new Person

person.onPropertyChange
  fullName: -> console.log 'full name changed'
  firstName: -> console.log 'first name changed'

person.firstName = 'Bob'

Output:

first name changed
full name changed

Full documentation for Observable mixin

Views and Controls

Data Binding

Full documentation for the Binding class

View Models

Commands

Data Templates

Application, Controllers, and Routes

Models, Queryables, and Data Persistence

Declarative XAML Files

Building with grunt-robo

Testing

Testing requires node/npm and grunt-cli to be installed on your system.

To install all the dev dependencies and run the test target:

npm install
grunt test

License

Copyright 2013 Brandon Valosek

Robo is released under the MIT license.

robo's People

Contributors

bvalosek avatar

Stargazers

Elliot Boney avatar Dillon Shook avatar

Watchers

 avatar James Cloos avatar Dillon Shook avatar  avatar

Forkers

dshook

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.