| Not from command line - but this will hopefully get you up and running in the IDE and have an idea what Pharo can do. or To deploy on another machine you simply copy the image file - so they can run from pharo. The image can be run headless (doesnt display GUI) if you need to deploy on a server. Run PharoLauncher and Load a Pharo image instance. Once the Pharo Desktop IDE appears type CTRL+O+T to open Transcript - the system log console abnd type CTRL+O+W to open playground - Playground is a window into which you can type. It can be used for any purpose, but is most often used for typing Pharo expressions and equickly executing them. (There are windows /icon menu entries for these as well) In playground window type: Transcript show: 'Hello World'
and press the play 'do it' icon at the top of the playground window to evaluate itYou should now see Hello World appear in the transcript window. What you just did was send the Transcript objects show method the message 'Hello World' Lets do a slightly more complex Cut and paste the following code into the Playground window and click the play button. The first part installs the Roassal visualization framework. It only needs to be run once. The second part uses ROassal's Mondrian API which offers facilities to describe and render graphs. Mondrian allows mapping of metric values and properties into visual dimensions, such as shape and colors. Cut and paste the second piece of code into playground and hit play doit icon to evaluate. In the view panel you should see a simple tree class browser of the installed classes in the Pharo image with size of class coloured and scaled to represent number of source code lines in each class. Note lines in speach marks are comments. "-------------------------------------" "install Roassal visualization engine" "-------------------------------------" Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
configurationOf: 'Roassal2'; loadStable.
"---------------------------------------------------""- Make a Simple interactiver Class Tree Browser -" "---------------------------------------------------" myBrowser := RTMondrian new. myBrowser nodes: Collection withAllSubclasses. myBrowser edges
connectFrom: #superclass. myBrowser normalizer normalizeSize: #numberOfMethods;
normalizeColor: #numberOfLinesOfCode.
myBrowser layout tree.myBrowser |