AOJS: aspect-oriented javascript programming framework for web development

JavaScript is a popular scripting language that is particularly useful for client-side programming together with HTML /XML on the Web. As JavaScript programs become more complex and large, separation of concerns at the implementation level is a significant challenge. Aspect orientation has been a well known concept to realize improved separation; however, existing mechanisms require modifications in the target modules for aspect weaving in JavaScript (i.e., not "complete" separation). In this paper, we propose an Aspect-Oriented JavaScript framework, named "AOJS", which realizes the complete separation of aspects and other core modules in JavaScript. AOJS can specify function executions, variable assignments and file initializations in JavaScript programs as the joinpoints of aspects. Moreover, AOJS guarantees the complete separation of aspects and core program modules by adopting a proxy-based architecture for aspect weaving. By utilizing these features, we confirmed that AOJS offers improved modifiability and extendability for JavaScript programming.