atlascamp 2015: how hipchat ships at the speed of awesome

38
how HipChat ships at the speed of awesome ISSAC GERGES SENIOR DEVELOPER HIPCHAT @GERGES

Upload: atlassian

Post on 05-Aug-2015

92 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: AtlasCamp 2015: How HipChat ships at the speed of awesome

how HipChat ships at the speed of awesome

ISSAC GERGES • SENIOR DEVELOPER • HIPCHAT • @GERGES

Page 2: AtlasCamp 2015: How HipChat ships at the speed of awesome

HipChat web-client v1 architecture

Page 3: AtlasCamp 2015: How HipChat ships at the speed of awesome

HipChat web-client v1 architecture

Page 4: AtlasCamp 2015: How HipChat ships at the speed of awesome

2 files

6,720lines of javascript

0

Page 5: AtlasCamp 2015: How HipChat ships at the speed of awesome

0unit tests

Page 6: AtlasCamp 2015: How HipChat ships at the speed of awesome

2deploys per month

oh my!

Page 7: AtlasCamp 2015: How HipChat ships at the speed of awesome

operation isn’t a fun game

Page 8: AtlasCamp 2015: How HipChat ships at the speed of awesome

round 2

Page 9: AtlasCamp 2015: How HipChat ships at the speed of awesome

React

reusable performant components with

+ JSX

Page 10: AtlasCamp 2015: How HipChat ships at the speed of awesome

React

var Link = require(‘./link');

module.exports = React.createClass({

displayName: "RightSideBarLinks",

render: function(){

return ( <div> _.map(this.props.links, (link) => { return <Link key={link.id} name={link.user_name} url={link.url} users={this.props.users} time={link.time} display_url={link.display_url}/>; }); </div> ); } });

// Easy to define a reusable component

// JSX for easy to read component markup

Page 11: AtlasCamp 2015: How HipChat ships at the speed of awesome

return <Link key={link.id} name={link.user_name} url={link.url} users={this.props.users} time={link.time} display_url={link.display_url}/>;

return ( <div>

); </div>

React + JSX

_.map(this.props.links, (link) => {

});

Page 12: AtlasCamp 2015: How HipChat ships at the speed of awesome

);

return (

React.createElement(Link, { key: link.id, name: link.user_name, url: link.url, users: this.props.users, time: link.time, display_url: link.display_url });

<div>

</div>

React + JSX

_.map(this.props.links, (link) => {

});

Page 13: AtlasCamp 2015: How HipChat ships at the speed of awesome

);

React.createElement("div", {},

React.createElement(Link, { key: link.id, name: link.user_name, url: link.url, users: this.props.users, time: link.time, display_url: link.display_url });

);

return (

React + JSX

_.map(this.props.links, (link) => {

});

// Every render returns an object

// Easy to tell if anything’s changed and React can apply a delta to the DOM

Page 14: AtlasCamp 2015: How HipChat ships at the speed of awesome

no nonsense architecture with

Flux

Page 15: AtlasCamp 2015: How HipChat ships at the speed of awesome

Controller Model

MVC

ModelModelModelModelModelModel ViewViewViewViewViewViewView

Page 16: AtlasCamp 2015: How HipChat ships at the speed of awesome
Page 17: AtlasCamp 2015: How HipChat ships at the speed of awesome

Controller Model

MVC

ModelModelModelModelModelModel ViewViewViewViewViewViewView

Page 18: AtlasCamp 2015: How HipChat ships at the speed of awesome

Model

Model

Model

Model

Model

Model

Model

View

View

View

View

View

View

View

MVC

Controller

Page 19: AtlasCamp 2015: How HipChat ships at the speed of awesome

Action Dispatcher Store

Flux

View

Page 20: AtlasCamp 2015: How HipChat ships at the speed of awesome

Action Dispatcher Store

Flux

View

Page 21: AtlasCamp 2015: How HipChat ships at the speed of awesome

ViewStoreActionDispatcher

Flux

ActionAction

StoreStore

ViewView

Page 22: AtlasCamp 2015: How HipChat ships at the speed of awesome

build chain

webpack

Page 23: AtlasCamp 2015: How HipChat ships at the speed of awesome

gulp

webpack

build

+

transform and package the app

Page 24: AtlasCamp 2015: How HipChat ships at the speed of awesome

gulp test

lint, and verify

+ESLint

Page 25: AtlasCamp 2015: How HipChat ships at the speed of awesome

gulp docpublish API documentation

Page 26: AtlasCamp 2015: How HipChat ships at the speed of awesome

gulp release

bump, commit, tag, push, release

+

Page 27: AtlasCamp 2015: How HipChat ships at the speed of awesome

branch builds ftw

Page 28: AtlasCamp 2015: How HipChat ships at the speed of awesome

git clone [email protected]:hipchat/web-client.git

git branch issue/my-fix

gulp test

git push

hotfix development

git commit -am “oops”

Page 29: AtlasCamp 2015: How HipChat ships at the speed of awesome

gulp release

cap deploy staging

hotfix deployment

cap deploy testing

cap deploy production

Page 30: AtlasCamp 2015: How HipChat ships at the speed of awesome

identifying issues

Page 31: AtlasCamp 2015: How HipChat ships at the speed of awesome

experimenting

Page 32: AtlasCamp 2015: How HipChat ships at the speed of awesome

experimenting

Gourgessoft

Issac Gerges

Issac Gerges

Issac Gerges

sure

I’d love to learn about integrations

how about files?

Page 33: AtlasCamp 2015: How HipChat ships at the speed of awesome

experimenting

Page 34: AtlasCamp 2015: How HipChat ships at the speed of awesome

250sensible modules

Page 35: AtlasCamp 2015: How HipChat ships at the speed of awesome

1500unit tests

Page 36: AtlasCamp 2015: How HipChat ships at the speed of awesome

3deploys per week

Page 37: AtlasCamp 2015: How HipChat ships at the speed of awesome

Thank you!

ISSAC GERGES • SENIOR DEVELOPER • HIPCHAT • @GERGES

Page 38: AtlasCamp 2015: How HipChat ships at the speed of awesome

How HipChat Ships at the Speed of Awesome

Submit your feedback: go.atlassian.com/acawesome