skip to main content
10.1145/3594671.3594684acmotherconferencesArticle/Chapter ViewAbstractPublication PagesprogrammingConference Proceedingsconference-collections
research-article
Open access

ReactCOP Supporting Layer Parameter Management for Front-End Web Applications

Published: 12 September 2023 Publication History

Abstract

In modern software, including web applications, context-dependent behavior is one of the most important features. Context-oriented programming (COP) is a suitable programming technique for developing such software. However, we often need to work on handling parameter values in layers. This problem which we experience during the development of web application means inconvenience in setting parameters by each layer. We call it “layer parameter problem.” Especially front-end web applications use a component-based approach with a DOM tree, making the layer parameter problem more complicated because they cannot handle COPs in class-in-layer and layer-in-class models. We propose ReactCOP, an implementation of an idea that applies COP to React, one of the front-end web application libraries. ReactCOP solves the parameter problem on a layer-in-component model. As the solution to this problem, we present Layer Parameter Management that dynamically switches values in a variable within a layer. In this paper, we propose ReactCOP with Layer Parameter Management. Finally, we investigate our proposed approach through two case studies.

References

[1]
Malte Appeltauer, Robert Hirschfeld, Michael Haupt, Jens Lincke, and Michael Perscheid. 2009. A Comparison of Context-oriented Programming Languages. Proceedings of the 1st ACM International Workshop on Context-Oriented Programming (COP ’09), 1–6. https://doi.org/10.1145/1562112.1562118
[2]
Malte Appeltauer, R. Hirschfeld, Michael Haupt, and H. Masuhara. 2011. ContextJ: Context-oriented programming with Java. Information and Media Technologies 6, 2 (06 2011), 399–419. https://doi.org/10.11185/imt.6.399
[3]
Pascal Costanza and Robert Hirschfeld. 2005. Language constructs for context-oriented programming: An overview of ContextL. Proceedings of the Dynamic Languages Symposium, 1–10. https://doi.org/10.1145/1146841.1146842
[4]
Pascal Costanza, Robert Hirschfeld, and Wolfgang De Meuter. 2006. Efficient Layer Activation for Switching Context-Dependent Behavior, D. E. Lightfoot and C. A. Szyperski (Eds.). 7th Joint Modular Languages Conference, JMLC 2006 4228, 84–103. https://doi.org/10.1007/11860990_7
[5]
Robert Hirschfeld, Pascal Costanza, and Oscar Nierstrasz. 2008. Context-oriented Programming. The Journal of Object Technology 7, 3 (03 2008), 125–151. https://doi.org/10.5381/jot.2008.7.3.a4
[6]
Gregor Kiczales. 1996. Beyond the Black Box: Open Implementation. Software, IEEE 13, 1 (02 1996), 8–11. https://doi.org/10.1109/52.476280
[7]
Gregor Kiczales and Andreas Paepcke. 1996. Open Implementations and Metaobject Protocols. MIT Press, Cambridge, MA, USA.
[8]
Paul Leger, Nicolas Cardozo, and Hidehiko Masuhara. 2022. An expressive and modular layer activation mechanism for Context-Oriented Programming. Information and Software Technology 156 (12 2022), 107132. https://doi.org/10.1016/j.infsof.2022.107132
[9]
Jens Lincke, Malte Appeltauer, Bastian Steinert, and Robert Hirschfeld. 2011. An open implementation for context-oriented layer composition in ContextJS. Sci. Comput. Program. 76 (12 2011), 1194–1209. https://doi.org/10.1016/j.scico.2010.11.013
[10]
React [n. d.]. React — A JavaScript library for building user interfaces. reactjs.org.
[11]
[11] ReactCOP [n. d.]. https://github.com/tanigawaikuta/react_cop
[12]
Guido Salvaneschi, Carlo Ghezzi, and Matteo Pradella. 2012. Context-oriented programming: A software engineering perspective. Journal of Systems and Software 85, 8 (08 2012), 1801–1817. https://doi.org/10.1016/j.jss.2012.03.024
[13]
Guido Salvaneschi, Carlo Ghezzi, and Matteo Pradella. 2012. ContextErlang: Introducing context-oriented programming in the actor model. AOSD’12 - Proceedings of the 11th Annual International Conference on Aspect Oriented Software Development, 191–202. https://doi.org/10.1145/2162049.2162072
[14]
Ikuta Tanigawa, Kenji Hisazumi, Nobuhiko Ogura, Midori Sugaya, Harumi Watanabe, and Akira Fukuda. 2019. RTCOP: Context-Oriented Programming Framework based on C++ for Application in Embedded Software. ICISS 2019: Proceedings of the 2019 2nd International Conference on Information Science and Systems, 65–72. https://doi.org/10.1145/3322645.3322689
[15]
Benjamin Hosain Wasty, Amir Semmo, Malte Appeltauer, Bastian Steinert, and Robert Hirschfeld. 2010. ContextLua: Dynamic Behavioral Variations in Computer Games. In Proceedings of the 2nd ACM International Workshop on Context-Oriented Programming (Maribor, Slovenia) (COP ’10). Association for Computing Machinery, Article 5, 6 pages. https://doi.org/10.1145/1930021.1930026

Cited By

View all

Index Terms

  1. ReactCOP Supporting Layer Parameter Management for Front-End Web Applications

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    Programming '23: Companion Proceedings of the 7th International Conference on the Art, Science, and Engineering of Programming
    March 2023
    134 pages
    ISBN:9798400707551
    DOI:10.1145/3594671
    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 12 September 2023

    Check for updates

    Author Tags

    1. Context-Oriented Programming
    2. React
    3. Web Application

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    <Programming> '23 Companion

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)215
    • Downloads (Last 6 weeks)35
    Reflects downloads up to 14 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format.

    HTML Format

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media