Skip to main content
Engineering LibreTexts

10.9: Beyond Pharo

  • Page ID
    45917
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Roassal has been designed to be easily ported to other Smalltalk dialects. Currently it has been ported to VisualWorks.

    Roassal consists of three main components:

    • The Roassal Core, a set of packages that define all the main classes, like ROView, ROElement, ROShape and ROCamera. It also contains all the tests.
    • The Mondrian DSL, composed of the Roassal-Builder and Roassal-Builder-Tests packages.
    • The platform-dependent packages, which are dedicated to each Smalltalk dialect Roassal is ported to.

    In the platform-dependent packages several classes must be implemented. The main ones are a native canvas class, where a view can be rendered, and a widget factory class, which can return an object to contain the canvas and receive and delegate all the external events. The first must be a subclass of ROAbstractCanvas and the second must be subclass of RONativeWidgetFactory.

    The ROPlatform class defines how the bridge between the core and the dependent packages must be implemented. This class defines instance variables, like canvasClass and widgetFactory, which store the corresponding classes to use according to their name. Each platform-dependent package must implement its own platform class as subclass of ROPlatform and reference all the implemented platform dependent classes. Internally, every time one of these classes is needed, the core relies on the current instance of ROPlatform to return the needed class.


    This page titled 10.9: Beyond Pharo is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Alexandre Bergel, Damien Cassou, Stéphane Ducasse, Jannik Laval (Square Bracket Associates) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.