SlideShare a Scribd company logo
1 of 67
Life Beyond Rails
Building Cross Platform Applications
DEMO
@parasquid
Chief Problem Solver
at Mindvalley
Why not Ruby on the
browser and on mobile?
Dead end product
So what if voyager can go to
Mars, or dive in the ocean
So what if your hackathon was
written in JS that runs on both
server and client
So what if your legacy code was
written in Ruby (cross platform!)
Can you reuse a
significant portion of the
code you wrote?
Cross platform is useless
if your code can't be
reused.
Reuse of prior work across
multiple platforms is the biggest
reason why you want cross
platform support
“cross platform” is mostly
solved in the physical
world
cable
usb powerbank
usb camera
usb phone
usb ereader
• How does this work?
• Which things can I use this
with?
• What can this do?
• How does this work?
• Which things can I use this
with?
• What can this do?
Encapsulation
Polymorphism
(DESCRIPTOR)
• open()
• close()
• read()
• write()
• seek()
You’re not a beautiful or unique snowflake.
-Tyler Durden, Fight Club
–Linus Torvalds
“Use common tools to
operate on different things.”
principle: common tools operating
on different things
technique: polymorphism
Surface Area of the
API is small
principle: information hiding
technique: encapsulation
Oooh. But I already
know OOP.
OOP is about
programming with objects
OOP is about
programming with
objects
OOP is about the
organization of your
program
• Procedural
• Object Oriented
• Functional
• Prototype based
• Rails-way based
• Hybrid / Combination
How are
things
connected?
Rails is omakase.
I [am] … the head chef of the
omakase experience that is Rails
-DHH
To Rails or not to Rails
–Kent Beck
In a connected system, elements are highly
available to each other (via global state, for
example). Adding the first feature to a
connected system is cheap. All the resources
you need are available. However, the cost of all
those connections is that subsequent features
are very likely to interact with previous features,
driving up the cost of development over time.
–Kent Beck
A modular design has connections deliberately
kept to a minimum. The cost for the first feature
is likely to be higher than in the connected
system, because you need to find the necessary
resources and bring them together, possibly re-
modularizing in the process. Features are much
less likely to interact in a modular system,
though, leading to a steady stream of features at
relatively constant cost.
Stay on the connected curve until the climb
phase, then switch to the modular curve.
Kent Beck
App
Rails
request-response
App
Telnet
Web sockets
streaming
App
RubyMotion
mobile
App
Opal
browser
App
mRuby
hardware
Programming is the act
of managing complexity.
Programming is the act
of managing complexity.
Programming is the act
of managing complexity.
Write flexible,
maintainable,
reusable code
@parasquid
Chief Problem Solver
at Mindvalley

More Related Content

What's hot

Intro to elixir and phoenix
Intro to elixir and phoenixIntro to elixir and phoenix
Intro to elixir and phoenixJared Smith
 
Serverless Application Model - Executing Lambdas Locally
Serverless Application Model - Executing Lambdas LocallyServerless Application Model - Executing Lambdas Locally
Serverless Application Model - Executing Lambdas LocallyAlex
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVMAlan Parkinson
 
Programming for the Internet of Things
Programming for the Internet of ThingsProgramming for the Internet of Things
Programming for the Internet of ThingsKinoma
 
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic BuzzReacting to the Isomorphic Buzz
Reacting to the Isomorphic BuzzBruce Coddington
 
2010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week12010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week1Wolfram Arnold
 
Integration Testing With Cucumber How To Test Anything J A O O 2009
Integration Testing With  Cucumber    How To Test Anything    J A O O 2009Integration Testing With  Cucumber    How To Test Anything    J A O O 2009
Integration Testing With Cucumber How To Test Anything J A O O 2009Dr Nic Williams
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 
Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Erica Windisch
 
Phoenix for Rubyists
Phoenix for RubyistsPhoenix for Rubyists
Phoenix for RubyistsDoug Goldie
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Derek Jacoby
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksServerlessConf
 
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL PluginConfiguration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL PluginDaniel Spilker
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeChi-chi Ekweozor
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
Modernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul JonesModernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul JonesiMasters
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...ServerlessConf
 
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi   SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi Sencha
 

What's hot (20)

Intro to elixir and phoenix
Intro to elixir and phoenixIntro to elixir and phoenix
Intro to elixir and phoenix
 
Serverless Application Model - Executing Lambdas Locally
Serverless Application Model - Executing Lambdas LocallyServerless Application Model - Executing Lambdas Locally
Serverless Application Model - Executing Lambdas Locally
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVM
 
Programming for the Internet of Things
Programming for the Internet of ThingsProgramming for the Internet of Things
Programming for the Internet of Things
 
Reacting to the Isomorphic Buzz
Reacting to the Isomorphic BuzzReacting to the Isomorphic Buzz
Reacting to the Isomorphic Buzz
 
2010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week12010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week1
 
Integration Testing With Cucumber How To Test Anything J A O O 2009
Integration Testing With  Cucumber    How To Test Anything    J A O O 2009Integration Testing With  Cucumber    How To Test Anything    J A O O 2009
Integration Testing With Cucumber How To Test Anything J A O O 2009
 
Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe
 
Untangling11
Untangling11Untangling11
Untangling11
 
Phoenix for Rubyists
Phoenix for RubyistsPhoenix for Rubyists
Phoenix for Rubyists
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New Tricks
 
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL PluginConfiguration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda Lounge
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Modernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul JonesModernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul Jones
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
 
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi   SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
 

Similar to Life Beyond Rails: Building Cross Platform Apps

Concurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple SpacesConcurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple Spacesluccastera
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLBarry Jones
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleIT Arena
 
The FT Web App: Coding Responsively
The FT Web App: Coding ResponsivelyThe FT Web App: Coding Responsively
The FT Web App: Coding ResponsivelyC4Media
 
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"JSFestUA
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Espen Brækken
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on RailsViridians
 
Why you shouldnt use django for that
Why you shouldnt use django for thatWhy you shouldnt use django for that
Why you shouldnt use django for thatIván Stepaniuk
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.jsKasey McCurdy
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?Kasra Khosravi
 
Guide to Destroying Codebases The Demise of Clever Code
Guide to Destroying Codebases   The Demise of Clever CodeGuide to Destroying Codebases   The Demise of Clever Code
Guide to Destroying Codebases The Demise of Clever CodeGabor Varadi
 
Microservice-based software architecture
Microservice-based software architectureMicroservice-based software architecture
Microservice-based software architectureArangoDB Database
 
Simplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsSimplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsRui Carvalho
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#Sireesh K
 

Similar to Life Beyond Rails: Building Cross Platform Apps (20)

Concurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple SpacesConcurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple Spaces
 
Realtime web2012
Realtime web2012Realtime web2012
Realtime web2012
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
Bhavesh ro r
Bhavesh ro rBhavesh ro r
Bhavesh ro r
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
ruby pentest
ruby pentestruby pentest
ruby pentest
 
The FT Web App: Coding Responsively
The FT Web App: Coding ResponsivelyThe FT Web App: Coding Responsively
The FT Web App: Coding Responsively
 
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
 
Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex Ruby on Rails (RoR) as a back-end processor for Apex
Ruby on Rails (RoR) as a back-end processor for Apex
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Why you shouldnt use django for that
Why you shouldnt use django for thatWhy you shouldnt use django for that
Why you shouldnt use django for that
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
WebWorkersCamp 2010
WebWorkersCamp 2010WebWorkersCamp 2010
WebWorkersCamp 2010
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
 
What Web Framework To Use?
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?
 
Guide to Destroying Codebases The Demise of Clever Code
Guide to Destroying Codebases   The Demise of Clever CodeGuide to Destroying Codebases   The Demise of Clever Code
Guide to Destroying Codebases The Demise of Clever Code
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Microservice-based software architecture
Microservice-based software architectureMicroservice-based software architecture
Microservice-based software architecture
 
Simplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsSimplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and tools
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
 

More from Tristan Gomez

Maker's Schedule, Manager's Schedule
Maker's Schedule, Manager's ScheduleMaker's Schedule, Manager's Schedule
Maker's Schedule, Manager's ScheduleTristan Gomez
 
When Javascript isn't Javascript
When Javascript isn't Javascript When Javascript isn't Javascript
When Javascript isn't Javascript Tristan Gomez
 
NuBank - Hyperlocal Banking
NuBank - Hyperlocal BankingNuBank - Hyperlocal Banking
NuBank - Hyperlocal BankingTristan Gomez
 
How I Hire Developers
How I Hire DevelopersHow I Hire Developers
How I Hire DevelopersTristan Gomez
 

More from Tristan Gomez (10)

The Art of Tracking
The Art of TrackingThe Art of Tracking
The Art of Tracking
 
Maker's Schedule, Manager's Schedule
Maker's Schedule, Manager's ScheduleMaker's Schedule, Manager's Schedule
Maker's Schedule, Manager's Schedule
 
When Javascript isn't Javascript
When Javascript isn't Javascript When Javascript isn't Javascript
When Javascript isn't Javascript
 
Slack Bots in Ruby
Slack Bots in RubySlack Bots in Ruby
Slack Bots in Ruby
 
Vue on rails
Vue on railsVue on rails
Vue on rails
 
2FA and OTP
2FA and OTP2FA and OTP
2FA and OTP
 
NuBank - Hyperlocal Banking
NuBank - Hyperlocal BankingNuBank - Hyperlocal Banking
NuBank - Hyperlocal Banking
 
How I Hire Developers
How I Hire DevelopersHow I Hire Developers
How I Hire Developers
 
Nosql kl-2013-04-25
Nosql kl-2013-04-25Nosql kl-2013-04-25
Nosql kl-2013-04-25
 
Meaningful metrics
Meaningful metricsMeaningful metrics
Meaningful metrics
 

Recently uploaded

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Life Beyond Rails: Building Cross Platform Apps

Editor's Notes

  1. I used Ruby to write a streaming app, a request-response app, a client-side web app, and a mobile app.
  2. I'm Tristan, and I'm the Chief Problem Solver at Mindvalley. You can find me on facebook and github @parasquid,
  3. But now, I love Ruby. Its currently my favorite language. It's the hammer I use to solve all the problems that come my way.
  4. If I can just use Ruby all the time, not just for web but also on the frontend, and in mobile, I'll be happy. Then I thought, hey that's a challenge! So I did, and that was the small project I made.
  5. So that's it! It's proof that ruby is cross platform! We can now tell everyone we can also do mobile development, we just need to learn how to compile ruby using RubyMotion. Right? The thing is, I think the meaning of "cross platform" is usually misunderstood.
  6. What does cross platform really mean then? In order to understand that, we need to know what cross platform isn’t. What does Voyager 2, your legacy Rails app, and your hackathon prototype have in common?
  7. They're dead end products. When the Voyager 2 was made, they didn't intend to repair or update it after launch. If there was any glitch or malfunction, the only way to fix it was to launch another probe.
  8. In some ways, it made the design process so much easier. The power cells can be directly welded to the modules because they'll never be taken apart anyway. So what if the antenna can only operate on a fixed frequency? There's no need for a tuning knob because it will never be retuned.
  9. Then again, Voyager 2 will never change, and will never be used for a different purpose. You're not touching your legacy Rails app because you "don't fix it if it ain't broke," and you'd prefer to just rewrite it from scratch anyway. Your hackathon prototype works well for the pitch, but is not suited for production purposes.
  10. It's the same with your code. Ask yourself the question: can you reuse a significant portion of the code you wrote, if by some magical means you can suddenly run your code in a different platform?
  11. Cross platform means absolutely nothing if you can't reuse your code. I'll repeat this again, and you know it's important because I said it twice. Cross platform is useless if your code can't be reused. Interesting isn't it? What benefit is it that ruby runs on an iOS device when you have to rewrite the whole codebase from scratch anyway? You might as well just learn swift and do it the way apple wants you to do it.
  12. Reuse of prior work across multiple platforms is the biggest reason why you want cross platform support. So how do you design your code so that it is reusable?
  13. Let's take a look at the calculator. Notice how the UI and the domain logic are separate. How in this example, we put the React UI, while in this example, we put the telnet UI and here, we put the iOS ui. It's almost as if you're just able to just swap things around just like that! Right? Do you know what this reminds me of?
  14. This. A USB cable.
  15. I can use the same cable to charge a cellphone, a powerbank, a camera, and various other things. They all follow the same standard so they are all interchangeable. And I don't have to know which pin of the USB connects carries the electricity--I just know that if I plug one end to a power source and the other end to the device, it will charge. Nobody would think of making a phone that has its power cable attached and not detachable. Well maybe Apple might.
  16. in majority of the cases, the cross platform problem is solved in the physical world. We intuitively understand how to design products that can be reused. But because software is intangible it's difficult to apply our experience as meatbags to the act of creating software. So what can we take from designing physical products and apply it to software development?
  17. Let's take a look at the USB cable example again.
  18. Remember when I said they all follow the same standard? That means the USB cable can treat different objects in the same way. They all have the same USB interface, so from the point of view of the cable, they're all the same thing (even though they're not).
  19. How about when I said that I need to care about the electromotive force or which pins carry the electricity? That means I don't even have to know how the cable was made in order to use it! I also immediately know that the cable is not for drying my hair, or for opening a can. It was less complicated because the list of things I can do with the cable was small, and the kinds of things I can use the cable was also small.
  20. In effect, you’re replacing the questions on the left with this one question on the right. You’re reducing the surface area of the complexity involved. I think some of you would already know where I’m going here.
  21. Instead of asking how does this work, or which things can I use this with, I now just ask: what can this do? Encapsulation: What vs How Polymorphism: What vs Which These two might sound familiar. You'd know them from Object Oriented Programming.
  22. But they’re not purely the domain of OOP Here’s an example. what does a storage device, an input device, and a network socket have in common?
  23. From the Unix perspective, they’re all files. Everything is a file Well technically, everything is a file descriptor. But have you ever wondered how is this possible? How can you have an operating system treating everything as if it’s a file?
  24. There are generally five functions you need to implement if you want to write a device driver for a Unix system. open close read write seek If you implement these (and note that returning nil is an implementation; just take a look at /dev/null) then you conform to the file descriptor POSIX API specification.
  25. That also means you get the benefits of getting treated just like every other file. Or, just like what Tyler Durden from fight club says: you are not a beautiful or unique snowflake. And that’s a good thing!
  26. That means that you can use common tools to operate on different things. Whether it’s a storage device, a network stream, or the keyboard circular buffer, you can use the common unix tools to operate on them even if you don’t care about whether the device responds — just use /dev/null
  27. in this case, common tools operating on different things is the principle, polymorphism is the technique
  28. you can also have encapsulation without oop in fact, you’re using it all the time. when you open your browser and go to google.com you don’t really care about how google retrieved the search results; all you’re interested in is what the search results are.
  29. in a sense, your only public interface is that of the search bar. it represents the big, complicated machinery that is called google search, and presents it as something that can be easily understood.
  30. A more code related example: Let’s take a quick look at the calculator brain. Notice how the Brain class only has a few exposed methods, out of which two are used in react: display, input_char. Three if you count new which creates an object out of the class.
  31. Here’s the object that have its methods exposed. This isn’t the best implementation of a calculator, but that’s okay. Notice that I can easily refactor or rewrite this entirely without severely affecting the UI framework. Because the UI framework only know about a few very specific api calls, they don’t know a lot about how the brain operates. They are shielded from changes in the brain.
  32. That’s because this object has a very small surface area. Note the distinction here. I didn’t say that the object was small - it really isn't. I said that its surface area is small. If you've ever encountered God objects in your code (hint: check all files in your code that end with "service") then you know the problem very well. You have a very hard time debugging your application because it's just so big and complex!
  33. Well. You see, the problem isn't that those objects are too big.
  34. It’s because God objects are too fat. When your objects try to expose a lot of methods in its interface, the API surface area of your objects is too wide. And that makes your app complex and difficult to manage because these APIs will get used, and you need to remember all of these things. What connects to where?
  35. so the principle here is information hiding, and the technique is encapsulation. this concept allows you to represent something really big and complex with something small and simple by exposing a small surface api.
  36. But yeah, we all know about this already, right? Ruby is OOP, we use OOP all the time! Here's the thing: If you ask many programmers what OOP is about, they’ll just tell you it’s using objects to do stuff.
  37. They’ll tell you that OOP is about programming with objects. It’s not, that’s just a tautology--saying the same thing twice in different words.
  38. So no. It’s not just about programming with objects.
  39. It’s a different way of thinking about your code, where you tell an object what you want, instead of asking data from it. It is a method of organization. And it’s just one of many.
  40. Just like Functional, Prototype-based, Rails-way based, or a combination of these are. They are all ways to organize your program so you can more easily figure out how things are connected. I think we're doing ourselves a disservice by not going back to basics and experiencing for ourselves a whole new different way of writing our apps.
  41. If you want to write cross platform apps, you need to write reusable code. Unfortunately, the Rails way of writing apps is not enough.
  42. That doesn’t mean that the Rails way is “wrong” or that we should stop using it because it “promotes bad habits” a framework is, after all, just a tool and it is up to the programmer to decide how to use it.
  43. DHH famously said that Rails is Omakase, that he is the head chef that decides the experience that is Rails. And this arrangement has been great because Rails is an awesome framework that makes it really easy to make web applications. And that is where we run into a problem with cross platform support; the Rails way is too web centric that it’s very difficult to reuse prior work for other platforms.
  44. Does that mean we should just not use Rails or any other framework at all? Not at all.
  45. This is Kent Beck, he is the founder of Extreme Programming, the precursor to what we now call agile software development, and from where we get the scrum methodology. One of his papers talked about connected and modular designs, and the Rails way falls quite near to the connected design model. Here’s what he said:
  46. This is one of the reasons why Rails apps can be built so fast. I join hackathons, and I always use Rails because it’s really so easy to just build features because I have access to everything. It’s one of the reasons why bootcamps and one day tutorials can show people the power of programming—because producing a usable output is so easy. Here’s the next thing he said:
  47. and so we have a problem. A mature system benefits from a modular design. We know about the factory factory jokes in java, but the reason why there’s so much code monkeys in enterprise application development is because the modular design allows easy distribution of work. but it’s so costly to start modular
  48. The advice then, is not to ditch connected designs. Kent Beck recommends to stay on the connected curve until the climb phase, then switch to the modular curve.
  49. How do you know when the climb phase begins? That’s when experience comes in. How would you even know what to switch to if you’re not familiar with how modular designs look like?
  50. We need to find that knowledge to organize your code as if it was a USB cable. That would be really cool. If you wanted to swap the UI, all you needed to do is to write the UI layer for that framework.
  51. It would look something like this [request-response] Rails -- App [streaming] Telnet/Websockets -- App [mobile] RubyMotion -- App [browser] Opal -- App [hardware] mRuby -- App
  52. — end of illustrations
  53. The rails way is what we're familiar with. Many of us started learning ruby because of rails. I got reintroduced to ruby because Mindvalley uses rails.
  54. But my point is, that it’s not the only code-organization technique out there. And we haven’t been seeking them out. Have you tried any of these? Have you tried to at least deviate a little bit from the Rails way? Here you have a command-query separation by Bertrand Meyer, here you have event sourcing which says that all changes to an application state should be stored as a sequence of events, and here we have the DCI paradigm which builds on top of OOP.
  55. Our industry is still young, but is now mature enough to recognize that there are many different ways to skin a cat. These are just a few presentations tackling a different face of the same issue: we are too web centric because the Rails way makes it easy to write web applications
  56. Tightly coupling with the rails framework works great if you want to create apps that are similar to Basecamp, you’re targeting web only, and you know that's the final iteration of your product. But sometimes, your app is far out different from basecamp. If you are planning to reuse a significant portion of your code across platforms, the rails way is not enough. But more importantly, it’s not the only organizational technique available to you.
  57. I think that as programmers, we need to start looking beyond what we’re comfortable with, and start rediscovering solutions to problems that have been solved by other disciplines.
  58. But if you had only one idea to take home with you, let it be this: that programming is fundamentally an activity by humans, for humans. Many people think that programming equals coding, and that’s really disappointing. That’s just scratching the surface, because programming is more than that.
  59. Programming is the act of managing complexity.
  60. We often make the mistake of thinking that we're programming for the computer. No, your computer won't run your program faster solely because you used a well designed architecture. But YOU will be faster, because your wonderful but still limited brain can now comprehend the relationships in the code.
  61. By organizing our code and designing it so it’s easy to understand, we free our brains and give it space to think about the stuff that really matters: what is your app supposed to do?
  62. When you start focusing on that question, and start expanding your toolbox, you end up with more flexible, maintainable, and reusable code. And that’s it. That’s the answer. That's how you write cross platform apps.
  63. I'm Tristan, and I'm the Chief Problem Solver at Mindvalley. You can find me on facebook and github @parasquid Thank you