Object-Oriented Programming

Total Page:16

File Type:pdf, Size:1020Kb

Object-Oriented Programming 2/28/2008 Why Study Smalltalk CSE 3302 Programming Languages • Purest OO language, encourage OO programming • Can inspect and change objects and the runtime system itself at run time Object-Oriented • Pioneered in many things – GhilGraphical user inter face (WidM(Window, Menu, M)Mouse) Programming – Personal workstation – Push OO into success • I invented the term Object-Oriented, and I can tell you I Chengkai Li did not have C++ in mind. -- Alan Kay Spring 2008 • Has an active community • Could have deserved more popularity Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 1 CSE3302 Programming Languages, UT-Arlington 2 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 Key Features History • Very simple syntax • 1967: Inspired by Simula67, the first OO language • Everything is object • 1971: Started by Dynabook project (Alan Kay) 3, true, nil – Hardware: GUI, pointing device, external storage, etc. Class is object • Later led to Alto (“laptop”) no control: if, loop are objects – Software: for Children • Dyyyypnamically typed: • Became Smallta lk – Variable has no type. – The class hierarchy is the type system. – Education • The language is together with its interactive runtime system – Runtime written in the language itself Is Dynabook realized? Kay doesn’t think so: – Can change the system on-the-fly – Squeak – Debug system state (image), object, class hierarchy – One Laptop Per Child project (Nicholas Negroponte, Alan Kay, …) • All data is private (protected), all methods are public. http://www.xogiving.org/ • No manual memory management and pointers Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 3 CSE3302 Programming Languages, UT-Arlington 4 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 History (cont.) Smalltalk Today • 1973: Xerox Alto Computer – First Smalltalk environment • Squeak – The ALTO Computer 1974 - Video – Seaside: a dynamic web application development framework • http://www.maniacworld.com/alto-computer- video.html – Croquet: an open source platform for collaborative 3D multi-user online applications. • 1972: Smalltalk-72 – Sophie: a digital media assembly tool to create multimedia • 1976: Smalltalk-76 documents. • 1980: Smalltalk-80 – Scratch: a toolkit for children to write games, animated • Major contributors of Smalltalk: stories. Alan Kay (2003 Turing Award), Adele Goldberg, Daniel Ingalls, • Cincom VisualWorks, IBM VisualAge, GNU Smalltalk, Dolphin, et. Al. …. Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 5 CSE3302 Programming Languages, UT-Arlington 6 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 1 2/28/2008 Resources Required Reading Squeak: Readings: • Download at http://www.squeak.org/ • Quick Tutorial: • Smalltalk by Example, Chapter 1-6 ADA Deve lopment Examp le for Squea k39k 3.9 (Chapter 7-9 are also recommended, http://squeak.preeminent.org/tut2007/html/ especially sections related to Array) • A Free Book: Squeak by Example • Section "10.6 Smalltalk" in the textook. http://www.iam.unibe.ch/~scg/SBE/ Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 7 CSE3302 Programming Languages, UT-Arlington 8 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 Smalltalk, Squeak video • http://www.youtube.com/watch?v=y_3l08tI5 wQ • http://video.google.com/videoplay?docid=-29 50949730059754521 The langgguage is tog ether with its • http://video.google.com/videoplay?docid=-90 interactive runtime system 55536763288165825 Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 9 CSE3302 Programming Languages, UT-Arlington 10 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 Smalltalk Runtime Squeak Demo • The files (.exe .changes, .img, .sources) • Runtime written in the language itself • Menu and Mouse (red-button (usually left button), yellow-button (usually right • Can change the system on-the-fly button), blue-button(Alt+red, “morphic halo”) ) • Debug system state (image), object, class • Save changes into .img and .sources hierarc hy • TitTranscript: systlltem console, log • Workspace: Run code snippet, text documents, … • do it, print it, inspect it, explore it • System Browser (Class, Object, Instance variable, Method) • Hierarchy Browser • Method Finder Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 11 CSE3302 Programming Languages, UT-Arlington 12 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 2 2/28/2008 Demo: Race Car Demo: Quinto Game http://www.youtube.com/watch?v=y_3l08tI5wQ Squeak by Example, Chapter 2 Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 13 CSE3302 Programming Languages, UT-Arlington 14 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 Demo: Quinto Game Demo: Quinto Game 1. Create new class category: SBE-Quinto 3. Add methods: initialize newCell := SBECell new. 2. Define new class: SBECell Message initialize will be Object subclass: #NameOfSubclass initialize automatically sent to the newly created instanceVariableNames: '' super initialize. object when the class has an class Var iblNiableNames: '' self label: ''. initialize method. poolDictionaries: '' self borderWidth: 2. category: ‘SBE-Quinto‘ newCell initialize. bounds := 0@0 corner: 16@16. SimpleSwitchMorph subclass: #SBECell offColor := Color paleYellow. Message: instanceVariableNames: 'mouseAction' onColor := Color paleBlue darker. classVariableNames: '' class compiled poolDictionaries: '' self useSquareCorners. category: ‘SBE-Quinto' self turnOff Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 15 CSE3302 Programming Languages, UT-Arlington 16 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 Demo: Quinto Game Demo: Quinto Game 6. Add methods: SBEGame>>initialize 4. Inspect an object initialize SBECell new (inspect it) | sampleCell width height n | self openInWorld (do it) super initialize. n := self cellsPerSide. 5. Add new class: SBEGame sampleCell := SBECell new. BorderedMorph subclass: #SBEGame width := sampleCell width. instanceVariableNames: ‘cells' height := sampleCell height. self bounds: (5@5 extent: ((width*n) @(height*n)) + (2 * classVariableNames: '' self borderWidth)). poolDictionaries: '' cells := Matrix new: n tabulate: [ :i :j | self category: 'SBE-Quinto' newCellAt: i at: j ]. 7. Put methods into category (protocol) Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 17 CSE3302 Programming Languages, UT-Arlington 18 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 3 2/28/2008 Demo: Quinto Game Demo: Quinto Game 8. Two more methods for SBECell 9. more methods for SBEGame mouseAction: aBlock For annotation only, mouseAction := aBlock cellsPerSide not the language syntax. "The number of cells along each side of the game" mouseUp: anEvent ^10 mouseAction value toggleNeighboursOfCellAt: i at: j (i > 1) ifTrue: [ (cells at: i - 1 at: j ) toggleState]. (i < self cellsPerSide) ifTrue: [ (cells at: i + 1 at: j) toggleState]. (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. (j < self cellsPerSide) ifTrue: [ (cells at: i at: j + 1) toggleState]. Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 19 CSE3302 Programming Languages, UT-Arlington 20 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 Demo: Quinto Game Demo: Quinto Game 9 . More SBEGame methods 9. more SBEGame methods initialize newCellAt: i at: j | sampleCell width height n | "Create a cell for position (i,j) and add it to my on--screen super initialize. representation at the appropriate screen position. Answer the n := self cellsPerSide. new cell" sampleCell := SBECell new. width := sampleCell width. height := sampleCell height. | c origin | self bounds: (5 @ 5 extent: width * n @ (height * n) + (2 * c := SBECell new. self borderWidth)). origin := self innerBounds origin. cells := Matrix new: n tabulate: [:i :j | self newCellAt: i at: self addMorph: c. j] c position: ((i -1) * c width) @ ((j -1) * c height) + origin. c mouseAction: [self toggleNeighboursOfCellAt: i at: j]. ^c Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 21 CSE3302 Programming Languages, UT-Arlington 22 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 Demo: Quinto Game Demo: MineSweeper • File Out and File In Lecture 13 – OO Programming, Lecture 13 – OO Programming, CSE3302 Programming Languages, UT-Arlington 23 CSE3302 Programming Languages, UT-Arlington 24 Spring 2008 ©Chengkai Li, 2008 Spring 2008 ©Chengkai Li, 2008 4.
Recommended publications
  • Type Feedback for Bytecode Interpreters Position Paper ICOOOLPS 2007
    Type Feedback for Bytecode Interpreters Position Paper ICOOOLPS 2007 Michael Haupt1, Robert Hirschfeld1, and Marcus Denker2 1 Software Architecture Group Hasso-Plattner-Institut University of Potsdam, Germany 2 Software Composition Group Institute of Computer Science and Applied Mathematics University of Berne, Switzerland michael.haupt,hirschfeld @hpi.uni-potsdam.de, [email protected] { } Abstract. This position paper proposes the exploitation of type feed- back mechanisms, or more precisely, polymorphic inline caches, for purely interpreting implementations of object-oriented programming languages. Using Squeak’s virtual machine as an example, polymorphic inline caches are discussed as an alternative to global caching. An implementation proposal for polymorphic inline caches in the Squeak virtual machine is presented, and possible future applications for online optimization are outlined. 1 Introduction Bytecode interpreters are small in size and comparatively easy to implement, but generally execute programs much less efficiently than just-in-time (JIT) compilers. Techniques like threaded interpretation [9, 11, 2] focus on speeding up bytecode interpretation itself, and caching [4, 5, 1] improves the performance of message sends—the most common operation in object-oriented software [7]. It is interesting to observe that, while threading mechanisms are used natu- rally to a varying degree in bytecode interpreter implementations, such systems usually employ only global caching to speed up dynamic method dispatch. A global cache is clearly beneficial with respect to overall performance. Still, it does not provide optimal support for polymorphic message send sites, and it does not allow for exploiting type information (we provide details on these issues in the following section). In our opinion, the employment of polymorphic inline caches (PICs) [5] instead can provide means for achieving significant speedups in bytecode interpreters while exhibiting only a moderate increase in memory footprint and implementation complexity.
    [Show full text]
  • A Tour of the Squeak Object Engine
    A Tour of the Squeak Object Engine A Tour of the Squeak Object Engine Tim Rowledge, [email protected] Introduction This chapter is intended to explain some basics of how a Virtual Machine (VM) works, why a VM is useful, what it does for the Squeak programmer and user, and how the Squeak VM might develop in the future. What is a Virtual Machine and why do we need one? A Virtual Machine provides us with a pretense of being a machine other than the actual hardware in use. Using one allows systems that behave differently than the host hardware to run as if on hardware designed for them. The term Object Engine is less commonly used but is a useful concept that includes the lowest system areas of the langauge environment running on the VM. Since there is often some flux in the definition of which components are within the actual VM and which are part of the supported environment, Object Engine is useful as a more inclusive term. The term Virtual Machine is used in several ways. When IBM refer to VM/CMS they are referring to a way of making a mainframe behave as if it is many machines, so that programs can assume they have total control even though they do not. Intel provide a somewhat similar facility in the x86 architecture(?), referred to as Virtual Mode. This sort of VM is a complete hardware simulation, often supported at the lowest level by the hardware. Another sort of VM is the emulator - SoftWindows for the Mac, Acorn's !PC, Linux's WINE are good examples - where another machine and/or OS is simulated to allow a Mac user to run Windows programs, an Acorn RiscPC or a Linux machine to run Windows98 programs and so on.
    [Show full text]
  • Smalltalk Language Mapping Specification
    Smalltalk Language Mapping Specification New Edition: June 1999 Copyright 1995, 1996 BNR Europe Ltd. Copyright 1998, Borland International Copyright 1991, 1992, 1995, 1996 Digital Equipment Corporation Copyright 1995, 1996 Expersoft Corporation Copyright 1996, 1997 FUJITSU LIMITED Copyright 1996 Genesis Development Corporation Copyright 1989, 1990, 1991, 1992, 1995, 1996 Hewlett-Packard Company Copyright 1991, 1992, 1995, 1996 HyperDesk Corporation Copyright 1998 Inprise Corporation Copyright 1996, 1997 International Business Machines Corporation Copyright 1995, 1996 ICL, plc Copyright 1995, 1996 IONA Technologies, Ltd. Copyright 1996, 1997 Micro Focus Limited Copyright 1991, 1992, 1995, 1996 NCR Corporation Copyright 1995, 1996 Novell USG Copyright 1991,1992, 1995, 1996 by Object Design, Inc. Copyright 1991, 1992, 1995, 1996 Object Management Group, Inc. Copyright 1996 Siemens Nixdorf Informationssysteme AG Copyright 1991, 1992, 1995, 1996 Sun Microsystems, Inc. Copyright 1995, 1996 SunSoft, Inc. Copyright 1996 Sybase, Inc. Copyright 1998 Telefónica Investigación y Desarrollo S.A. Unipersonal Copyright 1996 Visual Edge Software, Ltd. The companies listed above have granted to the Object Management Group, Inc. (OMG) a nonexclusive, royalty-free, paid up, worldwide license to copy and distribute this document and to modify this document and distribute copies of the modified ver- sion. Each of the copyright holders listed above has agreed that no person shall be deemed to have infringed the copyright in the included material of any such copyright holder by reason of having used the specification set forth herein or having con- formed any computer software to the specification. PATENT The attention of adopters is directed to the possibility that compliance with or adoption of OMG specifications may require use of an invention covered by patent rights.
    [Show full text]
  • CS 535 Object-Oriented Programming & Design Fall Semester, 2008 Doc
    CS 535 Object-Oriented Programming & Design Fall Semester, 2008 Doc 4 Starting VisualWorks Sept 9 2008 Copyright ©, All rights reserved. 2008 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA. OpenContent (http:// www.opencontent.org/openpub/) license defines the copyright on this document. Reference VisualWorks Application Developer’s Guide, doc/AppDevGuide.pdf in the VisualWorks installation. Chapter 1 The VisualWorks Environment. Reading VisualWorks Application Developer’s Guide, doc/AppDevGuide.pdf in the VisualWorks installation. Chapter 1 The VisualWorks Environment. Chapter 2 Programming in VisualWorks (minus the sections Loading Code Libraries & Paintng a GUI) 2 Learning Smalltalk Smalltalk language syntax Smalltalk Programming Environment Smalltalk Class Library Object-oriented thinking This is the hardest part Smalltalk culture 3 Versions of Smalltalk VisualWorks VisualAge for Smalltalk Squeak Dolphin Smalltalk X Smallscript (.NET Smalltalk) 4 Bytecode & VMs Smalltalk is compiled to a bytecode for a virtual machine VisualWorks has VM's for: Windows Macintosh Unix/Linux VisualWork’s virtual machine (VM) uses a JIT to compile bytecodes 5 Parts of VisualWorks Executable Virtual Machine (visual, visual.exe) This is the VM that interprets Smalltalk bytecode visual.sou Source code for most of class library visual.cha Source code for changes & new classes Does not exist until after you first use VisualWorks visual.im Bytecode of sources that are executed At first the image will appear to be an IDE for Smalltalk 6 Before Starting VisualWorks Make a copy of visual.im You will need it later 7 Starting VisualWorks on Windows Method 1 Drag and drop the image file on the Visual application or visual.exe Method 2 Double click on the image file The first time you do this you may get a dialog asking for the application to run the image.
    [Show full text]
  • Preserving Instance State During Refactorings in Live Environments Pablo Tesone, Guillermo Polito, Luc Fabresse, Noury Bouraqadi, Stéphane Ducasse
    Preserving Instance State during Refactorings in Live Environments Pablo Tesone, Guillermo Polito, Luc Fabresse, Noury Bouraqadi, Stéphane Ducasse To cite this version: Pablo Tesone, Guillermo Polito, Luc Fabresse, Noury Bouraqadi, Stéphane Ducasse. Preserving In- stance State during Refactorings in Live Environments. Future Generation Computer Systems, Else- vier, In press, 10.1016/j.future.2020.04.010. hal-02541754 HAL Id: hal-02541754 https://hal.archives-ouvertes.fr/hal-02541754 Submitted on 14 Apr 2020 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Preserving Instance State during Refactorings in Live Environments Pablo Tesonea,b,∗, Guillermo Politoc, Luc Fabresseb, Noury Bouraqadib, Stéphane Ducassea aInria Lille-Nord Europe, 40 Avenue Halley, Villeneuve d’Ascq, France bUnité de Recherche Informatique et Automatique, IMT Lille Douai, 764 Boulevard Lahure, Douai, France cUniv. Lille, CNRS, Centrale Lille, Inria, UMR 9189 - CRIStAL - Centre de Recherche en Informatique Signal et Automatique de Lille, F-59000 Lille, France Abstract An important activity of software evolution consists in applying refactorings to enhance the quality of the code without changing its behaviour. Having a proper refactoring tool is a must-to in any professional development environment.
    [Show full text]
  • ESUG 2012 Report
    CS21 and ESUG 23, Brescia, July 13th - 17th, 2015 1 CS21 and ESUG 23, Brescia, July 13th - 17th, 2015 This document contains my report of the ESUG conference in Brescia, July 13th - 17th, 2015 (and brief remarks on the Camp Smalltalk on the Sunday before it). As there were parallel tracks, I could not attend all talks. At the end, I also report a 2015 UK Smalltalk User Group meeting I attended. Style ‘I’ or ‘my’ refers to Niall Ross; speakers (other than myself) are referred to by name or in the third person. A question asked in or after a talk is prefixed by ‘Q.’ (sometimes I name the questioner; often I was too busy noting their question). A question not beginning with ‘Q.’ is a rhetorical question asked by the speaker (or is just my way of summarising their meaning). Author’s Disclaimer and Acknowledgements These reports give my personal view. No view of any other person or organisation with which I am connected is expressed or implied. The talk descriptions were typed while I was trying to keep up with and understand what the speakers were saying, so may contain errors of fact or clarity. I apologise for any inaccuracies, and to any participants whose names or affiliations I failed to note down. If anyone spots errors or omissions, email me and corrections may be made. My thanks to the conference organisers and the speakers whose work gave me something to report. My own talk is written up at much greater length than the others. Venue The accommodation was in old town of Brescia (called Brixia in Roman times).
    [Show full text]
  • Visualworks® Environment
    Cincom Smalltalk DATA SHEET Cincom Smalltalk VisualWorks ® Environment Cincom Smalltalk is a pure, object-oriented application development suite for software developers who need to build applications quickly and efficiently. Cincom Smalltalk™ The Cincom Smalltalk product suite consists of two environments: VisualWorks and ObjectStudio ®. VisualWorks is an enterprise-class VisualWorks Environment application development and delivery platform used by world-class The VisualWorks suite is the companies in areas such as semiconductor manufacture, shipping, financial premier Smalltalk platform for risk management, insurance, banking, government, education and building instantly portable server, healthcare. web-based and client/server applications. VisualWorks is VisualWorks portable across a wide range of platforms: VisualWorks includes components for any type of work your team might contemplate: Web Applications, WS* (Web Services), SNMP Connectivity Windows (2000/XP/200x/Vista/CE and superior development tools. VisualWorks now includes best-of-breed • ARM and x86) tools like the Refactoring Browser and the Professional Debugger Package, Mac OS X PowerPC and Intel fully integrated with the product. VisualWorks is ready for integration with • Linux (x86/SPARC/PPC) other leading applications and services, with support for Web Services, • HPUX CORBA, COM and common internet protocols. • AIX VisualWorks has support for all major internet protocols including SOAP, • Solaris (SPARC/x86) • WSDL and UDDI. Additionally, VisualWorks supports interoperability standards such as SNMP and MQS, allowing Smalltalk applications to VisualWorks ® has full 64-bit support seamlessly plug into an enterprise infrastructure an important feature for IS on Linux (x86-64) and Solaris — shops that need to integrate multiple applications from multiple sources. (SPARC/x86-64). This generation of Smalltalk also stands as the best way to interoperate with Highlights the existing and competing standards of .NET and J2EE.
    [Show full text]
  • Pragmas: Literal Messages As Powerful Method Annotations
    IWST 2016 Pre ACM Digital Library Version Pragmas: Literal Messages as Powerful Method Annotations S. Ducasse E. Miranda A. Plantec RMoD - INRIA http://www.mirandabanda.org alain.plantec@univ- brest.fr http://stephane.ducasse.free.fr Université de Bretagne Occidentale Abstract • One important aspect with registration mechanisms is Often tools need to be extended at runtime depending on the how to keep metadata and method in sync. With ad-hoc availability of certain features. Simple registration mecha- registration mechanisms, metadata is not automatically nisms can handle such a situation: It often boils down to synchronized with the data or behavior it describes. It is represent an action and describe such action with some meta- often the responsibility of the user to keep such informa- data. However, ad-hoc registration mechanisms have some tion up to date. drawbacks: they are often not uniform and do not fit well • Finally ad-hoc registration mechanisms do not fit well with code navigability. In addition, metadata is not automat- with the variability of arguments. ically synchronized with the data or behavior it describes. In this article we present the notion of pragmas, method anno- In this article we present pragmas, method annotations, as tations, as it was introduced in VisualWorks and now it is it was introduced in VisualWorks [8,9] and now it is an im- an important extensibility mechanism of Pharo. We present portant extensibility mechanism of Pharo [3]. Method prag- some examples of pragmas within Pharo. mas are method level annotations that integrate smoothly with the Smalltalk syntax and tools. The outline of the paper is the following: first we present 1.
    [Show full text]
  • Expanding the Visualworks Image
    Expanding the VisualWorks Image After you install VisualWorks, the base Image (to be found in the subdirectory image in the installation directory1) contains packages or bundles with the standard classes that are needed for application development, along with those that contain the program code for the development environment. The subdirectory contributed contains several enhancements that are delivered with VisualWorks. Among these are • Frameworks for the most diverse programming tasks (for example, SUnitToo, a later version of SUnit2) • Components to access various database systems • Free versions of third-part software • Much more These enhancements are in the form of parcels. Stated somewhat simply, parcels are pack- ages that have been “exported” from an Image. You can use the menu item Package → Publish as Parcel to export a package as a parcel. This creates two files: <package-name>.pst <package-name>.pcl The file with the .pst extension contains the Smalltalk source code. The file with the .pcl extension contains the program translated into byte code. You can use the Parcel Manager, which is started by clicking the menu item System → Parcel Manager in the Launcher, to integrate parcels into one’s own Image. The Parcel Manager presents three views of the parcels from the contributed directory. 1See Fig. 5.1. 2See Chap. 15. © Springer Fachmedien Wiesbaden 2015 419 J. Brauer, Programming Smalltalk – Object-Orientation from the Beginning, DOI 10.1007/978-3-658-06823-3 420 Expanding the VisualWorks Image Fig. A.1 The Parcel Manager 1. The parcels are grouped by theme in the Suggestions tab. In Fig. A.1, the parcel SunitTool(s) has been selected from the Popular directory (see Chap.
    [Show full text]
  • Lumi`Ere: a Novel Framework for Rendering 3D Graphics in Smalltalk
    banner above paper title Lumiere` : a Novel Framework for Rendering 3D graphics in Smalltalk Fernando Olivero, Michele Lanza, Romain Robbes REVEAL@ Faculty of Informatics - University of Lugano, Switzerland ffernando.olivero,michele.lanza,[email protected] Abstract One of the cornerstones of Lumiere` is to hinge on the metaphor To render 3D graphics there is a number of different frameworks of a stage. We believe this helps to make the framework and its written in Smalltalk. While most of them provide powerful facil- usage more intuitive, as metaphors are powerful tools to assist ities, many of them are outdated, abandoned, undocumented or the usage of abstract concepts: If a framework is built around an heavyweight. intuitive metaphor which maps abstracts concepts to real-world In this paper we present Lumiere` , a novel lightweight frame- objects, programmers can obtain an immediate mental model of work for rendering 3D graphics using OpenGL based on a stage the framework’s domain model, thus easing the understanding and metaphor. Lumiere` is implemented using the Pharo IDE. In its cur- usage of the framework. rent state it supports basic and composite shapes to populate 3D To apply this concept to 3D graphics, Lumiere` ’s stage metaphor scenes, features a camera, and a lighting model. implies that all graphics are produced by cameras taking pictures We illustrate the usage of Lumiere` with Gaucho, an environ- of 3D shapes lit by the lights of the stage. A stage provides the ment for visual programming we are currently building. setting for taking pictures of a composition of visual objects we call micro-worlds.
    [Show full text]
  • Instructions Separator
    An Introduction to Smalltalk for Objective-C Programmers O’Reilly Mac OS X Conference October 25—28, 2004 Philippe Mougin - [email protected] http://www.fscript.org IT Management & Consulting What you will get from this session • An understanding of the basic principles of Smalltalk. • The ability to read code. • An overview of Smalltalk options available on Mac OS X. Objective-C “Objective-C is a hybrid language that contains all of C language plus major parts of Smalltalk-80.” Brad Cox Objective-C: [playList addSong:aSong] Smalltalk: playList addSong:aSong Xerox Palo Alto Research Center Alan Kay Dan Ingalls Adele Goldberg Ted Kaehler Steve Jobs meets Smalltalk • “They showed me 3 things: graphical user interfaces, object oriented computing and networking.” • z • z • z • z Steve on a chair Smalltalk on a Xerox Alto III • “I only saw the first one which was so incredible to me that it saturated me...” • “If I'd only stayed another 20 minutes!” • “It took really until a few years ago for the industry to fully recreate it, in this case with NeXTSTEP.” Smalltalk • ANSI standard approved in 1998: ANSI INCITS 319-1998 • A pure object language: everything is an object •“Smalltalk'sdd design is due to the insight that everything we can describe can be represented by the recursive composition of a singled kind of behavioral building block that hides its •combination of state and process inside itself and can be dealt with• onls y through the exchange of messages.” Alan Kay • Message sending is (almost) the only control structure. • Interactive environment. • Simplicity and power.
    [Show full text]
  • Towards Generating Software Systems from Legacy Code: Gathering Associations from Smalltalk Software
    Towards Generating Software Systems From Legacy Code: Gathering Associations From Smalltalk Software Jan Blizniˇcenko and Robert Pergl Faculty of Information Technology, Czech Technical University in Prague, Th´akurova 9, Prague, 16000, Czech Republic fjan.bliznicenko,robert.pergl [email protected] Abstract. Generating programming code out of models is a useful ap- proach towards maintainable software systems, yet legacy systems have often no models at all. There are multiple ways to partially automate or aid the process of generating models out of legacy code, yet there is one kind of object-oriented programming languages substantially harder to transform { dynamically typed languages. While statically typed lan- guages enforce programmers to explicitly state the data types of various elements, dynamically typed languages do not, presenting significant dif- ficulties when gathering associations between classes. This paper presents an ongoing effort towards dealing with gathering associations by combin- ing various type inference techniques and tools and how the authors aim to use UML models as a transition form between origin and destination programming languages, producing UML models as useful byproducts. Pharo { Smalltalk-based dynamically typed programming language is used as a case study. Keywords: software models, generating, reverse-engineering, type in- ference 1 Introduction & Motivation Modeling software systems before implementation has been recommended for several decades [1, 3] and general model-driven development as well as Normal- ized Systems theory [7] advises automated or semi-automated ways of generating programming code out of models [20, 27]. There are several kinds of models, like Unified Modeling Language { UML [18] { for various aspects of the software, BPMN for business processes or Normalized Systems models allowing building modular and well-maintainable software.
    [Show full text]