PharoJS Logo

Running PharoJS Examples

In this tutorial, we explain how to run PharoJS built-in examples. More precisely, we show the 3 steps to run the Counter example. We assume that you have successfully performed the PharoJS install procedure.

1. Launch app via PharoJS menu

PharoJS extends the World menu with an entry. It lists all PharoJS apps. For this example, we use the counter app. We choose the first option to lauch it. It means that the counter code runs in Pharo. It talks over a web socket to DOM objects.Alternatively, you can the second option, where the app's Pharo code is converted to JS and run on the remote Javascript interpreter (typically a web browser).

Menu to launch PharoJS Counter

3. HTML file linked to the app opens in your web browser

Note that the file is local to your disk. It is downloaded from GitHub, along with PharoJS code.

Counter App web browser UI

3. PharoJS Playground opens in Pharo

Here you can interact with the app. You can send messages to app objects, including DOM objects.

PharoJS playground for the Counter App