formal methods in hci a success story from formalism to
play

formal methods in HCI a success story From Formalism to - PDF document

formal methods in HCI a success story From Formalism to Physicality, Alan Dix, UPC North, 30 April 2008 problem context mid 80s local authority DP dept transaction processing vast numbers of users


  1. � � � � formal methods in HCI a success story From Formalism to Physicality, Alan Dix, UPC North, 30 April 2008 problem • context – mid 80s – local authority DP dept • transaction processing – vast numbers of users – order processing, pos systems etc. – COBOL! • existing programs ... didn’t work 1

  2. TP physical architecture other users user terminal N.B. web apps. corporate just like this too database central server what happens web server user edits form message goes to TP engine passed to application module which processes the message PHP script and prepares new screen Java servlet which is sent to the user .... web page 2

  3. structure of programs if .. if .. if .. if .. if .. if .. if .. why? program is trying to work out what is happening! • standard algorithm – program counter implicit • TP, web, event-based GUI – need explicit dialogue state 3

  4. mixed up state • many users – one application module user A starts multi-screen search list application stores value ‘next_record’ user B starts multi-screen search list application overwrites value ‘next_record’ user A selects ‘next screen’ ... ... and gets next screen of B’s search! state is hard • recent MSc course – CS and psych – exercise – state of 4 function calculator – difficult for both • why? – in real life state is implicit – in standard CS state is implicit too! 4

  5. solution? Delete D1 • flowchart! Please enter employee no.: ____ • not of program C1 read record ... but of dialogue Delete D2 Delete D3 Name: Alan Dix Name: Alan Dix Dept: Computing Dept: Computing delete? (Y/N): _ delete? (Y/N): _ • a formal dialogue Please enter Y or N specification! C2 other answer? Y N Finish C3 delete record Finish full screen flow chart Delete D1 Please enter employee no.: ____ C1 read record Delete D2 Delete D3 Name: Alan Dix Name: Alan Dix Dept: Computing Dept: Computing delete? (Y/N): _ delete? (Y/N): _ Please enter Y or N C2 other answer? Y N Finish C3 delete record Finish 5

  6. details ... • miniature Delete D1 Please enter screen sketch employee no.: ____ C1 read record Delete D2 Delete D3 Name: Alan Dix Name: Alan Dix Delete D2 Dept: Computing Dept: Computing delete? (Y/N): _ delete? (Y/N): _ Please enter Y or N Name: Alan Dix Dept: Computing delete? (Y/N): _ C2 other answer? Y N Finish C3 delete record Finish details ... • minimal Delete D1 Please enter internal details employee no.: ____ C1 read record Delete D2 Delete D3 C2 other Name: Alan Dix Name: Alan Dix answer? Dept: Computing Dept: Computing delete? (Y/N): _ delete? (Y/N): _ Please enter Y or N Y N C2 other answer? C3 Y N Finish delete record C3 delete record Finish 6

  7. and then ... • hand transformation to boiler plate code • store ‘where next’ for each terminal • in ‘session’ data • code starts with big ‘case’ • do processing • set new ‘where next’ ... send screen lessons useful – addresses a real problem! communication – mini-pictures and clear flow easy to talk through with client complementary – different paradigm than implementation fast pay back – quicker to produce application (at least 1000%) responsive – rapid turnaround of changes reliability – clear boiler plate code less error-prone quality – easy to establish test cycle maintenance – easy to relate bug/enhancement reports to specification and code 7

  8. states in web applications (inter alia) pretty clear in database • persistent (deep) state or similar – the things you are really interested in e.g. an order, images in an album, facebook profile • temporary interaction state – part-created or part-edited objects e.g. new cracker setting decoration, joke, etc. • placeholder in interaction – current state/mode/location in dialogue less clear and often confused where state is stored (a) cookies (b) hidden form variables – <input type=“hidden” name=“sid” value=“A378F9E6B2” /> (c) encoded in URL – http://mysite.com/processapp.jsp?sid= A378F9E6B2 (d) session variables – session/transaction id stored using (a), (b), or (c) (e) database or persistent store – as (d) needs identifier or token 8

  9. what goes where? interaction issues: – multiple windows on same app? – privacy and security – ‘back’ button? … and bookmarks danger of ‘resubmitting’ same data implementation issues why ‘stateless’ often – ‘garbage collecting’ session data regarded as good – restarting server … but not necessarly best for interaction! often ‘hacked’ not considered lesson – clearly specify the state … and only then map into implementation! dialogue too … the way it often is … initial prototype linear code to <?php $x= … produce A then B then … ?> page A syuh how gtw hsio i ert ag ty ghn ty we ghty chdi qw oatyf wet d fl a ght a at most one path for each link/button user clicks code for link page B <?php $y= … DB ?> update and fetch syuh how gtw hsio i ert ag ty ghn ty we ghty data chdi qw oatyf wet d fl a ght a 9

  10. … and the way it goes … initial prototype linear code to <?php $x= … produce ?> but … page A syuh how gtw hsio i ert ag ty later add validation ghn ty we ghty chdi qw oatyf wet d fl a ght a if validation fails code for page B code needs page B to produce something <?php ‘like’ page A if ($y<1) … DB ?> … and it just keeps syuh how gtw syuh how gtw hsio i ert ag ty hsio i ert ag ty ghn ty we ghty ghn ty we ghty chdi qw oatyf chdi qw oatyf getting worse page A page B wet d fl a ght a wet d fl a ght a separate dialogue and presentation DB <?php model dialogue $x = ?> fetch data for page A – take into account both syuh how gtw hsio i ert ag ty user and system branches ghn ty we ghty format page A chdi qw oatyf wet d fl a ght a three kinds of code – gather data for page process actions from page A access database <?php update data but no updates except logging if $y ?> decide what – format page DB comes next only code to produce HTML maybe use template engine <?php – post-page process actions $y = validation checks ?> fetch data for page A update persistent data syuh how gtw hsio i ert ag ty ghn ty we ghty choose next page to show chdi qw oatyf format page B wet d fl a ght a view / dialogue & presentation semantics 10

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend