Smalltalk for Unix & W i n d o w s Dennis Smith Cherniak Software Development Corporation.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Introducing JavaScript
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
11. A bit of Smalltalk. © O. Nierstrasz P2 — A bit of Smalltalk 11.2 A bit of Smalltalk Overview  Some history  Smalltalk syntax & object model  The.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
Principles of Object-Oriented Software Development The language Smalltalk.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Stéphane Ducasse 1 The Taste of Smalltalk.
13. A bit of Smalltalk. © Oscar Nierstrasz 2 Roadmap  The origins of Smalltalk  What is Smalltalk?  Syntax in a nutshell  Seaside — web development.
SMALLTALK Presented By Kameron Ethridge Sheree Martin Cassandra Void Michael Williams.
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 13 Object-Oriented Programming I am surprised.
Guide To UNIX Using Linux Third Edition
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Object-oriented programming and design 1 Smalltalk in a Nutshell Objects & classes Messages & methods Inheritance & metaclasses.
Stéphane Ducasse5.1 Smalltalk in a Nutshell OO Model in a Nutshell Syntax in a Nutshell.
12. A bit of Smalltalk. © O. Nierstrasz P2 — A bit of Smalltalk 11.2 Roadmap  Some history  Smalltalk syntax & object model  The Smalltalk environment.
SMALLTALK Presented by Latasha Gibbs, Natasha Harrison, and Robert G. Lewis “Common languages are tools, Smalltalk is a piece of art.”
Stéphane Ducasse 1 Smalltalk in a Nutshell.
Python Introduction.
Introduction to Ruby CSE 413 Autumn 2008 Credit: Dan Grossman, CSE341.
CSE 131 Computer Science 1 Module 1: (basics of Java)
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
PHP H ypertext P re-processor. Unit 6 - PHP - Hello World! - Data types - Control structures - Operators.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
3A-1 1 Introduction to Smalltalk History of Smalltalk The philosophy of Smalltalk:  “...we have a universe of well-behaved objects that courteously ask.
INTERNET APPLICATION DEVELOPMENT For More visit:
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
CSE 3302 Programming Languages Chengkai Li Spring 2008 Object-Oriented Programming Lecture 13 – OO Programming, Spring CSE3302 Programming Languages,
Part 1. Persistent Data Web applications remember your setting by means of a database linked to the site.
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
Smalltalk (and Squeak) Aida Dungan and Rick Shreve.
Introduction to PHP Advanced Database System Lab no.1.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Squeak and Botkit-Port Jeff Forbes Joel Miller. Introduction ● Squeak is a pure OO language ● Based off of SmallTalk-80 – Designed at Xerox PARC by Alan.
Smalltalk in a.NET World How to write a Smalltalk compiler without writing a VM John Brant
Smalltalk Mark Colangelo CMSC-631, Fall December 2002.
Smalltalk Interpreted by Alan Frazier & Brian Sparks.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
S.Ducasse Stéphane Ducasse 1 Smalltalk in a Nutshell.
S.Ducasse Stéphane Ducasse savoie.fr e/ e/ 1 Smalltalk in a Nutshell.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
CSE 3302 Programming Languages Chengkai Li Fall 2007 Smalltalk Lecture 14 – Smalltalk, Fall CSE3302 Programming Languages, UT-Arlington ©Chengkai.
JAVA Programming (Session 2) “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
Alan Kay The Father of Object-Oriented Programming Chris Rees.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Presented By P.SRIVIDYA 085D1A0552 Programming Language.
PHP using MySQL Database for Web Development (part II)
C LANGUAGE MULITPLE CHOICE QUESTION SET-2
JAVA MULTIPLE CHOICE QUESTION.
PHP Introduction.
Aaron Bloomfield CS 415 Fall 2005
Introduction to Python
Feedback from Assignment 1
PHP.
Tutorial 10 Programming with JavaScript
Introduction to Smalltalk
PHP an introduction.
Let’s Talk about… Smalltalk.
CSE 3302 Programming Languages
Presentation transcript:

Smalltalk for Unix & W i n d o w s Dennis Smith Cherniak Software Development Corporation

Smalltalk Smalltalk is … –a computer language –a development environment –a philosophy of development –100% objects

Where did it come from Conceived in the late 1960’s by Alan Kay Ideas from Simula, Logo, SketchPad Concept of communicating “cells” from his biology background “Cells” later became “Objects” Alan Kay Moved to Xerox Park in 1972 where he w orked on Smalltalk as a language for teaching children

Alan Kay Developed a number of concepts in the 60’s and 70’s –Objects –GUI interfaces –LapTop Computer –Smalltalk Alan Kay is now a “Disney Fellow” doing general Research

Smalltalk Yesterday & Today First commercial use –Tektronix, embedded in oscilloscopes Used in many areas today –U.S. Power and Light utilities –Insurance Industry –Volkswagen production line –Swiss banks –Ford, General Motors, Chrysler (Xtreme Programming) –Active Web Sites

Implementations VisualWorks (CINCOM) –Based on Xerox Park work –Binary cross-platform (UNIX, Linux, Windows, Mac) –Full NC version at ObjectStudio (CINCOM) –Windows & Mainframes IBM VisualAge Smalltalk –Cross-platform via source (UNIX, Windows, OS/2)

Implementations (2) Gemstone/S (Gemstone) –server side, persistent, multi-user, active ODBMS (Unix, Linux, Windows) –NC versions available at Dolphin –was free now commercial Squeak –Free - small group started by Alan Kay –Available at MT –compiled, windows-only GNU –command line, no GUI

Smalltalk – What Is It A pure object language Simple syntax (5 lines of BNF) No compile-time types –Object’s have types –Variables / parameters do not Syntax contains no conditionals Syntax contains no loops Automatic Garbage Collection

Smalltalk – What is it (2) Uses a VM Compiles to byte codes Byte codes can be interpreted Normal execution uses a “cached compile” technique pioneered by Smalltalk in the 1980’s. Debugging uses interpreter

The Language Data is encapsulated in objects Access via sending message to the object A message invokes a method All method returns a value (default the object) Everything is an object –Integer, Float, Character, String –Class, Method, Byte Codes –Other Objects

Classes, Variables, Objects A class is a pattern for an object –Defines instance variables –Defines methods –May inherit from another class An Object is instantiated from a class using “Class new” Two kinds of variables –Instance variables in the object –Temporary variables in the method

Methods and Messages Three kinds of messages –Unary (name of method) person surname –Keyword (name and parameters) person surname: ‘Jones’ –Binary, any single or pair of special characters personA = personB stringA, stringB age + 4 age + 4 * 2

Constant Values Constants –Integers 2, 248 –Characters $A $+ $$ –Strings ‘this is a string’ –Floats –Fixed Decimal (some) s –Symbols (canonicalized strings) #abc #surname –Arrays #(12 ‘string’) Comments –“this is a comment”

Arithmetic This slide should be empty, there is no such concept However, by convention, if you send the message “+” to a numeric value the result is likely the sum Note however that “+” could be defined for String, Person etc. Note “3 + 4 * 5” results in 35!!

Conditionals Code block (its an object) [statements] [:parm | statements] Conditional aBoolean ifTrue: […] aBoolean ifTrue: […] ifFalse: […] (true) ifTrue: aBlock aBlock value (false) ifTrue: aBlock “do nothing”

Collections Many types of collections –Array (fixed size) –OrderedCollection (variable size) –Dictionary (keyed values) Simple enumerator aCollection do: [:obj | …] Other enumerators select:block returns boolean reject:block returns boolean collect:block returns new values

Sample Code (PersonHolder) firstPerson | person | person := self getPerson. spouse := person spouse. spouse > person ifTrue: [^spouse]. ^person (Person) > aPerson ^self age > aPerson age

Sample Code (2) Find all persons older than some other person: allOlderThan: aPerson ^personList select: [:p | p > aPerson]

Why Smalltalk Its fast Its easy to work and think with Changes are instantly available Debugger is fully interactive Its fully reflective, classes, methods, byte codes, compiler all written in Smalltalk Automatic garbage collection

Why Smalltalk (2) Features –IDE uses single browser (written in Smalltalk of course) –Fully integrated GUI development –Image reading (gif, bmp) and manipulation (grow, shrink, rotate, flip, …) –Network Support (SMTP, POP, IMAO, SOAP, SSP (JSP), …)

What We do at Cherniak Software Tools and Framework for building end-user database applications –Accounting –Payroll –Custom VisualWorks and Gemstone Business and Framework code runs both on VW and on Gemstone