Memento Alex “J Lo” Brian C Kiefer. Definitions  A Memento is a way to create an object that previously existed a tiny repository that saves an object’s.

Slides:



Advertisements
Similar presentations
How to Import an Excel File Using the SAS Import Wizard SAS 9 for Windows.
Advertisements

                      Digital Audio 1.
1 CSCI N305 C Language Programming Welcome to CSCI N305! Compiling Your First Program Using Microsoft Visual Studio 2008.
FIRST COURSE Getting Started with Microsoft Office 2007.
Mail. Overview Introduction Composing Sending an Attachment Viewing Downloading an Attachment Replying Deleting.
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
A New Soar Debugger in Java Douglas Pearson ThreePenny Software
FIRST COURSE Getting Started with Microsoft Office 2007.
MC365 XML Parsers. Today We Will Cover: An overview of the Java API’s used for XML processing Creating an XML document in Java Parsing an XML document.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Behavioral Pattern: Memento C h a p t e r 5 – P a g e 179 Objects frequently expose only some of their internal state using public methods, but there.
XML User Interface Language (XUL) Karl Strength April 16, 2006.
Using Linux Text Editors. Use Non-Graphical Linux Text Editors Graphical Text Editor.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
A First Program Using C#
CLARIN tools for workflows Overview. Objective of this document  Determine which are the responsibilities of the different components of CLARIN workflows.
PowerPoint Essentials
Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session.
EARTH SCIENCE MARKUP LANGUAGE “Define Once Use Anywhere” INFORMATION TECHNOLOGY AND SYSTEMS CENTER UNIVERSITY OF ALABAMA IN HUNTSVILLE.
Tutorial 1: Getting Started with Adobe Dreamweaver CS4.
Windows Internet Explorer 9 Chapter 1 Introduction to Internet Explorer.
Introduction to Matlab & Data Analysis
Agenda Using vi Editor Starting vi Session Command / Input Modes Entering Text Editing Text Saving vi Session Aborting Editing Session.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 13 – Advanced.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
CS370 Spring 2007 CS 370 Database Systems Lecture 1 Overview of Database Systems.
XP Practical PC, 3e Chapter 3 1 Installing and Learning Software.
FIRST COURSE Getting Started with Microsoft Office 2007 COM111 Introduction to Computer Applications.
Lecture 19 Serialization Richard Gesick. Serialization Sometimes it is easier to read or write entire objects than to read and write individual fields.
PASSOLO ® Makes Your Software Ready for the Global Market Localisation Standards The Tools Developer’s Perspective.
Why Linux and Not Windows?
Getting Started with Linux Linux System Administration Editors.
Chapter Three The UNIX Editors.
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
1 Lesson 11 Exploring Microsoft Office 2010 Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
XPath. XPath, the XML Path Language, is a query language for selecting nodes from an XML document. The XPath language is based on a tree representation.
Fall UI Design and Implementation1 Lecture 15: Undo.
1.5 LooGix.com Experience and Creation Meg Moring.
PYP002 Intro.to Computer Science Microsoft Word1 Lab 04 - a Microsoft Windows Applications Common Features.
Editing, vi and Configuration Files Unix/IP Preparation Course July 19, 2009 Eugene, Oregon, USA
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
CMPF124 Personal Productivity With Information Technology Chapter 1 – Part 2 Introduction to Windows Operating Systems Manipulating Windows GUI CMPF 124.
1 After completing this lesson, you will be able to: Open a file. Navigate through a document. Scroll through a document. Insert text in a document. Select.
Files in Python The Basics. Why use Files? Very small amounts of data – just hardcode them into the program A few pieces of data – ask the user to input.
Getting Started with Linux Linux System Administration Editors.
1 Lesson 11 Exploring Microsoft Office 2010 Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
1 CSE 331 Memento Pattern and Serialization slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 11 Exploring Microsoft Office Morrison / Wells / Ruffolo.
Software Development Languages and Environments. Computer Languages Just as there are many human languages, there are many computer programming languages.
COMPREHENSIVE Getting Started with Microsoft Office 2007.
Multimedia Summer Camp
Getting Started with Microsoft Office 2007
Fundamentals of Python: First Programs
How to Import an Excel File
The Object-Oriented Thought Process Chapter 12
More examples How many processes does this piece of code create?
Force Field Analysis Introducing any change can be challenging. A useful way to assess the situation is to consider forces driving and restraining change.
Review: Design Pattern Structure
funCTIONs and Data Import/Export
Fundamentals of Python: First Programs
CSE 331 Memento Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia
Fundaments of Game Design
1 Word Processing Part I.
Understanding Browsers
Script server.
Production Manager Tools (New Architecture)
Presentation transcript:

Memento Alex “J Lo” Brian C Kiefer

Definitions  A Memento is a way to create an object that previously existed a tiny repository that saves an object’s state

Challenge 19.1  What a few reasons that you might choose to saving a memento in a file rather than as an object?

Challenge 19.1  What a few reasons that you might choose to saving a memento in a file rather than as an object? The ability to restore an object’s state has to survive a system crash. You anticipate that the user will exit the system and will want to resume work later. You need to reconstruct an object on another computer.

Applications of Memento  Undo Your favorite feature  Persistent Storage  String output

Challenge  What is the best data structure to use for Undo?

Challenge  What is the best data structure to use for Undo? Stack

Challenge  What is the best data structure to use for Undo? Stack  How can Java assist you in using Memento for persistent storage?

Challenge  What is the best data structure to use for Undo? Stack  How can Java assist you in using Memento for persistent storage? Serialization XML parsing

Challenge 19.5  What are the disadvantages of storing an object as text?

Challenge 19.5  What are the disadvantages of storing an object as text? Encapsulation flies out the window. Anyone with a text editor can manipulate the object’s data. For this approach to work, you must be able to parse the text, either using XML parser or writing your own parser for a proprietary format. A textual representation may be much larger than an object serialization with the same information.

Challenge 19.5b  What are the advantages of storing an object as text?

Challenge 19.5b  What are the advantages of storing an object as text? Anyone with a text editor can verify an object’s data. Anyone with a text editor can manipulate an object’s data—an advantage in some contexts. It is often easier to pass text between systems than it is to setup interchange with RMI, CORBA, or other protocols.

Summary  Used for undo and redo Forward and Back buttons  Can be used for saving files Via serialization Via strings

Questions? Comments? Can’t remember something?

Exercise Console browser, without browsing… 1. Implement a back command 2. Implement a forward command 3. Implement saving session to disk See demo program and problem explanation at