Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Case Study of Variation Mechanism in an Industrial Product Line

Similar presentations


Presentation on theme: "A Case Study of Variation Mechanism in an Industrial Product Line"— Presentation transcript:

1 A Case Study of Variation Mechanism in an Industrial Product Line
tes 4th International Workshop on Bidirectional Transformation in Architecture-Based Component Composition A Case Study of Variation Mechanism in an Industrial Product Line Xin Peng Fudan University Published in ICSR 2009 joint work with Prof. Stan Jarzabek from National University of Singapore (NUS)

2 tes Software Product Line A software product line is a set of software-intensive systems sharing a common, managed set of features that satisfy the specific needs of a particular market segment or mission. Paul Clements, SEI 2019/7/21

3 Motivation Realities of SPL practices in small companies
tes Motivation Realities of SPL practices in small companies not employing any advanced variation mechanisms (e.g. AOP, FOP, XVCL...), only some simple mechanisms used but it often works well with a very small SPL team WFMS product variants used at over 100 universities in China: Fudan University, Shanghai Jiaotong University, Zhejiang University, Harbin Institute of Technology, … Maintained by 1-2 developers and supported by more service engineers Evolved for more than 6 years Research problems What mechanisms are used How well do they work What are the pros and cons Are there any possible improvements 2019/7/21

4 WFMS Product Line (WFMS-PL)
tes WFMS Product Line (WFMS-PL) Wingsoft Financial Management System (WFMS) a product line practice in a small company, Fudan Wingsoft Ltd financial management for colleges and institutes: provide Web-based financial services for employees and students in first developed in 2003 and evolved to an SPL with more than 100 customers Tuition Management Subsystem (TMS) A subsystems of WFMS A web-based portal for students to pay online their tuition fee 20K LOCs Java code and other source files 25% source code of the whole system representative types of variability and variation mechanisms 2019/7/21

5 TMS Feature Model 32 Variant Features 2019/7/21
tes TMS Feature Model 32 Variant Features 2019/7/21

6 Variations in TMS Types of variant features
tes Variations in TMS Types of variant features Fine-grained feature: affecting many system components, at many small variation points in implementation Coarse-grained feature: usually including whole files into a customized product when the feature is selected Mixed-grained feature: involving both fine- and coarse-grained impacts on implementation Implementation Objects in TMS Java source code (the most common configuration object) Others: JSP (HTML) files, configuration files (XML), DB schema (SQL Scripts) 2019/7/21

7 Variation Mechanisms Used in TMS
tes Variation Mechanisms Used in TMS Five variation mechanisms Conditional compilation & comments Design patterns & reflection Overloaded fields Ant Parameter configuration file Number of features involved for each techniques # Techniques # Features Conditional compilation & comments 31 Ant 19 Overloading fields 13 configuration items 12 Design Pattern & reflection 3 2019/7/21

8 Conditional Compilation & Comments
tes Conditional Compilation & Comments For fine-grained variation points Java conditional compilation for Java source code files Final-boolean mechanism in Java: if a final-boolean variable’s value is false, then the code in the statements under if is not compiled into the generated bytecode file and vice versa Comments for non-java files e.g., JSP files, SQL files Example: Conditional Compilation 2019/7/21

9 Design patterns & Reflection
tes Design patterns & Reflection Usually used with Reflection and other variation mechanisms (e.g., Ant) Most used design patterns in TMS AbstractFactory with FactoryMethod Strategy Example: Strategy Pattern with Reflection 2019/7/21

10 Overloaded Fields For the configuration in DB schema
tes Overloaded Fields For the configuration in DB schema A table may have some general fields named spec_1, spec_2 ... spec_n They can have different meanings in different product variants E.g. the same field may be used to store bank card number in one product variant and ID card number in another one Pros: several product share the same DB schema, not need to configure for specific product Cons: hard to distinguish if too many product variants share the same field, error-prone 2019/7/21

11 Ant For coarse-grained feature configuration
tes Ant For coarse-grained feature configuration The build tool can move needed files from core asset to product release directory Example: configure DownloadPaymentDetail with Ant 2019/7/21

12 Parameter configuration file
tes Parameter configuration file Self-defined XML configuration file Containing both data and control parameters Can be combined with branching statements for variation implemention Can also develop self-implemented tool to read the file and do configuration e.g. generating the Ant configuration file Example: configuration file 2019/7/21

13 Summary of Variation Mechanisms for all the TMS Features
tes Summary of Variation Mechanisms for all the TMS Features - More than 80% features (26 among 32) were managed by more than one variation mechanism Design patterns/Configuration file/Ant were always used together with other mechanisms - Almost all features involved the use of conditional compilation and/or commenting out feature code 2019/7/21

14 Summary of Variation Mechanism
tes Summary of Variation Mechanism 2019/7/21

15 Evaluation of Feature Granularity
tes Evaluation of Feature Granularity Statistics for implementation-level variation points per granularity level Fine-grained impacts caused most of the configuration problems Problem: how to properly configure all fine-grained variation points for the same feature? Introduced by bad modularization for variation implementation 2019/7/21

16 Evaluation of Traceability
tes Evaluation of Traceability Statistics for configuration points in example features Traceability Each feature may be addressed at many variation points scattered through many SPL core components Problem: how to find and analyze the code at all these variation points? A SPL core component is usually affected by many features that may be managed by different possibly overlapping variation mechanisms Problem: how to understand interactions among these mechanisms? 2019/7/21

17 Overall Evaluation Pros: Cons:
tes Overall Evaluation Pros: Each mechanism is easy to learn and apply No need for training, third party tools, etc Cons: Many variation points, in many components Complex mappings: features-to-components Using many mechanism together is not easy Manual, tedious, error-prone customizations Reuse and evolution of PLA is not easy 2019/7/21

18 tes Conclusion Fundamental differences in capabilities of variation mechanisms justify the use of multiple variation mechanisms Different variation mechanisms have different, often complementary strengths and weaknesses Feature characteristics must be matched by the capabilities of variation mechanism (s) used to manage the feature However, over time the inter-play between multiple variation mechanisms may become difficult to comprehend, configure and manage 2019/7/21

19 tes Thanks! Q&A 2019/7/21


Download ppt "A Case Study of Variation Mechanism in an Industrial Product Line"

Similar presentations


Ads by Google