The rise of Node.js in 2010, followed by frameworks like Angular, React, and Vue.js, has accelerated the growth of low code development platforms. These platforms harness modern UIX paradigms, component-based architectures, and the SaaS model to enable non-experts to build software. The widespread adoption of single-page applications (SPAs), driven by these frameworks, has shaped low-code tools to deliver responsive, client side experiences. In parallel, many modeling platforms have moved to the cloud, adopting either server-centric architectures (e.g., GSLP) or client-side intelligence via SPA frameworks, anchoring core components in JavaScript or TypeScript. Within this context, OCL.js, a JavaScript-based implementation of the Object Constraint Language, offers a web aligned approach to model validation, yet faces challenges such as partial standard coverage, limited adoption, and weak integration with modern front-end toolchains. In this paper, we explore JSX, a declarative, functional subset of JavaScript/TypeScript used in the React ecosystem, as an alternative to constraint expression in SaaS-based modeling environments. Its component-oriented structure supports inductive definitions for syntax, code generation, and querying. Through empirical evaluation, we compare JSX-based constraints with OCL.js across representative modeling scenarios. Results show JSX provides broader expressiveness and better fits front-end-first architectures, indicating a promising path for constraint specification in modern modeling tools.
翻译:2010年Node.js的兴起,以及随后Angular、React和Vue.js等框架的出现,加速了低代码开发平台的发展。这些平台利用现代UIX范式、基于组件的架构和SaaS模型,使非专业人士能够构建软件。由这些框架推动的单页应用程序(SPA)的广泛采用,塑造了低代码工具以提供响应式的客户端体验。与此同时,许多建模平台已迁移到云端,采用以服务器为中心的架构(例如GSLP)或通过SPA框架实现客户端智能,将核心组件锚定在JavaScript或TypeScript中。在此背景下,OCL.js(基于JavaScript的对象约束语言实现)提供了一种与Web对齐的模型验证方法,但仍面临部分标准覆盖不全、采用有限以及与现代前端工具链集成薄弱等挑战。本文探讨了JSX(React生态系统中使用的JavaScript/TypeScript的声明式函数式子集)作为SaaS建模环境中约束表达的替代方案。其面向组件的结构支持语法、代码生成和查询的归纳定义。通过实证评估,我们在代表性建模场景中比较了基于JSX的约束与OCL.js。结果表明,JSX提供了更广泛的表达能力,并且更契合前端优先架构,这为现代建模工具中的约束规范指明了一条有前景的路径。