presenty: user interface framework
TRANSCRIPT
![Page 1: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/1.jpg)
PresentyUser Interface Framework
http://www.squeaksource.com/Presenty MIT license
![Page 2: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/2.jpg)
Presenty
Platform-independent user interface
application
![Page 3: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/3.jpg)
Desktop contact manager
![Page 4: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/4.jpg)
Filter contacts by typed name
![Page 5: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/5.jpg)
Select contact from groups
![Page 6: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/6.jpg)
Select contact from last calls
![Page 7: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/7.jpg)
Contact selection show details data
![Page 8: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/8.jpg)
Presenty approach
● Multiple separated tasks a user can perform
● Each task is a sequence of user requests● Contact groups selection task:
1) select group from groups list
2) select contact from selected group contents
3) look at selected contact details
![Page 9: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/9.jpg)
Implementation
● Continuation-based tasks as elements of user interaction at application level
● User requests as building blocks for tasks:● Primitive user requests to invoke base interface
components● Compound requests for calling other tasks
● Extendable DSL (pure Smalltalk) facilitating task implementation
● Modified Model-View-Presenter pattern
![Page 10: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/10.jpg)
SelectContactFromGroupsTask
body
| selected group |
group := user select: ContactsGroup from: ContactManager groups.
selected := user select: Contact from: group contents.
user goTo: (DetailedContactPresenter on: selected )
![Page 11: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/11.jpg)
Select contact from groups
![Page 12: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/12.jpg)
SelectContactBySearchTask
body
| selected |
selected := user execute: (
PtySearchItemTask forItems: ContactManager contacts ofClass: Contact).
guide restoreActiveArea.
user goTo: (DetailedContactPresenter on: selected )
![Page 13: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/13.jpg)
SelectContactFromLastCallsTask
body
| selected |
selected := user select: 'LastContact' from: ContactManager lastCalls.
user goTo: (DetailedContactPresenter on: selected )
![Page 14: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/14.jpg)
ShowContactsForDesktopTask
body
guide viewport createNewViewArea.
guide forkTask: SelectContactFromLastCallsTask new.
guide forkTask: SelectContactFromGroupsTask new.
guide forkTask: SelectContactBySearchTask new.
user goTo: [guide showViewArea]
![Page 15: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/15.jpg)
Select contact from last calls
![Page 16: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/16.jpg)
Select contact from last calls
![Page 17: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/17.jpg)
Select contact from groups
![Page 18: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/18.jpg)
Select contact from groups
![Page 19: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/19.jpg)
Filter contacts by typed name
![Page 20: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/20.jpg)
guide translator
![Page 21: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/21.jpg)
Filter contacts by typed name
![Page 22: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/22.jpg)
Filter contacts by typed name
![Page 23: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/23.jpg)
ShowContactsForPhoneTask
body
| taskClass |
guide viewport createNewViewArea.
taskClass := user select: 'ContactManagerTask' from: {SelectContactFromLastCallsTask. SelectContactFromGroupsTask. SelectContactBySearchTask}.
guide addBackButton.
user execute: taskClass new
![Page 24: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/24.jpg)
Task Configuration
● Presenter can have different views in different contexts● For different parent presenters● For different tasks● For different styles of presenter● For different styles of parent presenter
![Page 25: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/25.jpg)
Task Configuration
● Guide can store default settings for tasks– guide create: PtyShowListTask
● Task settings can vary in different contexts
![Page 26: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/26.jpg)
How tasks configured
● PtyItemsListTask has itemPresenterFactory which can be saved in settings● PtyExplicitPresenterFactory specifyed concrete
presenter class to present list items● PtyPresenterPreviewFactory use
#preferredPreviewPresenter message for getting presenter from list item
![Page 27: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/27.jpg)
What should be done● Configurable task activation
● Simple object editor task– user edit: object
● Better designer
● Serializing prototypes and settings to style classes
● Searching for prototypes and settings in multiple task contexts
● Documentation
![Page 28: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/28.jpg)
Questions?
![Page 29: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/29.jpg)
The end
![Page 30: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/30.jpg)
Modal warning example
![Page 31: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/31.jpg)
Tasks from blocks
DetailedContactPresenter>>runCall
guide executeTask: [
guide doInModal: [
guide user warn: 'You dial to ', model printString].
guide user stopCurrentTask.
] asTask
![Page 32: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/32.jpg)
Presenty UI framework
● Modified Model-View-Presenter pattern
● Continuation-based tasks as elements of user interaction at application level
● User requests as building blocks for tasks:● Primitive user requests to invoke base interface
components● Compound requests for calling other tasks
● Extendable DSL (pure Smalltalk) facilitating task implementation
● Prototyping for visual components and tasks
![Page 33: Presenty: User Interface Framework](https://reader030.vdocuments.us/reader030/viewer/2022032419/55a2bdf61a28ab69268b465c/html5/thumbnails/33.jpg)
Modified Model-View-Presenter pattern