Mocks, Proxies, and Transpilation

BOURAQADI, Noury and MASON, Dave, 2016. Mocks, Proxies, and Transpilation as Development Strategies for Web Development. In: Proceedings of the 11th edition of the International Workshop on Smalltalk Technologies. New York, NY, USA: Association for Computing Machinery. 23 August 2016. p. 1–6. [Accessed 30 August 2022]. IWST’16. ISBN 978-1-4503-4524-8. DOI 10.1145/2991041.2991051.

> With the advent of HTML5, 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. Similarly, 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 event-driven 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.

~

AGUIAR, Francisco Ricardo Taborda and DA COSTA, Dalberto Dias, [no date]. COBEM2021-0441 TRANSPILATION FROM NC FILES TO CANONICAL MACHINING FUNCTIONS. . Online. Available from: http://www.labusig.ufpr.br/projetos/COBEM-21-FRANCISCO.pdf [Accessed 8 January 2024]. ANDRÉS, Bastidas F. and PÉREZ, María, 2017. Transpiler-based architecture for multi-platform web applications. In: 2017 IEEE Second Ecuador Technical Chapters Meeting (ETCM). Online. IEEE. 2017. p. 1–6. Available from: https://ieeexplore.ieee.org/abstract/document/8247456/ [Accessed 8 January 2024]. BÉLANGER, Marc-André and FEELEY, Marc, 2021. A Scheme Foreign Function Interface to JavaScript Based on an Infix Extension.. Online. 2021. Available from: https://www-labs.iro.umontreal.ca/~feeley/papers/BelangerFeeleyELS21.pdf [Accessed 8 January 2024]. BOURAQADI, Noury and MASON, Dave, 2016. Mocks, Proxies, and Transpilation as Development Strategies for Web Development. In: Proceedings of the 11th edition of the International Workshop on Smalltalk Technologies. Online. New York, NY, USA: Association for Computing Machinery. 23 August 2016. p. 1–6. IWST’16. ISBN 978-1-4503-4524-8. DOI 10.1145/2991041.2991051. [Accessed 30 August 2022]. 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. Similarly, 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 event-driven 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. BOURAQADI, Noury and MASON, Dave, 2018. Test-driven development for generated portable Javascript apps. Science of Computer Programming. Online. 2018. Vol. 161, p. 2–17. Available from: https://www.sciencedirect.com/science/article/pii/S0167642318300595 [Accessed 8 January 2024]. BOURAQADI, Noury and MASON, Dave, 2023. PharoJS: Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6. In: International Workshop on Smalltalk Technologies. Online. 2023. Available from: https://hal.science/hal-04194673/ [Accessed 8 January 2024]. ESTÉVEZ GÁMEZ, Selene and OLIVARES ZEPAHUA, Beatriz Alejandra, 2018. Desarrollo de un generador de Aplicaciones Enriquecidas de Internet modeladas bajo el patrón arquitectónico MVC usando UML e IFML. Online. PhD Thesis. Available from: http://repositorios.orizaba.tecnm.mx:8080/xmlui/handle/123456789/392 [Accessed 8 January 2024]. MISSE-CHANABIER, Pierre, 2022. Testing a virtual machine developed in a simulation-based virtual machine generator. Online. PhD Thesis. Université de Lille. Available from: https://theses.hal.science/tel-04139297/ [Accessed 8 January 2024].

MISSE-CHANABIER, Pierre, POLITO, Guillermo, BOURAQADI, Noury, DUCASSE, Stéphane, FABRESSE, Luc and TESONE, Pablo, 2022. Differential Testing of Simulation-Based Virtual Machine Generators: Automatic Detection of VM Generator Semantic Gaps Between Simulation and Generated VMs. In: PERROUIN, Gilles, MOHA, Naouel and SERIAI, Abdelhak-Djamel (eds.), Reuse and Software Quality. Online. Cham: Springer International Publishing. p. 103–119. Lecture Notes in Computer Science. ISBN 978-3-031-08128-6. [Accessed 8 January 2024]. MISSE-CHANABIER, Pierre, POLITO, Guillermo, DUCASSE, Stéphane, BOURAQADI, Noury, FABRESSE, Luc and TESONE, Pablo, 2022. Differential testing of simulation-based VM generators: automatic detection of VM generator semantic gaps between simulation and generated VMs. In: Proceedings of the 37th ACM/SIGAPP Symposium on Applied Computing. Online. Virtual Event: ACM. 25 April 2022. p. 1280–1283. ISBN 978-1-4503-8713-2. DOI 10.1145/3477314.3507171. [Accessed 8 January 2024].

NUNNARI, Fabrizio and HELOIR, Alexis, 2018. Write-Once, Transpile-Everywhere: Re-using Motion Controllers of Virtual Humans Across Multiple Game Engines. In: DE PAOLIS, Lucio Tommaso and BOURDOT, Patrick (eds.), Augmented Reality, Virtual Reality, and Computer Graphics. Online. Cham: Springer International Publishing. p. 435–446. Lecture Notes in Computer Science. ISBN 978-3-319-95269-7. [Accessed 8 January 2024]. SELENE, Estévez Gámez and OLIVARES ZEPAHUA, Beatriz Alejandra, 2018. Desarrollo de un generador de Aplicaciones Enriquecidas de Internet modeladas bajo el patrón arquitectónico MVC usando UML e IFML. Online. PhD Thesis. Available from: http://repositorios.orizaba.tecnm.mx:8080/xmlui/handle/123456789/173 [Accessed 8 January 2024].