BECS 2022 – 2nd International Workshop on Big data driven Edge Cloud Services
Aspect-Oriented Software Development of Web Systems With Type-Engineering
Building evolvable real-world web systems requires more of an engineering mindset, rather than pure programming ability. The architectural patterns of the design stage necessary for future scalability, testability and modularity, necessitate a careful consideration and special treatment in form of purpose-built tools that support the engineering process and go beyond routine coding experience. For example, in the field of Systems Engineering, the professionals are embracing the utility of model-driven approach and the power of the holistic process that it unlocks; and in the field of Electrical Engineering, the designers have access to powerful CAD applications that are concerned not only with drafting Integrated Circuits, but also with putting them together – yet Software Engineering in general, and Web Computing in particular, lacks those great opportunities for reuse via composition and decomposition – and we argue that is because we have been limiting ourselves both by programming-centred (rather than design-centred) approach to the development process, and by the linearity of standard OOP model which hasn’t received a conceptual upgrade in a long time.
To advocate the design-first perspective and shed the light upon its numerous benefits, we firstly introduce the Web Engineering audience to type.engineering: an IDL and generative framework that provides means to define a model by writing programs’ types in simple XML notation, and then generate headers and abstract classes for any particular language (in our case, Node.JS), which act as a bridge between interfaces and implementations, allowing us to move towards the engineering end of the skill spectrum. Secondly, we present an accompanying runtime library called type-engineer that enables multiple inheritance via trait composition, catering for much more agile development process. Thirdly, once we have made the cognitive leap towards the non-linear inheritance, we can finally tap into the Aspect-Oriented Software Development principles and practices, in which methods on traits don’t just override each other like in classes, but can be combined, giving us an opportunity to weave in external implementations of cross-cutting concerns (e.g., logging, security) declaratively and statically, withoutinvading on the existing code, making our programs less error-prone and easier to comprehend and test.
Because the biggest advantage of model-driven development is its effectiveness in establishing software product lines, we will not just build a real-world web system, but focus on creating a framework for building such systems, in form of a Telegram chat bot, using the concepts of type.engineering design principles. We will then proceed to apply this framework to build an actual bot which accepts multiple commands that address different business requirements – and use trait-inheritance to avoid cramming all methods on a single class, which will drastically reduce the complexity. Finally, using the weaving capabilities of the type-engineer composition library, we will weave in access control, dependency injection and journaling aspects around our core program, while verifying former in unit, and later in integration tests. As an extra perk, we will also type-check and compile our code using the Google Closure Compiler, teaching its core concepts of externs and runtypes. The tutorial is intended for all Web Engineers who have felt, but might not been able to express, the limitations of programming-first and linear- OOP approaches in building web systems, and are open to learning new ways of modelling their architectures and composing their components via more design-focused, state-of-the-art tooling support.