Successfully reported this slideshow.
Your SlideShare is downloading. ×

Application Development with Pharo

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Functional Smalltalk
Functional Smalltalk
Loading in …3
×

Check these out next

1 of 56 Ad

More Related Content

Slideshows for you (20)

Similar to Application Development with Pharo (20)

Advertisement

More from ESUG (20)

Recently uploaded (20)

Advertisement

Application Development with Pharo

  1. 1. P. Tesone - G.Polito - 23/08/2022 - ESUG22 Application Development with Pharo
  2. 2. We want to develop in Pharo • Cool Tools • Iterative Process • Fun & Addictive 2 We want Pharo Everywhere
  3. 3. Not applications are the same • Di ff erent User Interactions • Di ff erent Technologies • Not Two Applications Are the Same… 3
  4. 4. Pharo has a Rich Ecosystem • Tools • Frameworks • Language Support 4
  5. 5. Pharo has a Rich Ecosystem • Tools • Frameworks • Language Support 5 Let’s See Case by Case
  6. 6. Web Applications 6 www.seaside.st astares/Seaside-Bootstrap5 pharojs.org ba-st/RenoirSt ba-st/Willow
  7. 7. Web Applications 7 www.seaside.st astares/Seaside-Bootstrap5 pharojs.org ba-st/RenoirSt ba-st/Willow Easy… we are cool here
  8. 8. Rest Servers / Rest Clients 8 ba-st/Stargate ba-st/Superluminal svenvc/zinc zero fl ag/Teapot https://books.pharo.org/booklet-Zinc/ https://books.pharo.org/enterprise-pharo/
  9. 9. IOT Applications 9 pharo-iot/PharoThings SquareBracketAssociates/Booklet-APharoThingsTutorial Native VM for RaspberryPi ARM32 / ARM64
  10. 10. Desktop Applications 10 pharo-spec/Spec pharo-spec/Spec-Gtk pharo-graphics/Spec-Brick Morphic Backends Integrated in Pharo We used it daily
  11. 11. Desktop Applications 11 pharo-spec/Spec pharo-spec/Spec-Gtk pharo-graphics/Spec-Brick Morphic Backends Without Morphic Loadable in a minimal Image
  12. 12. Command Line Applications • Extended Support for: • VTerm Colors • Command Line Parsing • Headless mode • VM Without dependencies on the Graphic UI 12 pharo-contributions/clap-st Loaded in Pharo
  13. 13. 13 We have our application developed… We are done… let’s go party
  14. 14. We have our application developed… We are done… let’s go party 14 Not So Fast… We need to make it available to the users
  15. 15. Once the Application is developed… • We Need to think on: • Making a Release Version • Branding • Veri fi cation • Distribution • Deployment • Errors Handling 15
  16. 16. Once the Application is developed… • We Need to think on: • Making a Release Version • Branding • Veri fi cation • Distribution • Deployment • Errors Handling 16 We will not see these…
  17. 17. Once the Application is developed… • We Need to think on: • Making a Release Version • Branding • Veri fi cation • Distribution • Deployment • Errors Handling 17 We will see these
  18. 18. Making a Release Version Let’s create an image 18 My AppCode Pharo Image
  19. 19. Making a Release Version Let’s create an image 19 My AppCode Do we want to distribute the whole Pharo Image? Pharo Image
  20. 20. Making a Release Version Let’s create an image 20 My AppCode Do we want to distribute the whole Pharo Image? Pharo Image Tools?… UI?… Debugger?
  21. 21. Making a Release Version Let’s create an image 21 My AppCode We can use the minimal Image and load what we need Minimal Image
  22. 22. Making a Release Version Let’s create an image 22 My AppCode We can use the minimal Image and load what we need Minimal Image The minimal Image is generated during the bootstrap
  23. 23. Making a Release Version Let’s create an image 23 My AppCode We can use the minimal Image and load what we need Minimal Image The minimal Image is generated during the bootstrap Ask If you are interested…
  24. 24. Branding Make your App look like it is your App • Icons • Resources (App Metadata) • My App Executable • The remaining stu ff : • Main window open or not, • application title, • additional windows, • about dialog, • etc… 24
  25. 25. My APP as a Thin Layer • My Own Icons • My Own information • Built using Pharo VM as a library 25
  26. 26. Branding Proposed Architecture • Small 26 MyApp Executable Pharo VM Dynamic Lib Image
  27. 27. Branding Proposed Architecture • Small 27 Builded by Pharo MyApp Executable Pharo VM Dynamic Lib Image
  28. 28. Branding Proposed Architecture • Small 28 Generated as usual MyApp Executable Pharo VM Dynamic Lib Image
  29. 29. Branding Proposed Architecture • Small 29 Customizable Build MyApp Executable Pharo VM Dynamic Lib Image
  30. 30. How to Implement it… • A Simple CMake Script and some simple fi les 30
  31. 31. My Thin App 60 lines of code with comments • Just a Main Function 31
  32. 32. Some Resources • In Windows: • A Resource fi le with icon information & Metadata of the application (Developer, version, etc) • In OSX: • A PList with information about the icons, fi le associations and metadata of the application. 32
  33. 33. What else… 33 • Downloads Pharo VM • Build Thin Executable • Integrate Resources
  34. 34. Verification • Applications should be signed • Signing should be done by the developer • All executing code should be signed 34
  35. 35. Verification • Applications should be signed • Signing should be done by the developer • All executing code should be signed 35 We have to assure that our applications is not tainted
  36. 36. Verification • Applications should be signed • Signing should be done by the developer • All executing code should be signed 36 What we do with the image? The image is executable code… We have to assure that our applications is not tainted
  37. 37. Alternative 1: Embedding as a Resource • If the image not change we can embed it as a resource. My Main Pharo VM Dynamic Image My Executable 37
  38. 38. Alternative 1: Embedding as a Resource My Main Pharo VM Dynamic Image It can be signed and validated as any other Executable in the OS • If the image not change we can embed it as a resource. My Executable 38
  39. 39. My Main Pharo VM Dynamic Image Updating the image requires to update the executables Alternative 1: Embedding as a Resource • If the image not change we can embed it as a resource. 39 My Executable
  40. 40. My Main Pharo VM Dynamic Image We need to change the reading of the image to read from the embedded resource Alternative 1: Embedding as a Resource • If the image not change we can embed it as a resource. 40 My Executable
  41. 41. Proposed Architecture Alternative 2: We sign it outside the executable We can update the Image downloading a new one MyApp Executable Pharo VM Dynamic Lib Image 41
  42. 42. We need to update the read to check the image signature… Alternative 2: We sign it outside the executable 42 Proposed Architecture MyApp Executable Pharo VM Dynamic Lib Image
  43. 43. It is not validated by the OS… we need to validate it on loading Alternative 2: We sign it outside the executable 43 Proposed Architecture MyApp Executable Pharo VM Dynamic Lib Image
  44. 44. Implementing Alternative 1 Same Repository… 44
  45. 45. Implementing Alternative 1 Same Repository… 45 We implement the veri fi cation of the image in the same fashion…
  46. 46. Distribution / Installation • Windows • OSX 46 We have a normal application, we can distribute as usual
  47. 47. Distribution / Installation • Windows • OSX • Linux 47 We have a normal application, we can distribute as usual OBS
  48. 48. Open Build Service https://openbuildservice.org/ • Attack Distributions Di ff erences • Build for many architectures at the same time. 48 Our Package: devel:languages:pharo:latest/pharo9
  49. 49. Open Build Service https://openbuildservice.org/ • Attack Distributions Di ff erences • Build for many architectures at the same time. 49 Our Package: devel:languages:pharo:latest/pharo9
  50. 50. Open Build Service https://openbuildservice.org/ • Attack Distributions Di ff erences • Build for many architectures at the same time. 50 Our Package: devel:languages:pharo:latest/pharo9 We are using… great for creating packages
  51. 51. Open Build Service https://openbuildservice.org/ • Attack Distributions Di ff erences • Build for many architectures at the same time. 51 Our Package: devel:languages:pharo:latest/pharo9 Ideal for Open source Packages… you can use OpenSuse Infra For Non-OpenSource easy to run in-house The packages can be integrated in default repositories It provides a native repository supporting updates
  52. 52. Bonus: Remember FFI 52
  53. 53. FFI: Opening the game to external libraries Let’s not reinvent the wheel 53
  54. 54. FFI: Opening the game to external libraries Let’s not reinvent the wheel 54 Reusing Libraries Interacting with the OS
  55. 55. FFI: Opening the game to external libraries Let’s not reinvent the wheel 55 Integrated in Pharo https://books.pharo.org/booklet-u ffi /
  56. 56. 56 Application Development with Pharo Pablo Tesone - Guille Polito pablo.tesone@inria.fr
 @tesonep Making a Release Version Branding Veri fi cation Distribution Deployment Errors Handling

×