DevOpsDays Baltimore March 2017 - Continuous Integration: A bittersweet love story
EmberCLI Rails: An Integration Love Story.
-
Upload
jonathan-jackson -
Category
Technology
-
view
446 -
download
2
Transcript of EmberCLI Rails: An Integration Love Story.
![Page 1: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/1.jpg)
EmberCLI RailsAn Integration Love Story
![Page 2: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/2.jpg)
Jonathan Jackson @rondale_sc
rondale-sc
jonathan-jackson.net
![Page 3: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/3.jpg)
![Page 4: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/4.jpg)
![Page 5: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/5.jpg)
![Page 8: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/8.jpg)
Jonathan Jackson @rondale_sc
rondale-sc
jonathan-jackson.net
![Page 9: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/9.jpg)
What I’ll be covering
![Page 10: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/10.jpg)
• A brief intro to Ember.js
• The History of Rails and Ember
• Introduction to EmberCLI Rails gem
• Goals of the EmberCLI Rails project
![Page 11: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/11.jpg)
A Brief Intro to Ember.js
![Page 12: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/12.jpg)
—Luke Melia
“98% of building good apps is understanding
your layers and knowing what code should go
where.”
![Page 13: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/13.jpg)
MVC
![Page 14: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/14.jpg)
Well, Kinda.
![Page 15: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/15.jpg)
More like MVCR+
![Page 16: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/16.jpg)
Router• Application state
• Updates URL per route transition
![Page 17: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/17.jpg)
Models• Persisting Objects
![Page 18: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/18.jpg)
Views• DOM Interactions
• DOM events to semantic actions
![Page 19: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/19.jpg)
Controllers• Presenting data for view layer to render
![Page 20: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/20.jpg)
Why Ember.js is appealing to Rails developers.
![Page 21: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/21.jpg)
Yehuda
![Page 22: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/22.jpg)
Convention over configuration
![Page 23: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/23.jpg)
Shared nomenclature*
![Page 24: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/24.jpg)
Emphasis on meaningful URLs
![Page 25: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/25.jpg)
Focus on testing
![Page 26: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/26.jpg)
Rails <3 Ember• Yehuda
• Convention over configuration
• Shared nomenclature*
• Emphasis on meaningful URLs
• Focus on Testing
![Page 28: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/28.jpg)
The History of Rails and Ember
![Page 30: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/30.jpg)
Ember Rails (gem)
x
Rails
• Globals (still)
• File Structure
• Precompiled templates into asset pipeline
API Testing GeneratorsAsset Compilation
Asset Serving
![Page 31: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/31.jpg)
Ember AppKit• precursor to EmberCLI
• Grunt build tooling
• ES6 transpilation
• Solid project structure
• Frontend/backend package management via NPM/Bower
![Page 32: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/32.jpg)
Bower
![Page 33: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/33.jpg)
Upgrades are hard!
![Page 34: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/34.jpg)
xx
Ember AppKit Rails (gem)
API Testing GeneratorsAsset Compilation
Asset Serving
Rails Ember
• Rails generators for AppKit resources
• Tests accessible in Rails-land
• Simple API versioning
• Compiled to AMD
![Page 35: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/35.jpg)
Upgrades are hard!
![Page 36: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/36.jpg)
EmberCLI• Successor of Ember AppKit
• Broccoli as a build tool
• Testing harness out of the box
• Constant improvements
• Addons
![Page 37: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/37.jpg)
Upgradability• Solid upgrade path with `ember init`
• guided upgrade with blueprints used for diff
![Page 38: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/38.jpg)
Complete Separation
• Tested independently
• Allows for greater specialization
• Flexible backend
• Separation of concerns at a system level
xxAPI Testing GeneratorsAsset Compilation
Asset Serving
Testing
Rails Ember
![Page 39: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/39.jpg)
No full-stack acceptance testing conventions
![Page 40: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/40.jpg)
Ad hoc development workflows
![Page 41: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/41.jpg)
![Page 42: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/42.jpg)
Doesn't work well with existing applications
![Page 43: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/43.jpg)
Deployments become more complicated
![Page 44: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/44.jpg)
![Page 45: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/45.jpg)
The pitfalls of complete separation
• No full-stack acceptance testing conventions
• Ad hoc solutions to development workflow
• Doesn't work with existing applications
• Without excessive duplication
• Deployments become more complicated (conventions)
![Page 46: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/46.jpg)
The EmberCLI Rails gem
Somewhere in Between...
![Page 47: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/47.jpg)
Responsibilities of EmberCLI Rails
xAPI Testing
Rails
x GeneratorsAsset Compilation
Asset Serving
Testing
Ember
x x
RAT
GeAssAs
E
![Page 48: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/48.jpg)
Responsibilities of EmberCLI Rails
x x
Rails
API
Testing
Generators
Asset Compilation
Asset Serving
Ember
![Page 49: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/49.jpg)
How does it work?
![Page 50: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/50.jpg)
![Page 51: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/51.jpg)
How do I use it?
![Page 52: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/52.jpg)
We start with a Rails app...
![Page 53: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/53.jpg)
![Page 54: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/54.jpg)
![Page 55: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/55.jpg)
![Page 56: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/56.jpg)
Goals of the EmberCLI Rails Project
![Page 57: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/57.jpg)
![Page 58: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/58.jpg)
Maybe we have some time for a demo?
demo
demo2 - shameless plug
![Page 59: EmberCLI Rails: An Integration Love Story.](https://reader031.fdocuments.in/reader031/viewer/2022032422/55a929271a28abca768b47bb/html5/thumbnails/59.jpg)
Jonathan Jackson @rondale_sc
rondale-sc
jonathan-jackson.net