SlideShare a Scribd company logo
Finally living objects  in your Rails UI
cells with interactive behaviour and  statefulness
communicating through events
The name?
Apotomo
 
after this talk...
...i want you to be scared of Apotomo
What is Apotomo? ,[object Object],[object Object],[object Object]
it's all about...
[object Object]
[object Object],[object Object],[object Object]
Any benefits? from this “stateful widget” thing?
“ stateful ” ,[object Object],[object Object]
“ widget “ ,[object Object],[object Object]
“ widget “ ,[object Object],[object Object]
“ widget “ ,[object Object],[object Object]
“ widget “ ,[object Object],[object Object]
“ widget “ ,[object Object],[object Object]
Who's me? ,[object Object],[object Object],[object Object],[object Object]
I'm currently working on... wickedornot.com
wickedornot.com
a mixture of blog/game/community
wickedornot.com
you upload products and you can rate other users
wickedornot.com
you can comment stuff
wickedornot.com
you can upload pictures for that product
wickedornot.com
“interesting.”
[object Object],[object Object],[object Object],[object Object],[object Object]
let's look at the gallery
 
[object Object]
[object Object]
[object Object]
how do we implement that?
Start : the WidgetTree ,[object Object],[object Object],[object Object],[object Object]
I start by adding a container widget
 
 
 
I keep adding fine-graind child widgets to the container
 
 
 
 
each widget has some corresponding view in the app
#cell ,[object Object],[object Object],[object Object],[object Object],[object Object]
What we just got ,[object Object],[object Object],[object Object]
wow, we just covered...
My widgets should be... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
meaning... ,[object Object],[object Object]
How do we plug in these widgets into the actual application?
#act_as_widget ,[object Object]
meaning we're referencing to the gallery container
#act_as_widget
#act_as_widget
[object Object]
and process its events
what we get is a nice, interactive gallery!
 
another composing examble would be the tabs!
a nice tab panel, within rails!
it's all about adding tabs to the panel
 
 
and adding actual content widets to the tabs
 
Tab  and  TabPanel  are out-of-the-box widgets and are shipped with Apotomo (just for your convenience)
next:  statefulness ?
example: the upload thing
it's a commonly used upload form
 
it is already added somewhere in the WidgetTree
somewhere in the WidgetTree... ,[object Object],[object Object]
a widget goes to its  start state   when it's rendered the first time
now we're going to  look  at the actual, concrete source of the upload widget
app/cells/product_image_cell.rb ,[object Object],[object Object],[object Object]
the  new.html.erb  looks like...
app/cells/product_image/new.html.erb ,[object Object],[object Object]
[object Object],[object Object]
in other words...
...when submitting the form we are  sending  the upload widget to  another state
:new :create
let's look at the next state
once again, the widget code
the state  :create ,[object Object],[object Object],[object Object],[object Object],[object Object]
either ways, the widget will automatically update its view on the screen
where did that  @image  come from?
[object Object],[object Object]
the state is preserved! @image @image :new :create
So, this is  stateful ,[object Object]
So, this is  stateful ,[object Object]
My widgets should be... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
so, this was an upload, but...
how do the fellow widgets know, there is a new image uploaded?
?
why not use an event?
when the upload was ok...
...we  trigger  an event
[object Object]
[object Object]
The answer: use an  EventHandler !
adding EventHandlers I ,[object Object],[object Object]
adding EventHandlers II ,[object Object],[object Object]
let's have a  quick  look at the  triggering  process
the  newImage  event is triggered
it bubbles up ,[object Object],[object Object]
?
?
[object Object],?
and it  fires  the EventHandler  we just attached with  #watch
the fired  EventHandler  will advise  the thumbnails widget  to  update  itself
a new thumbnail appears
 
and the newly uploaded picture appears in full-screen
 
Great - although the  upload  widget  didn't even know there  is  a thumbnail gallery...
it just updated  a bunch  of other widgets
My widgets should be... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
and now?  reusability ?
reusability – sharing behaviour ,[object Object]
reusability – sharing behaviour ,[object Object]
reusability – sharing behaviour ,[object Object]
for example
 
 
this is a widget for rating  a product
we could  reuse  that widget in an iPhone mobile version, too!
[object Object],[object Object],[object Object]
 
a mobile controller
again, we're referencing a widget  in the widget tree in  #act_as_widget
 
 
[object Object],[object Object]
have a look at the mobile controller
 
My widgets should be... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Finally, some neat stuff!
Apotomo  wraps  YUI widgets
example: the  DataTable  in  YUI
example: the  DataTable  in  YUI ,[object Object],[object Object],[object Object]
just to show off how  awesome  Apotomo is...
I'm gonna embed the  DataTable   in my wickedornot.com app
by adding a new Tab
embedding the DataTable
 
 
 
let's have a brief look at this cool  MyDataTable  widget
app/cells/my_data_table_cell.rb
all we gotta do...
inheriting from  YUI::DataTable
adding columns
fill the data store with ...data
[object Object]
paging?
works all out-of-the-box
My widgets should be... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Come on, one more!
what about adding some observing widget?
watching for clicks in the  DataTable ?
this could look like...
add an observing widget
the implementation in the WidgetTree would be...
 
 
 
again, the  #watch  just means
“watch out for a  cellClick  event!”
“if you see one, update the observer!”
CLICK!
 
to summarize that
[object Object],[object Object]
I clicked a cell in the grid
this triggered an event, actually in  Apotomo
[object Object],in  Ruby
Enough!
There is more!
Caching
Caching
Testing ,[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enough for today...
Enough for today... are you scared of Apotomo?

More Related Content

Similar to Apotomo Goes Rubyconf

The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...
Katy Slemon
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid drawinfo_zybotech
 
iOS Development (Part 2)
iOS Development (Part 2)iOS Development (Part 2)
iOS Development (Part 2)
Asim Rais Siddiqui
 
JetBot basic motion
JetBot basic motionJetBot basic motion
JetBot basic motion
PeiJia5
 
IOS Storyboards
IOS StoryboardsIOS Storyboards
IOS Storyboards
Muhammad Nabeel Arif
 
How tomakea gameinunity3d
How tomakea gameinunity3dHow tomakea gameinunity3d
How tomakea gameinunity3d
Dao Tung
 
IOS Swift language 1st Tutorial
IOS Swift language 1st TutorialIOS Swift language 1st Tutorial
IOS Swift language 1st Tutorial
Hassan A-j
 
Bowtie: Interactive Dashboards
Bowtie: Interactive DashboardsBowtie: Interactive Dashboards
Bowtie: Interactive Dashboards
Jacques Kvam
 
Java beans
Java beansJava beans
Java beans
Ramraj Choudhary
 
SwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory ManagementSwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory Management
WannitaTolaema
 
Inside Flutter: Widgets, Elements, and RenderObjects
Inside Flutter: Widgets, Elements, and RenderObjectsInside Flutter: Widgets, Elements, and RenderObjects
Inside Flutter: Widgets, Elements, and RenderObjects
Hansol Lee
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
veeracynixit
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
veeracynixit
 
Modular View Controller Hierarchies
Modular View Controller HierarchiesModular View Controller Hierarchies
Modular View Controller Hierarchies
René Cacheaux
 
Different types of sticker apps
Different types of sticker appsDifferent types of sticker apps
Different types of sticker apps
Jelena Krmar
 
28-GUI application.pptx.pdf
28-GUI application.pptx.pdf28-GUI application.pptx.pdf
28-GUI application.pptx.pdf
NguynThiThanhTho
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
Celine George
 
Alfresco - You probably didn't know that
Alfresco - You probably didn't know thatAlfresco - You probably didn't know that
Alfresco - You probably didn't know that
David Ciamberlano
 

Similar to Apotomo Goes Rubyconf (20)

The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid draw
 
iOS Development (Part 2)
iOS Development (Part 2)iOS Development (Part 2)
iOS Development (Part 2)
 
JetBot basic motion
JetBot basic motionJetBot basic motion
JetBot basic motion
 
IOS Storyboards
IOS StoryboardsIOS Storyboards
IOS Storyboards
 
How tomakea gameinunity3d
How tomakea gameinunity3dHow tomakea gameinunity3d
How tomakea gameinunity3d
 
IOS Swift language 1st Tutorial
IOS Swift language 1st TutorialIOS Swift language 1st Tutorial
IOS Swift language 1st Tutorial
 
Bowtie: Interactive Dashboards
Bowtie: Interactive DashboardsBowtie: Interactive Dashboards
Bowtie: Interactive Dashboards
 
V2vdata
V2vdataV2vdata
V2vdata
 
Java beans
Java beansJava beans
Java beans
 
SwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory ManagementSwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory Management
 
Inside Flutter: Widgets, Elements, and RenderObjects
Inside Flutter: Widgets, Elements, and RenderObjectsInside Flutter: Widgets, Elements, and RenderObjects
Inside Flutter: Widgets, Elements, and RenderObjects
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Modular View Controller Hierarchies
Modular View Controller HierarchiesModular View Controller Hierarchies
Modular View Controller Hierarchies
 
I phone versus windows phone 7 coding
I phone versus windows phone 7 codingI phone versus windows phone 7 coding
I phone versus windows phone 7 coding
 
Different types of sticker apps
Different types of sticker appsDifferent types of sticker apps
Different types of sticker apps
 
28-GUI application.pptx.pdf
28-GUI application.pptx.pdf28-GUI application.pptx.pdf
28-GUI application.pptx.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Alfresco - You probably didn't know that
Alfresco - You probably didn't know thatAlfresco - You probably didn't know that
Alfresco - You probably didn't know that
 

Recently uploaded

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

Apotomo Goes Rubyconf