SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Undo History with Flight
Change the Past.
Intoduction
Tyler Wright – www.xtyler.com

Flight Framework – www.flightxd.com
    Robert Taylor – www.roboncode.com
    Jacob Wright – jacwright.com

Resources: www.xtyler.com/history
Ctrl+Z
   Desktop Applications
   Browser TextFields


   What about Rich Internet Applications?




Users can enjoy making mistakes
Flight Framework
 an application framework
 an undo framework
 a command factory
 a data binding fiend
 a way to get dates
Anatomy of Undo
   Undoable Action
       means of reverting that action
       recover from a single mistake

   Memory of actions
       queue of undoable actions
       recover from a history of mistakes



Change the past.
Anatomy of Undo
‱ Undoable Action
‱ Action Memory
Generic vs. Specific
  One-size fits all           Everyone is special

“automatic”                 custom

centralized logic handles   separate logic for undo on
undo on all actions         each action

actions must fit the mold   every action unique
Command your Actions
Methods define our system’s actions

State is represented by local data – goes away
Command: an objectified method, storing local data
Portable – pass around the system as an object
Implement to an Interface
Interfaces: create types by contract

ICommand
    execute():void

IUndoableCommand
    undo():void
    redo():void
CommandHistory
Undo & Redo “right out of the box”

ICommandInvoker
   executeCommand(command:ICommand):void

ICommandHistory
   canUndo():Boolean, canRedo():Boolean
   undo():Boolean, redo():Boolean
   undoLimit:int, etc

Action Memory Realized
Commands become our undoable actions
CommandHistory becomes our memory of actions
Generic heart Specific
      One-size fits all                  Everyone is speaical

    “automatic”                        custom

    single command to                  a separate Command for
    represent all actions              each action




Marriage by Command
Consolidates these approaches.
Provides a single interface to undo and redo.
Mix approaches or migrate from one to another without changing API.
Your First History Lesson
The History Panel
   Photoshop
   Flash


The Project
   (break to code right here)


On Into the Details
Short-term Memory
Undo limits

Considering stored data
types

Clearing memory –
release event listeners and
bindings

Weak-referenced event
listeners and binding

Saving history to disk
Merging
Actions repeated

IMergingCommand
    merge (source:Object):Boolean

Originating Command inspects fellows before
discarding them – self reflection leads to a greater self

Compared to MacroCommands
Flight Framework Reloaded
Offers the HistoryController as an extension of application-
level Controllers

Command Factory
    addCommand(type:String, commandClass:Class):void
    createCommand(type:String):ICommand

Enables direct upgrade from a common application to one
with undo and redo, minimal changes

Much more

Change the Past.
Tyler Wright – www.xtyler.com

Flight Framework – www.flightxd.com
    Robert Taylor – www.roboncode.com
    Jacob Wright – jacwright.com

Resources: www.xtyler.com/history

Weitere Àhnliche Inhalte

Ähnlich wie Tyler Wright - Undo History with Flight

Windows Remote Management - EN
Windows Remote Management - ENWindows Remote Management - EN
Windows Remote Management - EN
Kirill Nikolaev
 
Memento Pattern Implementation
Memento Pattern ImplementationMemento Pattern Implementation
Memento Pattern Implementation
Steve Widom
 
A Practical Event Driven Model
A Practical Event Driven ModelA Practical Event Driven Model
A Practical Event Driven Model
Xi Wu
 

Ähnlich wie Tyler Wright - Undo History with Flight (20)

Windows Remote Management - EN
Windows Remote Management - ENWindows Remote Management - EN
Windows Remote Management - EN
 
JSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph PicklJSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph Pickl
 
Memento Pattern Implementation
Memento Pattern ImplementationMemento Pattern Implementation
Memento Pattern Implementation
 
Handling Exceptions In C & C++ [Part B] Ver 2
Handling Exceptions In C & C++ [Part B] Ver 2Handling Exceptions In C & C++ [Part B] Ver 2
Handling Exceptions In C & C++ [Part B] Ver 2
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
Complex Event Processing - A brief overview
Complex Event Processing - A brief overviewComplex Event Processing - A brief overview
Complex Event Processing - A brief overview
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Andrzej Ludwikowski - Event Sourcing - co moĆŒe pĂłjƛć nie tak?
Andrzej Ludwikowski -  Event Sourcing - co moĆŒe pĂłjƛć nie tak?Andrzej Ludwikowski -  Event Sourcing - co moĆŒe pĂłjƛć nie tak?
Andrzej Ludwikowski - Event Sourcing - co moĆŒe pĂłjƛć nie tak?
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
Test First Refresh Second: Test-Driven Development in Grails
Test First Refresh Second: Test-Driven Development in GrailsTest First Refresh Second: Test-Driven Development in Grails
Test First Refresh Second: Test-Driven Development in Grails
 
Test First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in GrailsTest First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in Grails
 
A Practical Event Driven Model
A Practical Event Driven ModelA Practical Event Driven Model
A Practical Event Driven Model
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
Software for embedded systems complete
Software for embedded systems completeSoftware for embedded systems complete
Software for embedded systems complete
 
Concurrecny inf sharp
Concurrecny inf sharpConcurrecny inf sharp
Concurrecny inf sharp
 
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
 

Mehr von 360|Conferences

Mehr von 360|Conferences (20)

InsideMobile Keynote
InsideMobile KeynoteInsideMobile Keynote
InsideMobile Keynote
 
Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4
 
Ben Elmore - Do You Speak Flex
Ben Elmore - Do You Speak FlexBen Elmore - Do You Speak Flex
Ben Elmore - Do You Speak Flex
 
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
 
Joe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UXJoe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UX
 
Bryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projectsBryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projects
 

KĂŒrzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

KĂŒrzlich hochgeladen (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

Tyler Wright - Undo History with Flight

  • 1. Undo History with Flight Change the Past.
  • 2. Intoduction Tyler Wright – www.xtyler.com Flight Framework – www.flightxd.com Robert Taylor – www.roboncode.com Jacob Wright – jacwright.com Resources: www.xtyler.com/history
  • 3. Ctrl+Z Desktop Applications Browser TextFields What about Rich Internet Applications? Users can enjoy making mistakes
  • 4. Flight Framework an application framework an undo framework a command factory a data binding fiend a way to get dates
  • 5. Anatomy of Undo Undoable Action means of reverting that action recover from a single mistake Memory of actions queue of undoable actions recover from a history of mistakes Change the past.
  • 6. Anatomy of Undo ‱ Undoable Action ‱ Action Memory
  • 7. Generic vs. Specific One-size fits all Everyone is special “automatic” custom centralized logic handles separate logic for undo on undo on all actions each action actions must fit the mold every action unique
  • 8. Command your Actions Methods define our system’s actions State is represented by local data – goes away Command: an objectified method, storing local data Portable – pass around the system as an object
  • 9. Implement to an Interface Interfaces: create types by contract ICommand execute():void IUndoableCommand undo():void redo():void
  • 10. CommandHistory Undo & Redo “right out of the box” ICommandInvoker executeCommand(command:ICommand):void ICommandHistory canUndo():Boolean, canRedo():Boolean undo():Boolean, redo():Boolean undoLimit:int, etc

  • 11. Action Memory Realized Commands become our undoable actions CommandHistory becomes our memory of actions
  • 12. Generic heart Specific One-size fits all Everyone is speaical “automatic” custom single command to a separate Command for represent all actions each action Marriage by Command Consolidates these approaches. Provides a single interface to undo and redo. Mix approaches or migrate from one to another without changing API.
  • 13. Your First History Lesson The History Panel Photoshop Flash The Project (break to code right here) On Into the Details
  • 14. Short-term Memory Undo limits Considering stored data types Clearing memory – release event listeners and bindings Weak-referenced event listeners and binding Saving history to disk
  • 15. Merging Actions repeated IMergingCommand merge (source:Object):Boolean Originating Command inspects fellows before discarding them – self reflection leads to a greater self Compared to MacroCommands
  • 16. Flight Framework Reloaded Offers the HistoryController as an extension of application- level Controllers Command Factory addCommand(type:String, commandClass:Class):void createCommand(type:String):ICommand Enables direct upgrade from a common application to one with undo and redo, minimal changes Much more

  • 17. Change the Past. Tyler Wright – www.xtyler.com Flight Framework – www.flightxd.com Robert Taylor – www.roboncode.com Jacob Wright – jacwright.com Resources: www.xtyler.com/history