SpringOne2GX 2013 Replay: AOP-ing your JavaScript

News | Pieter Humphrey | March 25, 2014 | ...

Recorded at SpringOne2GX 2013 in Santa Clara, CA.

Speaker: Brian Cavalier

Loose coupling. Your web front-end has that, right? Your JavaScript is using pubsub, event emitters, and message buses! Guess again, you can do better. Aspect Oriented Programming (AOP) is a technique for augmenting the behavior of objects, methods, and functions non-invasively. AOP adds new behaviors and modifies existing behaviors "from the outside". Using AOP, it's possible to create connections between components without either having any knowledge of the other and without any extra library dependencies in your code. While you may be familiar with AOP in Spring, you may not yet have applied it in JavaScript. In this talk, we'll do just that. We'll introduce simple techniques for applying AOP in pure JavaScript using no additional libraries, and then look at meld.js (https://github.com/cujojs/meld), the AOP library that powers Cujo.js (http://cujojs.com). We'll work from simple examples of making connections between components to more sophisticated examples that integrate pubsub, message buses, etc. in a truly loosely coupled way.

!{iframe width="560" height="315" src="//www.youtube.com/embed/MoZgJY2IF4A" frameborder="0" allowfullscreen}{/iframe}

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all