PharoJS Logo

Documentation

StudyingCoding
Practical
Steps
Tutorials
Learning-Oriented
How-To Guides
Problem-Oriented
Theoretical
Knowledge
Discussions
Understanding-Oriented
Reference
Information-Oriented

Tutorials

Getting Started with PharoJS

Medium Post by Richard Kenneth Eng

PharoJS is a great way to do front-end web development. It offers two tremendous benefits:

How-To Guides

Running PharoJS Examples

A dedicated page explains through an example how to run PharoJS built-in examples.

How to Develop Mobile Apps with PharoJS?

A dedicated page explains through an example how to build a mobile app using PharoJS. It relies on Apache Cordova (formerly PhoneGap) to turn HTML based project into Anroid and iOS applications.

Discussions

Talk at the ESUG 2018 Conference, Tuesday 11th September, Cagliari, Italy

Abstract: This talk is an update on PharoJS (http://pharojs.org). It covers the current status of the PharoJS development process, as well as its tools. Through an example, we will describe how to use PharoJS, and how it supports TDD, starting with a Pharo code, and ultimately compiling it to Javascript that runs on a JS interpreter (Web browser, NodeJS...). The talk will also give a glimpse of some recent applications developed using PharoJS, and draw a roadmap for the future of PharoJS.

The full code of the example is in the PharoJsExamples package under the PhysicsSimulation tag. The HTML code is in folder HTML/PharoJsExamples/PhysicsSim

A standalone version of this example is converted to Javascript runs here

PharoJS: Pharo-Based TDD for Javascript Applications from ESUG

IWST 2016 Paper: Mocks, Proxies, and Transpilation as Development Strategies for Web Development

Abstract: With the advent of HTML 5, we can now develop rich web apps that rival classical standalone apps. This richness together with the portability of web technologies, turned HTML 5 into a viable (and in the case of mobile - essential) solution to develop cross-platform apps. This possibility is heavily dependent on Javascript having acceptable performance, good testability, and a modern development environment. Despite its extensive use in creating highly interactive environments, most Javascript development environments currently use a compile/run paradigm. Similarlily, testing is frequently tacked on, rather than being an integrated part of the development cycle. We propose PharoJS which leverages the Smalltalk IDE with a seamless transition from native Smalltalk tests, through proxied browser tests, to full browser-resident tests. We support the standard eventdriven browser model and transpile Smalltalk code into efficient Javascript for execution in the browser. We further support testing - both manually and automatically - in a range of browsers to provide assured consistency upon deployment. In addition to transpiling the Smalltalk code to Javascript to perform tests in the browser, we can also run non-interactive tests within the Smalltalk environment. The unique feature we provide is the ability to run interactive tests largely within the Smalltalk IDE, so as to fully exploit the debugging and development environment, while the actual interaction occurs on the browser. We exhibit this new mode of development via a simple application.


Talk at ESUG 2016 Conference, Monday 22nd August, Prague, Czech Republic

Abstract: PharoJS is an infrastructure (framework + middleware + tools) that allows developping and testing in Smalltalk for applications that will ultimately run on a Javascript interpreter. Unlike to Amber, that runs inside a web browser, PharoJS is built on top of Pharo. Apps are initially buit in the image as pure Pharo objects that run on the Smalltalk virtual machine. The PharoJS middleware allows interacting remotely with third party Javascript objects running on a web browser, or interacting with a web view, particularly for mobile apps. Such interactions are used only during tests. Ultimately, the Smalltalk code is converted to Javascript. So, at the production stage, only a Javascript interpreter is required to run the app. In this talk, we present the current status of PharoJS and its implementation. Through an example, we describe the application development process, with a focus on tests and TDD.

Download the ZIP archive with files used for demo.

PharoJS from ESUG

Reference

We don't currently have reference material available.