SlideShare a Scribd company logo
Thursday, February 19, 2009
Agenda

                    • General Framework Overview
                    • What Prototype Isn’t
                    • The Ninja Database
                    • Questions?

Thursday, February 19, 2009
jQuery
                               Awesome.




Thursday, February 19, 2009
Prototype
                                Awesome.




Thursday, February 19, 2009
Frameworks
                                 Awesome.




Thursday, February 19, 2009
Javascript
                                Awesome.




Thursday, February 19, 2009
Browsers?



Thursday, February 19, 2009
Prototype ==
                                 jQuery
                 Come on, they all basically do the same thing.




Thursday, February 19, 2009
Ruby in the
                               Browser?
                                 Not quite.




Thursday, February 19, 2009
AJAX
                              The umbrella term




Thursday, February 19, 2009
So why Prototype?



Thursday, February 19, 2009
Light as a … NO.
Thursday, February 19, 2009
Quick as a … NO.
Thursday, February 19, 2009
jQuery is Champ.
Thursday, February 19, 2009
Prototype Has
                                    Muscle.
                    • Class Creation
                    • Insertion
                    • DOM Element
                              Creation
                    • Events
                    • Custom Events
                    • Scope Binding
                    • AJAX

Thursday, February 19, 2009
The Ninja Database



Thursday, February 19, 2009
Thursday, February 19, 2009
Controlling Class
                Instance via Firebug
                    • Creating a class instance with
                              optional parameters

                    • Inserting custom instances into the
                              DOM

                    • Accessing the public API of a class
                              instance

                    • Class instances maintain state
Thursday, February 19, 2009
Thursday, February 19, 2009
Controlling Class
                Instance via Firebug
                    • Creating a class instance with
                              optional parameters

                    • Inserting custom instances into the
                              DOM

                    • Accessing the public API of a class
                              instance

                    • Class instances maintain state
Thursday, February 19, 2009
But what does the
                         DOM look like?


Thursday, February 19, 2009
Thursday, February 19, 2009
How is this
                     elegance possible?


Thursday, February 19, 2009
Constructors




Thursday, February 19, 2009
Overwrite Options
                            During




Thursday, February 19, 2009
Insert Anything.
                                Element#insert(anything);




Thursday, February 19, 2009
Programmatically
                           Create Elements




Thursday, February 19, 2009
Events
                 Use the DOM as a notification system for your
                                   class.




Thursday, February 19, 2009
Standard DOM
                                  Events




Thursday, February 19, 2009
Standard DOM
                                  Events




Thursday, February 19, 2009
Standard DOM
                                     Events



                                          Function#bind(this)
                                        Your best friend when using classes.
                              Allows referencing instance variables in an event listener.



Thursday, February 19, 2009
Custom Events Too




Thursday, February 19, 2009
Custom Events Too




Thursday, February 19, 2009
Custom Events Too




Thursday, February 19, 2009
Custom Events Too




Thursday, February 19, 2009
Custom Events Too




Thursday, February 19, 2009
AJAX
                              Everybody’s doing it.




Thursday, February 19, 2009
Thursday, February 19, 2009
Evaluate JSON




Thursday, February 19, 2009
Questions?

                    • http://github.com/camwest/
                              refresh-prototype-talk

                    • http://bigbangtechnology.com/blog



Thursday, February 19, 2009

More Related Content

Similar to Refresh Events Prototype

Michael Tamblyn - 6 Projects That Could Change Publishing for the Better
Michael Tamblyn - 6 Projects That Could Change Publishing for the BetterMichael Tamblyn - 6 Projects That Could Change Publishing for the Better
Michael Tamblyn - 6 Projects That Could Change Publishing for the Better
BookNet Canada
 
Introduction to Agile and SCRUM
Introduction to Agile and SCRUMIntroduction to Agile and SCRUM
Introduction to Agile and SCRUMSumeet Moghe
 
Introduction to Agile and SCRUm
Introduction to Agile and SCRUmIntroduction to Agile and SCRUm
Introduction to Agile and SCRUmSumeet Moghe
 
Nanite (And An Introduction To Cloud Computing)
Nanite (And An Introduction To Cloud Computing)Nanite (And An Introduction To Cloud Computing)
Nanite (And An Introduction To Cloud Computing)will_j
 
Edo Cabinet
Edo CabinetEdo Cabinet
Edo Cabinet
John Mettraux
 
Online marketing (tactical)
Online marketing (tactical)Online marketing (tactical)
Online marketing (tactical)
Pinny Gniwisch
 
TimesOpen Keynote: Technology and the Future of the Newspaper
TimesOpen Keynote: Technology and the Future of the NewspaperTimesOpen Keynote: Technology and the Future of the Newspaper
TimesOpen Keynote: Technology and the Future of the Newspaper
Tim O'Reilly
 
The State of the Web: back to the Middle Ages
The State of the Web: back to the Middle AgesThe State of the Web: back to the Middle Ages
The State of the Web: back to the Middle Ages
Bart De Waele
 
Vladimir Oane
Vladimir OaneVladimir Oane
Vladimir Oane
evensys
 
Building a website, McGill Course
Building a website, McGill CourseBuilding a website, McGill Course
Building a website, McGill Course
Pinny Gniwisch
 
Diggin Diigo
Diggin DiigoDiggin Diigo
Designing Your Future:Networking without the Ick
Designing Your Future:Networking without the IckDesigning Your Future:Networking without the Ick
Designing Your Future:Networking without the Ick
Cindy Li
 
090514 Circom The Future Of Tv Today
090514 Circom   The Future Of Tv Today090514 Circom   The Future Of Tv Today
090514 Circom The Future Of Tv Today
Vincent Everts
 
Linq Refresher
Linq RefresherLinq Refresher
Linq Refresher
buildmaster
 
Web2.0 - wat is dat beest?
Web2.0 - wat is dat beest?Web2.0 - wat is dat beest?
Web2.0 - wat is dat beest?
Bart De Waele
 
21c School Libraries Leading Learning
21c School Libraries Leading Learning21c School Libraries Leading Learning
21c School Libraries Leading Learning
Judy O'Connell
 
Web 2.0 - Teaching and Learning in the Cloud
Web 2.0 - Teaching and Learning in the CloudWeb 2.0 - Teaching and Learning in the Cloud
Web 2.0 - Teaching and Learning in the Cloud
Chris Penny
 
Flash Lite Optimization
Flash Lite OptimizationFlash Lite Optimization
Flash Lite Optimization
Thomas Joos
 

Similar to Refresh Events Prototype (20)

Michael Tamblyn - 6 Projects That Could Change Publishing for the Better
Michael Tamblyn - 6 Projects That Could Change Publishing for the BetterMichael Tamblyn - 6 Projects That Could Change Publishing for the Better
Michael Tamblyn - 6 Projects That Could Change Publishing for the Better
 
Introduction to Agile and SCRUM
Introduction to Agile and SCRUMIntroduction to Agile and SCRUM
Introduction to Agile and SCRUM
 
Introduction to Agile and SCRUm
Introduction to Agile and SCRUmIntroduction to Agile and SCRUm
Introduction to Agile and SCRUm
 
Nanite (And An Introduction To Cloud Computing)
Nanite (And An Introduction To Cloud Computing)Nanite (And An Introduction To Cloud Computing)
Nanite (And An Introduction To Cloud Computing)
 
Edo Cabinet
Edo CabinetEdo Cabinet
Edo Cabinet
 
Bnc Pd Day Bellwoods
Bnc Pd Day BellwoodsBnc Pd Day Bellwoods
Bnc Pd Day Bellwoods
 
Online marketing (tactical)
Online marketing (tactical)Online marketing (tactical)
Online marketing (tactical)
 
TimesOpen Keynote: Technology and the Future of the Newspaper
TimesOpen Keynote: Technology and the Future of the NewspaperTimesOpen Keynote: Technology and the Future of the Newspaper
TimesOpen Keynote: Technology and the Future of the Newspaper
 
The State of the Web: back to the Middle Ages
The State of the Web: back to the Middle AgesThe State of the Web: back to the Middle Ages
The State of the Web: back to the Middle Ages
 
Vladimir Oane
Vladimir OaneVladimir Oane
Vladimir Oane
 
Building a website, McGill Course
Building a website, McGill CourseBuilding a website, McGill Course
Building a website, McGill Course
 
Diggin Diigo
Diggin DiigoDiggin Diigo
Diggin Diigo
 
Designing Your Future:Networking without the Ick
Designing Your Future:Networking without the IckDesigning Your Future:Networking without the Ick
Designing Your Future:Networking without the Ick
 
090514 Circom The Future Of Tv Today
090514 Circom   The Future Of Tv Today090514 Circom   The Future Of Tv Today
090514 Circom The Future Of Tv Today
 
Ethics
EthicsEthics
Ethics
 
Linq Refresher
Linq RefresherLinq Refresher
Linq Refresher
 
Web2.0 - wat is dat beest?
Web2.0 - wat is dat beest?Web2.0 - wat is dat beest?
Web2.0 - wat is dat beest?
 
21c School Libraries Leading Learning
21c School Libraries Leading Learning21c School Libraries Leading Learning
21c School Libraries Leading Learning
 
Web 2.0 - Teaching and Learning in the Cloud
Web 2.0 - Teaching and Learning in the CloudWeb 2.0 - Teaching and Learning in the Cloud
Web 2.0 - Teaching and Learning in the Cloud
 
Flash Lite Optimization
Flash Lite OptimizationFlash Lite Optimization
Flash Lite Optimization
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
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
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
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
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
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
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
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 !
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
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
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
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 -...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

Refresh Events Prototype

Editor's Notes

  1. Big Bang Technology, June 2008, Max Cameron, iPhone, Web Dev, Flex Development, Bigbangtechnology.com
  2. abstract away inconsitencies in browser. each does it different functionally equivalent small differences in edge cases
  3. interesting history. one of the first modern JavaScript frameworks designed to mimic the Ruby in the browser.
  4. Interactive sophisticated programs in the browser. Typically without page refreshes.
  5. Most of those accomplishments go to jQuery, and I'd highly recommend using it for most simple JavaScript implementations.
  6. * visual representation of the class instances * events are bound * loaded via ajax from a json feed
  7. Creating a class instance with optional parameters Inserting custom instances into the DOM Accessing the public API of a class instance Class instances maintain state regardless of whether they are in the DOM or not.
  8. explain the html structure of the dom nodes
  9. Object.extend overrides default options with whatever is passed into the constructor If something isn’t passed in, the default value is used
  10. you can take any DOM element and use the .insert method on it to insert custom classes as long as they implement toElement as an instance method.
  11. Element is a class built just like Ninja. It takes two arguments, the tag name, and a hash of attribute values that you’d like to see on the element. Update is an Element method that lets you add elements or text as children
  12. if you don’t use bind on event listeners. “this” references the element that dispatched the event. but we want to reference the class instance to access properties inside it. interpolate makes adding variables to strings a lot easier
  13. custom events need to be bound to dom elements. use custom events for public methods that change the visual appearance of the class
  14. iterate through the JSON to create new class instances for each record found. typically would be database driven. don’t forget to store a reference to the class instance or JavaScript will garbage collect it
  15. Notice how the JSON feed is styled with the same key values as our class constructor options.