SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
 
Studying Advantages  of  Components A very academic approach...
Why Components are better! ...better than  what ?
Components –  Have Better Toys! ...using awesome Apotomo* widgets  * the only  real  component framework for Rails!
Apotomo? ,[object Object]
Widgets
Statefulness
Events
Happiness
Dashboards.
Dashboards.
Dashboards.
Reuseability.
Dashboards.
Michał looks  thirsty.
Michał looks  thirsty.
The BeerCell ,[object Object]
Code.
Fix views.
Plug into controller.
Drink. dashboard$ script/generate widget Beer display exists  app/cells/ create  app/cells/beer create  app/cells/beer_cell.rb create  app/cells/beer/display.html.erb
The BeerCell ,[object Object]
Code.
Fix views.
Plug into controller.
Drink. class  BeerCell < Apotomo::StatefulWidget def  display render end end render display.html.erb!
The BeerCell ,[object Object]
Code.
Fix views.
Plug into controller.

Más contenido relacionado

La actualidad más candente

Paras Holidays Europe USA Group Tours 2015 Brochure
Paras Holidays Europe USA Group Tours 2015 BrochureParas Holidays Europe USA Group Tours 2015 Brochure
Paras Holidays Europe USA Group Tours 2015 BrochureParas Holidays Pvt Ltd
 
Snp tables documentation
Snp tables documentationSnp tables documentation
Snp tables documentationMahesh Birajdar
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaJason Noble
 
Story Driven Development With Cucumber
Story Driven Development With CucumberStory Driven Development With Cucumber
Story Driven Development With CucumberSean Cribbs
 
Evolving systems and the link to service orientation
Evolving systems and the link to service orientationEvolving systems and the link to service orientation
Evolving systems and the link to service orientationAngelo van der Sijpt
 
Julius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS ResumeJulius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS ResumeJulius Joseph
 
Continuous Integration Saves the Day
Continuous Integration Saves the DayContinuous Integration Saves the Day
Continuous Integration Saves the DayKurt Schrader
 
Perrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief PensioenPerrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief Pensioenhenk0610
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à RubyMicrosoft
 
Advanced Views with Erector
Advanced Views with ErectorAdvanced Views with Erector
Advanced Views with ErectorAlex Chaffee
 
Ajroumiya
AjroumiyaAjroumiya
Ajroumiyaqienaja
 
Outside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecOutside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecJoseph Wilk
 
How to build testable UIs
How to build testable UIsHow to build testable UIs
How to build testable UIsShi Ling Tai
 
Django O/R Mapper
Django O/R MapperDjango O/R Mapper
Django O/R MapperIan Lewis
 
jQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days TorontojQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days TorontoRalph Whitbeck
 

La actualidad más candente (20)

Device deployment
Device deploymentDevice deployment
Device deployment
 
Paras Holidays Europe USA Group Tours 2015 Brochure
Paras Holidays Europe USA Group Tours 2015 BrochureParas Holidays Europe USA Group Tours 2015 Brochure
Paras Holidays Europe USA Group Tours 2015 Brochure
 
Catalog display
Catalog displayCatalog display
Catalog display
 
Snp tables documentation
Snp tables documentationSnp tables documentation
Snp tables documentation
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp Atlanta
 
Rails by example
Rails by exampleRails by example
Rails by example
 
Story Driven Development With Cucumber
Story Driven Development With CucumberStory Driven Development With Cucumber
Story Driven Development With Cucumber
 
Evolving systems and the link to service orientation
Evolving systems and the link to service orientationEvolving systems and the link to service orientation
Evolving systems and the link to service orientation
 
Julius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS ResumeJulius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS Resume
 
NRI Report
NRI ReportNRI Report
NRI Report
 
Contracts: Tips, Trends & Tactics
Contracts: Tips, Trends & TacticsContracts: Tips, Trends & Tactics
Contracts: Tips, Trends & Tactics
 
Continuous Integration Saves the Day
Continuous Integration Saves the DayContinuous Integration Saves the Day
Continuous Integration Saves the Day
 
Perrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief PensioenPerrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief Pensioen
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
 
Advanced Views with Erector
Advanced Views with ErectorAdvanced Views with Erector
Advanced Views with Erector
 
Ajroumiya
AjroumiyaAjroumiya
Ajroumiya
 
Outside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and RspecOutside-in Development with Cucumber and Rspec
Outside-in Development with Cucumber and Rspec
 
How to build testable UIs
How to build testable UIsHow to build testable UIs
How to build testable UIs
 
Django O/R Mapper
Django O/R MapperDjango O/R Mapper
Django O/R Mapper
 
jQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days TorontojQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days Toronto
 

Destacado

Time to Stop Wasting Time
Time to Stop Wasting TimeTime to Stop Wasting Time
Time to Stop Wasting Timeangiebakke
 
Survive the First Day the Easy Way with Google Forms
Survive the First Day the Easy Way with Google FormsSurvive the First Day the Easy Way with Google Forms
Survive the First Day the Easy Way with Google Formsangiebakke
 
Trevlar Portfolio0809
Trevlar Portfolio0809Trevlar Portfolio0809
Trevlar Portfolio0809trevlar
 
Pensieri Sul Viaggio In Russia2009 2
Pensieri Sul Viaggio In Russia2009 2Pensieri Sul Viaggio In Russia2009 2
Pensieri Sul Viaggio In Russia2009 2Giusi Piras
 
Getting started
Getting startedGetting started
Getting startedREDA BITAR
 
Dra2 online course slide show
Dra2 online course slide showDra2 online course slide show
Dra2 online course slide showangiebakke
 
CRUD Is Not REST! Hypermedia For Y'All!
CRUD Is Not REST! Hypermedia For Y'All!CRUD Is Not REST! Hypermedia For Y'All!
CRUD Is Not REST! Hypermedia For Y'All!apotonick
 

Destacado (10)

Dm Iss
Dm IssDm Iss
Dm Iss
 
Time to Stop Wasting Time
Time to Stop Wasting TimeTime to Stop Wasting Time
Time to Stop Wasting Time
 
Survive the First Day the Easy Way with Google Forms
Survive the First Day the Easy Way with Google FormsSurvive the First Day the Easy Way with Google Forms
Survive the First Day the Easy Way with Google Forms
 
Trevlar Portfolio0809
Trevlar Portfolio0809Trevlar Portfolio0809
Trevlar Portfolio0809
 
Pensieri Sul Viaggio In Russia2009 2
Pensieri Sul Viaggio In Russia2009 2Pensieri Sul Viaggio In Russia2009 2
Pensieri Sul Viaggio In Russia2009 2
 
Windows7sins
Windows7sinsWindows7sins
Windows7sins
 
Getting started
Getting startedGetting started
Getting started
 
Dra2 online course slide show
Dra2 online course slide showDra2 online course slide show
Dra2 online course slide show
 
CRUD Is Not REST! Hypermedia For Y'All!
CRUD Is Not REST! Hypermedia For Y'All!CRUD Is Not REST! Hypermedia For Y'All!
CRUD Is Not REST! Hypermedia For Y'All!
 
Tecido osseo e nervoso
Tecido osseo e nervosoTecido osseo e nervoso
Tecido osseo e nervoso
 

Similar a Have Better Toys

merb.intro
merb.intromerb.intro
merb.intropjb3
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsJohn Brunswick
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialYi-Ting Cheng
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?brynary
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with CucumberBen Mabey
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching ResurrectedBen Scofield
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone InteractivityEric Steele
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentationrailsconf
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On RailsWen-Tien Chang
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaJeff Richards
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overviewreybango
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Codescidept
 
Rails Antipatterns | Open Session with Chad Pytel
Rails Antipatterns | Open Session with Chad Pytel Rails Antipatterns | Open Session with Chad Pytel
Rails Antipatterns | Open Session with Chad Pytel Engine Yard
 
Hacking Movable Type Training - Day 2
Hacking Movable Type Training - Day 2Hacking Movable Type Training - Day 2
Hacking Movable Type Training - Day 2Byrne Reese
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on RailsDiki Andeas
 
Wai Aria - An Intro
Wai Aria - An IntroWai Aria - An Intro
Wai Aria - An IntroMatt Machell
 
Merb Pluming - The Router
Merb Pluming - The RouterMerb Pluming - The Router
Merb Pluming - The Routercarllerche
 

Similar a Have Better Toys (20)

merb.intro
merb.intromerb.intro
merb.intro
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with Cucumber
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching Resurrected
 
EPiServer Web Parts
EPiServer Web PartsEPiServer Web Parts
EPiServer Web Parts
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
 
Front End on Rails
Front End on RailsFront End on Rails
Front End on Rails
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overview
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Rails Antipatterns | Open Session with Chad Pytel
Rails Antipatterns | Open Session with Chad Pytel Rails Antipatterns | Open Session with Chad Pytel
Rails Antipatterns | Open Session with Chad Pytel
 
Hacking Movable Type Training - Day 2
Hacking Movable Type Training - Day 2Hacking Movable Type Training - Day 2
Hacking Movable Type Training - Day 2
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Wai Aria - An Intro
Wai Aria - An IntroWai Aria - An Intro
Wai Aria - An Intro
 
Merb Pluming - The Router
Merb Pluming - The RouterMerb Pluming - The Router
Merb Pluming - The Router
 
Rich faces
Rich facesRich faces
Rich faces
 

Último

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementNuwan Dias
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Alexander Turgeon
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 

Último (20)

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API Management
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 

Have Better Toys

  • 1.  
  • 2. Studying Advantages of Components A very academic approach...
  • 3. Why Components are better! ...better than what ?
  • 4. Components – Have Better Toys! ...using awesome Apotomo* widgets * the only real component framework for Rails!
  • 5.
  • 15. Michał looks thirsty.
  • 16. Michał looks thirsty.
  • 17.
  • 18. Code.
  • 21. Drink. dashboard$ script/generate widget Beer display exists app/cells/ create app/cells/beer create app/cells/beer_cell.rb create app/cells/beer/display.html.erb
  • 22.
  • 23. Code.
  • 26. Drink. class BeerCell < Apotomo::StatefulWidget def display render end end render display.html.erb!
  • 27.
  • 28. Code.
  • 31. Drink. <%= image_tag 'beer.png' , :id => 'beer' %> <%= draggable_element 'beer' %> <%= image_tag 'beer.png' , :id => 'beer' %> <%= draggable_element 'beer' %> <%= image_tag 'beer.png' , :id => 'beer' %> <%= draggable_element 'beer' %> <%= image_tag 'beer.png' , :id => 'beer' %> <%= draggable_element 'beer' %> <%= image_tag 'beer.png' , :id => 'beer' %> <%= draggable_element 'beer' %> I'm ERB .
  • 32.
  • 33. Code.
  • 36. Drink. class ExamplesController < ApplicationController def drink use_widgets do |root| root << cell(:beer, :display, 'a_beer') end @content = render_widget 'a_beer' render end class ExamplesController < ApplicationController def drink use_widgets do |root| root << cell(:beer, :display, 'a_beer') end @content = render_widget 'a_beer' render end class ExamplesController < ApplicationController def drink use_widgets do |root| root << cell (:beer, :display, 'a_beer') end @content = render_widget 'a_beer' render end class ExamplesController < ApplicationController def drink use_widgets do |root| root << cell (:beer, :display, 'a_beer') end @content = render_widget 'a_beer' render end I'm a Rails controller .
  • 37.
  • 38. Code.
  • 42. Wow!
  • 43.
  • 44. Render widgets. I'm a Rails controller with 6 widgets.
  • 45.
  • 46. Render widgets. class DesktopController < ApplicationController def index use_widgets do |root| root << cell(:weather, :forecast, 'my_weather') root << cell(:michal, :sober, 'drinker') root << cell(:todo, :add_item, 'my_form') root << cell(:todo, :count, 'my_counter') root << cell(:beer, :display, 'a_beer') class DesktopController < ApplicationController def index use_widgets do |root| root << cell(:weather, :forecast, 'my_weather') root << cell(: michal , :sober, 'drinker') root << cell(:todo, :add_item, 'my_form') root << cell(:todo, :count, 'my_counter') root << cell(:beer, :display, 'a_beer') class DesktopController < ApplicationController def index use_widgets do |root| root << cell(:weather, :forecast, 'my_weather') root << cell(: michal , : sober , 'drinker') root << cell(:todo, :add_item, 'my_form') root << cell(:todo, :count, 'my_counter') root << cell(:beer, :display, 'a_beer') class DesktopController < ApplicationController def index use_widgets do |root| root << cell(:weather, :forecast, 'my_weather') root << cell(: michal , : sober , ' drinker ') root << cell(:todo, :add_item, 'my_form') root << cell(:todo, :count, 'my_counter') root << cell(:beer, :display, 'a_beer') class DesktopController < ApplicationController def index use_widgets do |root| root << cell(:weather, :forecast, 'my_weather') root << cell(: michal , : sober , ' drinker ') root << cell(:todo, :add_item, 'my_form') root << cell(:todo, :count, 'my_counter') root << cell(:beer, :display, 'a_beer') end @slot_2 = render_widget ('drinker')
  • 47. Michał looks thirsty.
  • 48.
  • 51. Implement drinking state class MichalCell < Apotomo::StatefulWidget def sober @beers = 0 render end class MichalCell < Apotomo::StatefulWidget def sober @beers = 0 render end class MichalCell < Apotomo::StatefulWidget def sober @beers = 0 render end class MichalCell < Apotomo::StatefulWidget def sober @beers = 0 render end class MichalCell < Apotomo::StatefulWidget def sober @beers = 0 render end render sober.html.erb !
  • 52.
  • 55. Implement drinking state <%= image_tag 'michal-sober.jpg', :id => :michal %> <%= drop_receiving_element :michal, :url => trigger_event (:beerDropped) %> <%= image_tag 'michal-sober.jpg', :id => :michal %> <%= drop_receiving_element :michal, :url => trigger_event (:beerDropped) %> <%= image_tag 'michal-sober.jpg', :id => :michal %> <%= drop_receiving_element :michal, :url => trigger_event (:beerDropped) %> I'm sober.html.erb !
  • 56.
  • 59. Implement drinking state beerDropped !
  • 60.
  • 63. Implement drinking state class MichalCell < Apotomo::StatefulWidget def sober @beers = 0 render end class MichalCell < Apotomo::StatefulWidget def sober respond_to_event @beers = 0 render end class MichalCell < Apotomo::StatefulWidget def sober @beers = 0 render end class MichalCell < Apotomo::StatefulWidget def sober respond_to_event :beerDropped, :with => :drinking @beers = 0 render end
  • 64.
  • 67. Implement drinking state def sober respond_to_event :beerDropped, :with => :drinking @beers = 0 render end def drinking @beers += 1 render end def sober respond_to_event :beerDropped, :with => :drinking @beers = 0 render end def drinking @beers += 1 render end def sober respond_to_event :beerDropped, :with => :drinking @beers = 0 render end def drinking @beers += 1 render end def sober respond_to_event :beerDropped, :with => :drinking @beers = 0 render end def drinking @beers += 1 render end def sober respond_to_event :beerDropped, :with => :drinking @beers = 0 render end def drinking @beers += 1 render end I'm stateful ! Render drinking.html.erb !
  • 68.
  • 71. Implement drinking state <%= image_tag &quot;michal-having-#{@beers}-beers.jpg&quot;, :id => :michal %> <%= drop_receiving_element :michal, :url => trigger_event(:beerDropped) %> <%= image_tag &quot;michal-having-#{@beers}-beers.jpg&quot;, :id => :michal %> <%= drop_receiving_element :michal, :url => trigger_event(:beerDropped) %> <%= image_tag &quot;michal-having-#{ @beers }-beers.jpg&quot;, :id => :michal %> <%= drop_receiving_element :michal, :url => trigger_event(:beerDropped) %> I'm drinking.html.erb ! Load michal-having-1-beers.jpg! Load michal-having-2-beers.jpg! Load michal-having-3-beers.jpg! Load michal-having-4-beers.jpg!
  • 72. Wow!
  • 73.
  • 79. ... def drinking @beers += 1 respond_to_event
  • 80.