intro cujojs

14
TECH TALK#7: CUJO. JS

Upload: efinal

Post on 18-Jul-2015

537 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Intro cujojs

TECH TALK#7: CUJO.JS

Page 2: Intro cujojs

Project Owners

Brian Cavalier is a server-side Java guy turned front-end engineer, and open source fanatic working at VMware.

John Hann has been pushing the limits of the web since 1996 and has been totally engulfed in JavaScript, HTML, and CSS since 2004. He works at VMware.

Page 3: Intro cujojs

What is cujo?

• cujo is an architectural toolkit for next generation JavaScript applications. It

encourages highly modular development, declarative application assembly, and embraces the asynchronous nature of JavaScript and its

fusion of object-oriented and functional programming styles.

Page 4: Intro cujojs

What is cujo?

• You focus on the business logic of your application components. cujo loads and assembles your components and then wires them all together.

Page 5: Intro cujojs

What is cujo?

• “I'm also interested because while wire.js'sdeclarative syntax isn't compile-to-js, it is in

it's own way a separate language.”

Page 6: Intro cujojs

What’s in cujo?

• curl.js: A small, fast AMD/CJS module loader with dependency management

• wire.js: A light, fast, flexible Javascript IOC container

• meld.js: AOP for JS with before, after, afterReturning, afterThrowing, around, pointcuts, and more

• when.js: A lightweight Promise and when() implementation, plus other async goodies

Page 7: Intro cujojs

What’s in cujo?

• cram.js: A simple Javascript module concatenator

• poly.js: A modular, flexible set of ES5-ish shims

Page 8: Intro cujojs

Concepts

Page 9: Intro cujojs

General concepts

• IOC (Inversion of control)

• Dependency Inversion

• Application Composition

Page 11: Intro cujojs

Break Down

Page 12: Intro cujojs

connections

• Dependency Injection

• DOM events

• Javascript to Javascript "events”

• Aspect Oriented Programming (AOP) advice

Page 13: Intro cujojs

components

• Simple Types

• Application Components

– module, create, compose, literal

– wire: recursively invokes wire on another wire spec

• Function Components

Page 14: Intro cujojs

THANK YOU~