18

Click here to load reader

My charts can beat up your charts

Embed Size (px)

Citation preview

Page 1: My charts can beat up your charts

MY CHARTS CAN BEAT UP YOUR CHARTS

@dfgrumpy

[email protected]

www.cfhour.comDave Ferguson

Page 2: My charts can beat up your charts

I am an Adobe Community Professional

I started building web applications a long time ago

Contributor to Learn CF in a week

I have a ColdFusion podcast called CFHour w/ Scott Stroz (@boyzoid)

(please listen)

Stuff about me…

cf.Objective() 2014 @dfgrumpy

Page 3: My charts can beat up your charts

Enabling the internet to work in real time.

WebSockets

cf.Objective() 2014 @dfgrumpy

Page 4: My charts can beat up your charts

A web what?

WebSocket is a web technology providing for bi-directional, full-duplex communications channels over a single TCP connection.

http://en.wikipedia.org/wiki/WebSocket

cf.Objective() 2014 @dfgrumpy

Page 5: My charts can beat up your charts

What I meant to say was….

WebSockets provide a way for a server to push data to a connected client over a dedicated channel and port.

cf.Objective() 2014 @dfgrumpy

Page 6: My charts can beat up your charts

What does this all mean?

No more heartbeat JavaScript calls.

setTimeout()

No more long polling.

BlazeDS

Instantly update a client when server side changes occur.

Other fun cool tricks (more on this later)

cf.Objective() 2014 @dfgrumpy

Page 7: My charts can beat up your charts

What do I need to do?

Define a channel in Application.cfc.

Use a single tag to enable the client.

Write a function to publish a message.

Write some JavaScript to process the incoming message.

You will write LOTS of JavaScript.

cf.Objective() 2014 @dfgrumpy

Page 8: My charts can beat up your charts

Simple Websocket Demos

cf.Objective() 2014 @dfgrumpy

Page 9: My charts can beat up your charts

Manipulate data based documents using JavaScript

D3.JS

cf.Objective() 2014 @dfgrumpy

Page 10: My charts can beat up your charts

D3.js

Bind arbitrary data (json, tsv, csv) to the DOM.

Manipulate using data-driven transformations.

Not a monolithic framework.

Uses dynamic properties and selectors that somewhat resemble jQuery.

Highly efficient transitions and effects.

cf.Objective() 2014 @dfgrumpy

Page 11: My charts can beat up your charts

D3.js example

cf.Objective() 2014 @dfgrumpy

Page 12: My charts can beat up your charts

D3.js example

@dfgrumpycf.Objective() 2014

Page 13: My charts can beat up your charts

d3.js Demo

cf.Objective() 2014 @dfgrumpy

Page 14: My charts can beat up your charts

Using ColdFusion to power D3.js

Easily create json data

Use Websockets to push data

Create multi-user interactive charts

cf.Objective() 2014 @dfgrumpy

Page 15: My charts can beat up your charts

D3 and CF Demo

cf.Objective() 2014 @dfgrumpy

Page 16: My charts can beat up your charts

D3 Resources

@dfgrumpycf.Objective() 2014

d3js.org

Loads of examples:

bl.ocks.org/mbostock

christopheviau.com/d3list/

techslides.com/over-1000-d3-js-examples-and-demos/

D3 charting API

dimplejs.org

Page 17: My charts can beat up your charts

One more thing….

WebSocket changes ColdFusion 11

Can now use Port 80

Can now be used over SSL

Now supports clustering

Including failover

cf.Objective() 2014 @dfgrumpy

Page 18: My charts can beat up your charts

THANKS

@dfgrumpy

[email protected]

www.cfhour.comDave Ferguson