pharoconf19 - spec2files.pharo.org/conferences/2019pharodays/02 spec.pdf · • multiple backends...
TRANSCRIPT
![Page 1: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/1.jpg)
Spec 2.0The next step on desktop UI
![Page 2: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/2.jpg)
Spec 2 is a team work
![Page 3: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/3.jpg)
–Most requested feature every ESUG (personal survey)
“How to do a desktop application with Pharo?”
![Page 4: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/4.jpg)
How can you do an Application today?
• Morphic
• Spec 1.0
• Glamour
• … others
![Page 5: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/5.jpg)
There has to be only one!(and it has to be easy to use)
![Page 6: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/6.jpg)
Why Spec?
• Modular design
• Testable
• Morphic is low-level: powerful, but too much when doing a regular application (same applies to bloc, by the way)
• Spec can cover Glamour specifics easier than Glamour covering Spec specifics
![Page 7: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/7.jpg)
A Presenter
ComposablePresenter
Layout A
Layout B
Layout C
![Page 8: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/8.jpg)
A composed PresenterComposablePresenter
ComposablePresenter
Layout A
Layout B
LayoutC
ComposablePresenter
Layout A
Layout B
LayoutC
ComposablePresenter
Layout A
Layout B
LayoutC
ComposablePresenter
Layout A
Layout B
LayoutC
Layout A
Layout B
LayoutC
![Page 9: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/9.jpg)
The original plan
Application
Spec
Morphic
![Page 10: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/10.jpg)
The original plan
Application
Spec
Morphic
Adapter
Others…
![Page 11: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/11.jpg)
The reality
Application
Spec
Morphic
Adapter
![Page 12: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/12.jpg)
The reality
• Specs mixed with morphs/adapters
• Presenters design are too contaminated with morph design
• Applications need to “jump” layers to do what they need
Application Spec
MorphicAdapter
![Page 13: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/13.jpg)
Spec 2.0!
• The design is already there: Spec 2.0 is about making original Spec design to work properly
• Remove interpreter (because is not needed)
• All Pharo tools needs to be developed with Spec 2.0
- Having a base UI design for everything
- Allow to change backends without rewriting the full UI
![Page 14: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/14.jpg)
Some new (or/and revisited) concepts…
![Page 15: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/15.jpg)
Presenters
• A Presenter is the base “presenting” UI mechanism.
- They can be composed!
• All existing presenters has been revisited (or they will be)
• Some of them has been deprecated! (Tree, TabManager…)
• Some others has even added (Table, TreeTable, ToolBar, …)
![Page 16: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/16.jpg)
Layouts• Instead one big do-it-all layout, small layouts with well defined function
- Box (vertical, horizontal)
- Paned (vertical, horizontal)
- Grid
- Scrollable
- Others to come
• Also layouts can be composed!
• Current SpecLayout will be deprecated (and removed)
![Page 17: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/17.jpg)
Application• Entry point of any application (including Pharo)
• Window flow
• Common resources
- “UI Manager” for standard dialogs
- Icons/images
- Theme
• Backend
![Page 18: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/18.jpg)
Backends
• Morphic Backend
• Gtk3 Backend
• Future: Bloc backend
![Page 19: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/19.jpg)
Demo(s) :)
![Page 20: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/20.jpg)
![Page 21: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/21.jpg)
![Page 22: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/22.jpg)
![Page 23: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/23.jpg)
![Page 24: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/24.jpg)
![Page 25: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/25.jpg)
![Page 26: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/26.jpg)
Spec 2.0 summary• Easy way to create REAL desktop applications!
• Multiple backends (starting with Morphic and Gtk3, Bloc will be added later)
• For Pharo: Easy migration from one backend to another
• Coming SOON (™)
- Pharo 8
- There will be a migration path (most cases are compatible or straightforward)
![Page 27: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/27.jpg)
Extra: Why GTK3?
• Cross platform
• Open source (LGPL)
• Mature
• Popular
• C bindings
![Page 28: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/28.jpg)
Extra: Missing parts• Finish missing/incomplete presenters
- Rich text presenter, …
- Some layouts
• Stabilisation
• Pass on API
• Pass on features
• Headless VM and image-side parts
![Page 29: PharoConf19 - Spec2files.pharo.org/conferences/2019PharoDays/02 Spec.pdf · • Multiple backends (starting with Morphic and Gtk3, Bloc will be added later) • For Pharo: Easy migration](https://reader034.vdocuments.site/reader034/viewer/2022052008/601cea1dc0277435b116633c/html5/thumbnails/29.jpg)
Extra: The place of bloc
• Replacement of Morphic (not Spec)
• Low level: Applications will still need some higher level layer