CONFIGURATION-ORIENTED PROGRAMMING Introduction into the new paradigm Radovan Brečka Department of Computer Science, Comenius University, Mlynská dolina, 842 48 Bratislava, Slovakia email: brecka@dandiway.sk Content History Illustrative examples COP definition How it works Blox® Framework Advantages References History of programming Imperative programming Simple computing definition Pseudo codes Structured & procedural programming Data types, Control structures, Procedures PL/1, C, Pascal, … Object-oriented programming Object (data + code), Inheritance, Dynamic method binding C++, Java, .NET, … Configuration-oriented programming Configuration From OOP to COP OOP Class Data Code COP Module Data Setup (configuration form definition) Code OOP Instance COP Configuration Atributtes Submodules Inheritance + Dynamic method binding OOP vs. COP illustrative example OOP COP COP definition COP Module Data: constants & module configurations (COP configuration) Setup: definition how this module will be configured Code: imperative code with direct configuration support COP Configuration Attributes: defined with respect to Setup part of Module Sub-modules: defined with respect to Setup definition How it works: Example 1 – CMS CMS – Content Management System Modules: Portal, Page, Section, Text, Image Configuration: Representation of Content How it works: Example 1 – CMS Illustrative video 1. How it works: Example 2 – Form Form layer Modules: Data source, Data type, Data attributes Forms, Form attributes Configuration: Data table type Form structure Prerequisites: Created table example with columns: id, name, desc How it works: Example 2 – Form Illustrative video 2. Programming with configuration patterns New programming technique Result is achieved by executing an altered configuration 1. Module / Data – contains the configuration pattern 2. Pattern is modified by code 3. Execution of pattern achieves desired result Programming with configuration patterns Module Person: Method draw alters a configuration stored in Data part according to values of attributes Point X, Point Y and executes it. Programming with configuration patterns Section + Text New module with attributes: userText: String userSkin: String Draws the section with userSkin color with text with userText inside Programming with configuration patterns Illustrative video 3. Blox® Framework Full framework for project development Core implemented in Java executable on J2EE application servers Configuration tool implemented in COP Implemented in itself Modules are defined as configuration of special Setup modules Configuration refactoring Over 1000 modules Blox® Framework Architecture CMS Data Form Security View Extensions OLAP DMS WfMS Blox® Framework Architecture Illustrative video 4. COP Advantages Simpler and faster IS building using configuration Splitting development: Code implementation & Configuration Better reusability of COP modules Setup function directly defines how to use the modules Complex configuration patterns can be hidden in special modules New programming techniques Programming with configuration patterns (sub-problem abstraction) Power of configuration polymorphism (better level of domain decomposition) Simpler IS maintenance Transparent architecture in configuration Configuration refactoring New point of view on Rapid Application Development Prototypes can be build only by configuration Driven through configuration refactoring and module upgrading Practical results Orange Slovensko, a.s. Major mobile operator in Slovakia Back-end of portal: www.orange.sk Slovak Bar Association Independent professional organization, currently associating cca 4100 lawyers and 1220 trainee lawyers Extranet system Intranet system Železničná spoločnosť, a.s. Leader in providing services in rail passenger transport in Slovakia Intranet information system Document management system Workflow management system Thank you for your attention!