Step talk
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Step talk

on

  • 647 views

(ESUG 2003, Bled)

(ESUG 2003, Bled)

Statistics

Views

Total Views
647
Views on SlideShare
647
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • I will not go too deep, I’ll leave techincal details to the discussion section where I will flip back to slides with images and explain moore details. I=ll be speaking about obvious things – for you obvious, but in different light and different use.
  • Many applications that can do everything – from text editing to vegetable refrigerating
  • I’m not talking about smalltalk as application, but as smalltalk environment. Mention squeak.
  • Frameworks or other DOs
  • Combined needs and inspiration, I have came up with an idea of gluing applications together in some environment with objective feeling. Presenting objects as simple tools with known behaviour Communication between user and the framework in scripts

Step talk Presentation Transcript

  • 1. StepTalk Illusion of Cooperating Objects Environment Š tefan Urb á nek, August 2003 [email_address]
  • 2. Contents
    • Motivation
    • Illusion
    • Framework
    • Tools
    • Conclusion
  • 3. Motivation
    • Current s tate
      • selfish programs and applications
      • problem to find the right tool
    mail reading home page editing web browsing photo retouching vector graphics drawing chat word processing form filling coffee making
  • 4. Motivation
    • Needs
      • glue
        • applications, distributed objects and frameworks
      • create common environment
  • 5. Inspiration
    • Smalltalk environment
      • no applications or programs, just objects
      • simple way of communication with objects
      • consistent feel of the environment
  • 6. The Illusion
  • 7. The Illusion
    • Environment
      • Applications
        • presented as objects
      • Language(s)
        • used for communication
      • Script
        • describing a task
  • 8. The Illusion
    • How user sees it
    Mailer app. Chart app. Spreadsheet app.
  • 9.
    • How it is
    The Illusion StepTalk Framework Tools StepTalk Framework Mailer app. Chart app. Spreadsheet app.
  • 10. Framework and Interfaces
  • 11. Framework
    • Purpose
      • hide applications and programs
        • by presenting them as objects
      • create common environment
      • offer a way for communication
        • by using a language
  • 12. Framework
    • Objective C
      • NeXTSTEP, OPENSTEP
        • the past
      • MacOS X, GNUstep
        • the present
  • 13. Framework
    • Core
      • Objective C
        • C  Smalltalk
      • abstraction layer
        • over the Objective C object runtime
      • language to runtime mapping
        • by translating and executing scripts
  • 14. Framework
    • Where does it fit?
    Object ive C Runtime StepTalk Framework Application
  • 15. Framework
    • Interfaces
    StepTalk Framework Engine Engine Object ive C Runtime Application
  • 16. Interfaces
    • Interfaces for application
      • application interface advertising
        • provide information about application objects
      • script execution
        • methods for running scripts
    • Interfaces for execution
      • environment
      • language engine
  • 17. Interfaces
    • Application interface
      • Named objects
      • Class descriptions
    Mailer currentMailbox currentMessage mailboxes
  • 18. Interfaces
    • Script execution
      • get the list of available languages
      • get engine for particular language
      • execute script with arguments
  • 19. Interfaces
    • Environment
      • object naming and searching
        • with dictionary or Object Finders
      • application connecting
      • importing framework classes
      • importing bundle objects
      • translating strings to selectors
        • for given target object
  • 20. How It Works
    • Use
      • user wants to accomplish a task
      • several applications are available
      • customisation of application behaivour might be needed
  • 21. How It Works
    • 1. Application advertises
      • objects
        • user known objects that application provides
      • behaviour
        • methods that application implements
        • *Application is a large object in the environment
  • 22. How It Works
    • 2. Environment is provided
      • Framework creates the environment
        • from application description
        • or
      • Application provides the environment
        • customised for particular task
  • 23. How It Works
    • 3. Script Passing
      • user provides script
      • application passes to the framework
      • framework passes to the engine
    StepTalk Framework Engine Engine Application
  • 24. How It Works
    • 4. Script execution
    StepTalk Framework Engine execute script query objects Object Runtime send messages Scripting Environment
  • 25. Smalltalk Engine
    • Compilation
    StepTalk Framework Compiler +
    • byte code array - temporary variables - external references - literal objects
    environment script compiled method
  • 26. Smalltalk Engine
    • Execution
    bridge StepTalk Framework Bytecode Interpreter Object Runtime + result environment compiled method
  • 27. Smalltalk Engine
    • Features
      • literal objects
        • mapped to Objective C classes
      • blocks
      • exception handling
      • collection enumerating
  • 28. Tools
  • 29. Tools
    • Implemented
      • Executor
        • single script executor
      • Shell
        • interactive object “chat”
    • Future
      • Session
        • semi-persistent glue and environment
  • 30. Tools
    • Shell
      • live interaction with object environment
    • > mailbox := Mail currentMailbox
    • Mailbox
    • > mailbox messages count
    • 50
    • > mailbox select: [:message | ^message isRead ]
    • Array
    • 0 Message
    • 1 Message
    • 2 Message …
  • 31. Tools
    • Session
      • stand-alone process
        • Distributed Objects server
      • cooperative environment
        • of Distributed Objects, Applications and Frameworks
      • live connections to live objects
        • by using DO
      • semi-persistent
        • with ability to partially archive environment state
  • 32. Tools
    • Application Scripting
      • optional integration
      • automatic initialisation
      • provided user interface
  • 33. Tools
    • Script Objects
      • state
        • instance variables
      • dictionary of behaviour
        • method dictionary
  • 34. Other Tools
    • Active Script Objects
      • stand alone in session environment
      • illusion of incremental programming
  • 35. Conclusion
      • applications as objects
      • reusability at higher level
      • user orientation
      • Smalltalk approach to the object environment
  • 36. References
    • StepTalk
      • http://steptalk.host.sk
        • Home Page
      • http://wiki.gnustep.org/index.php/Scripting
        • Scripting with StepTalk
    • GNUstep
      • http://www.gnustep.org
        • Home Page
  • 37.
    • Thank you .
  • 38. Discussion
  • 39. Discussion
    • Objective C
    • StepTalk/Smalltalk
      • Bytecodes
      • Bridge
    • Object Finders
  • 40. Discussion
    • Objective C
      • strict superset of C
      • Smalltalk object model
        • un-typed objects, class objects, …
      • reflection
      • dynamic binding
      • dynamic loading
      • message forwarding and delegation
  • 41. Discussion
    • Objective C
      • Messages
        • [array insertObject:anObject atIndex:index]
        • obj = [dict objectForKey:someKey]
      • Reflection
        • respondsToSelector:, isTypeOf:, isKindOf:
        • class, superclass, …
      • Forwarding
        • doesNotRecognize:, forwardInvocation:
  • 42. Discussion
    • Smalltalk Bytecodes in StepTalk
      • push
        • receiver, receiver variable, extern, temporary, literal
      • pop and store
        • receiver variable, extern, temporary
      • send selector
      • duplicate top, pop
      • block copy
      • return
  • 43. Discussion
    • StepTalk to Objective C Bridge
      • take arguments from stack
      • take receiver and selector
      • create method signature for receiver
      • convert argument objects to C values
      • create invocation
      • invoke
      • convert and return return value
  • 44. Discussion
    • Smalltalk - Objective C Bridge
      • No magic involved
      • Empty proxies
      • Forwarding
  • 45. Discussion
    • Object Finders
      • Find object referenced by name
      • Query name dictionary or service
      • Launch application or DO server
        • if not already launched
      • Create connection
      • Return distant object proxy
  • 46. Tools
    • Script Objects
    • | object method source engine |
    • “ Prepare an object “
    • object := STScriptObject scriptObject.
    • engine := STEngine
    • engineForLanguageWithName:'Smalltalk'.
    • “ Build a method”
    • source := 'sayHi Transcript show: 'Hi.'. ^self'.
    • method := engine methodFromSource:source
    • forReceiver:object
    • inEnvironment:Environment.
    • " Add the method to the object "
    • object addMethod:method.
    • object sayHi.
  • 47. About
    • StepTalk
    • ESUG 2003 presentation
    • © Š tefan Urb á nek <urbanek@host.sk> , August 200 3