Download presentation
Presentation is loading. Please wait.
Published byBaldric Golden Modified over 9 years ago
1
Gary MarsdenSlide 1University of Cape Town Designing usable programming languages
2
Gary MarsdenSlide 2University of Cape Town End user programming Look at the need to provide “graphical interface” programming languages for novice programmer Many reasons why this is important – 40% of homes have computers –
3
Gary MarsdenSlide 3University of Cape Town Current tools We shall call these RAD (Rapid Application Development) tools
4
Gary MarsdenSlide 4University of Cape Town Problems Simplifications are made, which turn out to be “complexifications” Computer scientists don’t seem to care
5
Gary MarsdenSlide 5University of Cape Town Previous end user languages BASIC –Did not need to be crippled; hardware was simple –Encouraging –Extensible (PEEK, POKE) –Teaching language
6
Gary MarsdenSlide 6University of Cape Town Current Systems Passive –Toolkits –Components Active –“Zero” functionality –Graphically aided –Interface builders –RAD –Visual Language –Interface spec systems
7
Gary MarsdenSlide 7University of Cape Town Favourites HyperCard –free from Apple, –Graphics program to which was added language –Most popular on Macintosh Visual Basic –Comes in VBA and full flavours –Windows / Office language of choice –Language to which was added graphics
8
Gary MarsdenSlide 8University of Cape Town Learning Curve
9
Gary MarsdenSlide 9University of Cape Town Modes Design and execute modes
10
Gary MarsdenSlide 10University of Cape Town Mode Solutions Should not be modes If modes are to be used –Provide adequate feedback on mode –Not conflict with previous use –Reflect real world metaphor
11
Gary MarsdenSlide 11University of Cape Town Screw solution
12
Gary MarsdenSlide 12University of Cape Town Translation Compile on demand –Full program need not be written before a part can be run –Compile errors only reported by sub-program –Should be possible to do full compilation
13
Gary MarsdenSlide 13University of Cape Town Adding widgets –HyperCard - methods only –Visual Basic - attributes only –Should allow widgets to be added as first class citizens (data type completeness) –Full interface should be available (object browser)
14
Gary MarsdenSlide 14University of Cape Town Editors Detect syntax errors Automatic indentation (essential for HC) Statement colouring Mixed mode
15
Gary MarsdenSlide 15University of Cape Town Customisation Re-use IDE features Hierarchy of widget methods/properties Interface structure reflect code structure
16
Gary MarsdenSlide 16University of Cape Town Structure Object based “Reflexive interaction paradigm” Object instantiation through “cut” and “paste” Ability to create own objects
17
Gary MarsdenSlide 17University of Cape Town Syntax No ambiguities - either visual or natural language Ideally, syntax should resemble “real” language
18
Gary MarsdenSlide 18University of Cape Town Data Types Coercion –Typeless, auto. Coercion, Mixed mode (integer ~ real), Pseudostrong, Strong Multimedia Dynamic binding (visual binding, “me, this”) Allow strong typing Semantically equivalent objects should be treated identically
19
Gary MarsdenSlide 19University of Cape Town Data Structures HC has none, VB has no dynamic ones Persistent Multimedia (universe of discourse) References –Form1.text1 = “Hello” –Set card field “1” of card “1” to “Hello”
20
Gary MarsdenSlide 20University of Cape Town Integration Language reflect interface concepts Universe of discourse –Use of widgets in IDE not available to programmer –Control of widgets different from language and IDE Self implementation –Compilers written in own language -> IDE written in script language (reflection)
21
Gary MarsdenSlide 21University of Cape Town Programmer needs Instant gratification Pleasantness Low viscosity and low premature commitment
22
Gary MarsdenSlide 22University of Cape Town Paradigm Functional / Declarative Visual Languages Programming By Example
23
Gary MarsdenSlide 23University of Cape Town Programming by Example Great for getting people stared, but there comes a limit to the inference engine and we bring a step into the learning curve
24
Gary MarsdenSlide 24University of Cape Town Functional / Declarative State destination, not journey Referential transparency Recursion not so good –poor transferable skill “Functional languages are unnatural to use” –demand premature commitment –role expressive, but highly viscose
25
Gary MarsdenSlide 25University of Cape Town Declarative IO Fudgets Monads / Continuation Unique types –one reference at a time –fac 1 = 1 –fac n = n * (fac(n-1)) Stick with OO for now (possibly ABC or Turing)
26
Gary MarsdenSlide 26University of Cape Town Representing Widgets How do you talk about widgets in a language? –Find fundamental widget “particle” –Align language semantics to widget semantics If you can do this, –focus on problem domain –increase language role expressiveness
27
Gary MarsdenSlide 27University of Cape Town Fundamental widget Are all widgets just a subclass of button?
28
Gary MarsdenSlide 28University of Cape Town Language isomorphism's Labels and text box are easy
29
Gary MarsdenSlide 29University of Cape Town Radio and check buttons Radio is easy - enumerated type Check boxes need a new, variant enumerated –style = (plain|(bold,italic,underline)
30
Gary MarsdenSlide 30University of Cape Town Radio and Checkboxes visulaised
31
Gary MarsdenSlide 31University of Cape Town Pizza
32
Gary MarsdenSlide 32University of Cape Town Range Selection Widgets to select values can be classified as follows: –One from a small range –Several from discrete –Single from continuous –Sub-range from range
33
Gary MarsdenSlide 33University of Cape Town Range variables A = [5 20] B = [5 20] C = [5 20] D = [5 20]
34
Gary MarsdenSlide 34University of Cape Town Buttons These turn out to be hard as they are verbs rather than nouns Settled for objects which contained event handlers for mouse input
35
Gary MarsdenSlide 35University of Cape Town Prototype Some of this has been implemented in Java
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.