ESUG 2002 - DOUAI F-Script: Smalltalk Scripting for Mac OS X Philippe Mougin

Slides:



Advertisements
Similar presentations
Lecture 2 - Introduction Objective C is used primarily for application development on Apple's Mac OS X and iPhone. On the Apple it is used together with.
Advertisements

Mac OS X Anja Philipp MAC OS X Anja Philipp
Android architecture overview
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Operating-System Structures
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01.
Software: Systems and Application Software
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Advanced Object-Oriented Programming Features
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Mobile Application Development
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Windows 2000 Vs. Mac OS X Comparing Windows 2000 and Mac OS X on the following grounds: 1) Architecture 2) Design Goals 3) Programming Interface/ User.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Course: Introduction to Computers
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Computer Software.
Understanding and Managing WebSphere V5
Python Introduction.
Section 6.1 Explain the development of operating systems Differentiate between operating systems Section 6.2 Demonstrate knowledge of basic GUI components.
Chapter 3 Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Mobile Application Development using Android
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
A First Program Using C#
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Cli/Serv.: JXTA/151 Client/Server Distributed Systems v Objective –explain JXTA, a support environment for P2P services and applications ,
CHAPTER FOUR COMPUTER SOFTWARE.
Introduction to Interactive Media Interactive Media Tools: Software.
ANDROID 응용 프로그래밍 과정 – 목차 - 안드로이드란 - 안드로이드가 만들어지게 된배경 - 안드로이드의 철학 - 안드로이드 환경설정 ( SDK download, eclipse plug-in 설정, 간단한 프로그램 실행 ) - 안드로이드 동작원리 - 안드로이드 핵심.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
CS 3131 Introduction to Programming in Java Rich Maclin Computer Science Department.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
Folio3 IPhone Training Session 1 Presenter: Imam Raza.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
Eagle: Maturation and Evolution 17th Annual Tcl Conference Joe Mistachkin.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
9-Nov-97Tri-Ada '971 TASH An Alternative to the Windows API TRI-Ada ‘97 Terry J. Westley
 Programming - the process of creating computer programs.
April 2, 2002 Craig E. Ward, 1 Java on Mac OS X Insanely Great or Just Insane? A presentation to the Los Angeles Java Users Group.
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,
PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
Java – in context Main Features From Sun Microsystems ‘White Paper’
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Introduction  Program: Set of sequence instruction that tell the computer what to do.  Software: A collection of programs, data, and information. 
Android operating system N. Sravani M. Tech(CSE) (09251D5804)
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Software Architecture of Sensors. Hardware - Sensor Nodes Sensing: sensor --a transducer that converts a physical, chemical, or biological parameter into.
Presented By P.SRIVIDYA 085D1A0552 Programming Language.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Discovering Mac OS X Avinash Meetoo 13 January 2007 Linux User Group of Mauritius
Computer System Structures
Android Mobile Application Development
CST 1101 Problem Solving Using Computers
Current Generation Hypervisor Type 1 Type 2.
Chapter 2: Operating-System Structures
Course: Introduction to Computers
Lecture 1 Runtime environments.
CMPE419 Mobile Application Development
SVTRAININGS. SVTRAININGS Python Overview  Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed.
Chapter 2: Operating-System Structures
Eagle: Maturation and Evolution
Lecture 1 Runtime environments.
CMPE419 Mobile Application Development
Presentation transcript:

ESUG DOUAI F-Script: Smalltalk Scripting for Mac OS X Philippe Mougin

F-Script in the Mac OS X Architecture Quartz, OpenGL, multimedia, printing, event handling, low-level window management, etc. Strings, run loops, collections, processes, resources, etc. Multitasking, virtual memory, SMP, file systems, device drivers, networking, threading packages, etc.

Mac OS X is a UNIX operating system which is implemented (mostly) in C and which offers C-based APIs. F-Script in the Mac OS X Architecture Quartz, OpenGL, multimedia, printing, event handling, low-level window management, etc. Strings, run loops, collections, processes, resources, etc. Multitasking, virtual memory, SMP, file systems, device drivers, networking, threading packages, etc.

Quartz, OpenGL, multimedia, printing, event handling, low-level window management, etc. Strings, run loops, collections, processes, resources, etc. Multitasking, virtual memory, SMP, file systems, device drivers, networking, threading packages, etc. Apple provides three high-level environments (tools, APIs) for programmers. F-Script in the Mac OS X Architecture

Quartz, OpenGL, multimedia, printing, event handling, low-level window management, etc. Strings, run loops, collections, processes, resources, etc. Multitasking, virtual memory, SMP, file systems, device drivers, networking, threading packages, etc. The main goal of Carbon is to provide toolbox-like APIs (i.e. old Mac OS APIs) for porting existing Mac OS applications, or creating new ones. F-Script in the Mac OS X Architecture

Quartz, OpenGL, multimedia, printing, event handling, low-level window management, etc. Strings, run loops, collections, processes, resources, etc. Multitasking, virtual memory, SMP, file systems, device drivers, networking, threading packages, etc. The Java environment supports both standards, cross-platform, Java frameworks and specific Mac OS X Java APIs. In both cases, the Java environment provides advanced integration with the underlying Mac OS X layers. F-Script in the Mac OS X Architecture

Quartz, OpenGL, multimedia, printing, event handling, low-level window management, etc. Strings, run loops, collections, processes, resources, etc. Multitasking, virtual memory, SMP, file systems, device drivers, networking, threading packages, etc. Cocoa provides a lightweight object-oriented extension of the C language, called Objective-C. It comes with various frameworks and tools. Cocoa is strongly influenced by Smalltalk although it is based on the compile-link-run model of C. F-Script in the Mac OS X Architecture

F-Script Quartz, OpenGL, multimedia, printing, event handling, low-level window management, etc. Strings, run loops, collections, processes, resources, etc. Multitasking, virtual memory, SMP, file systems, device drivers, networking, threading packages, etc. F-Script adds an interactive layer to Cocoa. It lets you interactively manipulate Cocoa-based objects. It also lets you write scripts. F-Script in the Mac OS X Architecture

Lightweight interactive & scripting layer F-Script does not replace Mac OS X development tools, frameworks and object run-time: developers continue to use existing tools & the Objective-C language to develop new classes. F-Script adds a lightweight interactive and scripting layer to the Cocoa stack. Emphasis is on interactive high-level and user-friendly object manipulation rather than class development.

Lightweight interactive & scripting layer  Emphasis is on interactive high-level and user-friendly object manipulation rather than class development.

Lightweight interactive & scripting layer  Emphasis is on interactive high-level and user-friendly object manipulation rather than class development. myObject is now registered in the Mac OS X distributed object system, under the public name ‘foo’. Other applications can connect to it and use it.

Lightweight interactive & scripting layer  Emphasis is on interactive high-level and user-friendly object manipulation rather than class development. Block inspector allowing in-place editing of block code.

Lightweight interactive & scripting layer  Emphasis is on interactive high-level and user-friendly object manipulation rather than class development. User-friendly access to core Mac OS X technologies (here: drawing a blue circle with Quartz).

High level object manipulation  Emphasis is on interactive high-level and user-friendly object manipulation rather than class development. One of the main weakness of object technology: high-level manipulation of data.

Weakness of object technology  Years ago relational supporters argued that object-oriented databases were a twenty-year step backward.  They were right !!!  Sure, object technology provides a high-level modeling approach. But think about how low-level, object technology is compared to relational algebra when it comes to manipulating whole sets of data.  This is a big challenge!

Weakness of object technology  This criticism prompted a major enhancement of object technologies: the development of object query languages.  This development provided a solution to the lack of high-level features found in traditional object languages.  So far, results are mixed.  Object query languages have not yet made their way into mainstream object languages.  In their most recent incarnations, object query languages adopt quite a low profile. They are merely used as an interface to an underlying database, and not as a general means of manipulating objects (e.g. JDO Query Language, EJB Query Language, Gemstone etc.). “The query is executed in the databse, not in the VM”.

High-level object manipulation  We want something with the power of relational algebra built into our programming language!  Array programming principles (cf. Ken Iverson’s APL) to the rescue. Smalltalk extended into an object query language allowing synthetic expression of object manipulations.  A new message send paradigm. The classic Smalltalk message construct becomes a special case of a more general messaging system.  A small kernel of high-level operators for object collection manipulation: Compression, Reduction, Join, Transposition, etc. (implemented as methods).  Aim was to minimize extensions needed to include query language level capacities in Smalltalk. From a technical point of view, can easily be adapted to existing Smalltalk implementations.

“F-Script lets one easily do pretty complex data mining to drill down through samples of thousands of galaxies distributed throughout a very large parameter space.” Prof. Roberto Abraham - Dept. of Astronomy & Astrophysics - University of Toronto.

Graphical Environment: shell, object browser, etc. F-Script Architecture Lightweight Smalltalk Interpreter (+ Array Extensions)Object/Array Programming Engine Object Model

F-Script Object Model & Frameworks  F-Script is based on Smalltalk syntax and concepts, but instead of using Smalltalk’s object model and common Smalltalk frameworks, it use the Cocoa object model and frameworks.  Thanks to the integration with Cocoa, F-Script gains many advanced features, which can be directly accessed by the F-Script user, "for free": Sophisticated GUI framework (Windows, Views, Event Model, Text Layout, etc.), Unicode support, Access to the Quartz features (Mac OS X graphic subsystem), Distributed Objects, Object Persistence, Integration with Interface Builder, Networking, File System interaction, UNIX abstractions: tasks, pipes, etc, Collection classes, Etc.

F-Script/Cocoa Object Model Example  Derived from the Smalltalk object model.  Smalltalk’s keyword syntax.  Class and meta-classes are objects.  Single inheritance. Support for protocols.  Fully dynamic. Static typing optional.  Flexible: the notion of “category” lets you add methods to classes you have not produced. The “poseAsClass:” method lets you replace a class by another one a runtime, etc.  isKindOfClass:, respondsToSelector:, performSelector:, doesNotRecognizeSelector:, etc.

F-Script is embeddable  In addition to a stand-alone application, F-Script comes as an embeddable Mac OS X framework.  This means you can use an F-Script interpreter (or several ones) in your own applications.  F-Script components are accessed through an Objective-C API.

F-Script is embeddable Developing with Project Builder and the F-Script framework

Object browser: browsing the workspace

Object browser asks for arguments

Browsing classes and meta-classes

On-Screen selection of widgets

Customizing the object browser

The key-value browser (by Joerg Garbers)

Using Mac OS X frameworks from F-Script [:title | |window conversionScript form button line| window := NSWindow alloc initWithContentRect:(125<>513 extent:400<>200) styleMask:NSTitledWindowMask+NSClosableWindowMask+NSMiniaturizableWindowMask+NSResizableWindowMask backing:NSBackingStoreBuffered defer:true. conversionScript := [(form cellAtIndex:2) setStringValue:(form cellAtIndex:0) floatValue * (form cellAtIndex:1) floatValue. form selectTextAtIndex:0]. form := (NSForm alloc initWithFrame:(60<>90 extent:320<>85)) autorelease. form Rate per $1', 'Dollars to Convert', 'Amount in Other Currency'}. form setAutosizesCells:true; setTarget:conversionScript; setAction:#value. button := (NSButton alloc initWithFrame:(250<>20 extent:90<>30)) autorelease. button setBezelStyle:NSRoundedBezelStyle; setTitle:'Convert'; setKeyEquivalent:'\r'. button setTarget:conversionScript; setAction:#value. line := (NSBox alloc initWithFrame:(15<>70 extent:370<>2)) autorelease. window contentView button, line}. window setTitle:title; orderFront:nil. ]

Interface Builder and F-Script

F-Script Anywhere  F-Script Anywhere, developed by Nicholas Riley, allows you to inject a complete F-Script environment into any running Cocoa application - even third-party applications!

F-Script Anywhere inside Chess

Download & Resources  Binaries for Mac OS X  Source code  User guide with complete reference documentation  Articles published by O’Reilly Network  Paper from APL 2000, documenting the high-level extensions  Additional tools, including F-Script Anywhere  Mailing List

Thanks ! See you at ESUG 2003 !