Thursday, 12 February 2026

About the Calculator (MVPL Platform)

 In my previous posts I have written about a calculator app and how to generate it using AI such as ChatGPT.


The calculator is built as a Modular Variability Product Line (MVPL) platform rather than a fixed application. The core index.html provides a stable arithmetic engine, a slot-based keypad layout, customer profile support, and a runtime extension system. New capabilities are added by creating small JavaScript extension files that register themselves with the platform and use a defined extension API to add buttons, modify behaviour, or store profile-specific state. Because extensions are activated through profiles and dependency orchestration, the same core calculator can safely support multiple use cases such as education, scientific calculation, or domain-specific workflows without modifying the core code. This architecture allows the calculator to evolve through composable features while maintaining layout stability and preventing extension conflicts.


The platform is intentionally lightweight and can be run locally using Textastic on an iPad. To do this, place the index.html file and any extension files (for example inverse.js) inside the same folder in Textastic’s file workspace. Opening index.html inside Textastic and selecting the “Preview in Safari” option launches the calculator in the browser while still allowing the source files to be edited on the device. Additional extensions can be tested simply by placing new extension JavaScript files into the folder and referencing them with <script> tags in index.html, making the setup an accessible mobile development and experimentation environment.

No comments:

Post a Comment