1 Advanced Object Oriented Systems (CM0318) Lecture 9 (Last modified Thursday 21st February 2002)

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
FUNDAMENTALS OF COMPUTER SYSTEMS OCR GCSE Computing.
Lecture 1 Introduction to the ABAP Workbench
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Structured Problem Solving The Smalltalk Environment.
13. A bit of Smalltalk. © Oscar Nierstrasz 2 Roadmap  The origins of Smalltalk  What is Smalltalk?  Syntax in a nutshell  Seaside — web development.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
JavaScript, Fourth Edition
More OOP Design Patterns
Debugging Logic Errors CPS120 Introduction to Computer Science Lecture 6.
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
Android Application Development 2013 PClassic Chris Murphy 1.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Debugging Cluster Programs using symbolic debuggers.
1 CSC241: Object Oriented Programming Lecture No 27.
MVC and MVP. References enter.html enter.html
S.Ducasse Stéphane Ducasse 1 Processes and Concurrency in VW.
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Computer Science 12 Mr. Jean May 2 nd, The plan: Video clip of the day Review of common errors in programs 2D Arrays.
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
Active-HDL Interfaces Debugging C Code Course 10.
1 Causal-Consistent Reversible Debugging Ivan Lanese Focus research group Computer Science and Engineering Department University of Bologna/INRIA Bologna,
Object-oriented Programming and Design 1 Polymorphism Poly => many Morph => shape Variables take on many shapes, or many classes of objects.
VB – Debugging Tools Appendix D. Why do we need debugging? Every program has errors, and the process of finding these errors is debugging Types of errors.
Introduction to Eclipse. What is Eclipse? An Integrated Development Environment Provides many features to ease C++ programming (and others, e.g. C/Java)
9/2/ CS171 -Math & Computer Science Department at Emory University.
Structured Programming: Debugging and Practice by the end of this class you should be able to: debug a program using echo printing debug a program using.
1 C++ Programming Basics Chapter 1 Lecture CSIS 10A.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
FT228/3 Web Development Error processing. Introduction READ Chapter 9 of Java Server Pages from O’reilly 2 nd Edition Need to be able to 1) Diagnose and.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Model View Controller MVC Web Software Architecture.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
COPYRIGHT 2010: Dr. David Scanlan, CSUS OBJECTIVES: How to write classes How to create an object from a class using the "New" keyword. How to communicate.
Review while loops Control variables Example Infinite loop
1First BlueJ Day, Houston, Texas, 1st March 2006 Debugging in BlueJ Davin McCall.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
Object Arts.com “Twisting the Triad” The evolution of the Dolphin Smalltalk MVP framework Andy Bower Blair McGlashan Object Arts Ltd.
Reconfigurable Communication Interface Between FASTER and RTSim Dec0907.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
Java - hello world example public class HelloWorld { public static void main (String args[]) { System.out.println("Hello World"); }
Copyright Ó Oracle Corporation, All rights reserved Debugging Triggers.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
High degree of user interaction Interactive Systems: Model View Controller Presentation-abstraction-control.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Lecture 5. Example for periority The average waiting time : = 41/5= 8.2.
Programming & Scratch.
Chapter 1: An Introduction to Visual Basic 2015
CIS 470 Mobile App Development
Hands-on Introduction to Visual Basic .NET
Debugging Taken from notes by Dr. Neil Moore
Testing, debugging, and using support libraries
Lecture 5: Functions and Parameters
CS 331 Principles of Programming Languages
Debugging Taken from notes by Dr. Neil Moore
CIS 470 Mobile App Development
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Hello World Program In Visual Studio and Debugging
Presentation transcript:

1 Advanced Object Oriented Systems (CM0318) Lecture 9 (Last modified Thursday 21st February 2002)

2 In this lecture we shall learn... How to debug Smalltalk code effectively How the model-view-controller paradigm is realised in Smalltalk How to discover the structure of a currently- executing application

3 Debugging To find out how your code is working in Smalltalk is a bit different from in most systems, because: –you are running the debugger within a fully functioning Smalltalk system –because of the way many methods, particularly iteration methods, are implemented you often need to step through system code as well as your own –you can normally trace through code that does screen updates with limited success: often the wrong bits of the screen get updated!

4 Example Consider: #(3 4 5) do: [:i| Transcript show: i printString. Transcript cr]

5 When executed...

6 Debugger Can either proceed, abandon execution or enter the debugger at this point. If you select Debug, confronted with a debugger comprising: –call stack –code pane –panes for inspecting the receiver’s instance vars (left bottom) –panes for inspecting the temporary variables of a method (right bottom)

7 Debugger (ctd.) E.g. selecting UndefinedObject>>DoIt causes the code that was executed in the workspace to be displayed. You can ‘step’ through methods (execute to completion) or ‘send’ a message (trace execution through the method involved)

8

9 Stepping through to where do: is sent

10 ‘Sending’ the do: message... End up tracing through the code implementing do:. E.g. just before executing the block for the first time...

11

12 If we now send the message...

13 Tracing code So to trace code productively using Smalltalk, need to be able to understand the system code too It’s a fundamental tenet of Smalltalk that you are expected to be a good code reader!

14 The Model-View-Controller paradigm ViewController Model Dependent

15 MVC (ctd.) Models contain data to be displayed Views display the data Controllers handle user gestures Some Views are pluggable. They: –automatically create a suitable controller to handle user input –specify in their creation methods the messages to send to the model to retrieve the data to be displayed, etc.

16 MVC (ctd.) A top-level window is represented by StandardSystemView/ StandardSystemController. A StandardSystemView will have sub-views, one for each part of the window.

17 Example Code for PluggableTest to create a single list pane. Class method: newExample | model listView1 topView | model ← self new initialize. listView1 ← PluggableListView on: model list: #extraList selected: #extraListSelection changeSelected: #extraListSelection:. topView ← StandardSystemView new label: 'Pluggable Test'; minimumSize: borderWidth: 1; addSubView: listView1. topView borderWidth: 1. topView controller open.

18 New PluggableTest methods extraList ^#('hello' 'world') extraListSelection ^1 extraListSelection: aNumber extraIndex ← aNumber NB: need to define extra instance variable extraIndex

19 Screen dump

20 Exploring interactive applications To find out how System Browsers work, for example, one starting point is the code; another is to break into execution and explore the structure of the System Browser created. This will allow us to inspect the corresponding views and look at super/subviews, at models, etc.

21