[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1739230.1739233acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

AspectScript: expressive aspects for the web

Published: 15 March 2010 Publication History

Abstract

JavaScript is widely used to build increasingly complex Web applications. Unsurprisingly, these applications need to address cross-cutting concerns. Therefore support for aspect-oriented programming is crucial to preserve proper modularity. However, there is no aspect-oriented extension of JavaScript that fully embraces the characterizing features of that language: dynamic prototype-based programming with higher-order functions. In this paper, we present AspectScript, a full-fledged AOP extension of JavaScript that adopts higher-order programming and dynamicity as its core design principles. In AspectScript, pointcuts and advices are standard JavaScript functions, bringing the benefits of higher-order programming patterns to define aspects. In addition, AspectScript integrates a number of state-of-the-art AOP features like dynamic aspect deployment with scoping strategies, and user-defined quantified events. We illustrate AspectScript in action with several practical examples from the realm of client Web applications, and report on its current implementation. AspectScript is a practical extension that provides better modularity support to build Web applications, and that will eventually make it possible to empirically validate the benefits brought by advanced aspect language mechanisms in an evergrowing application domain.

References

[1]
Ajaxpect. A JavaScript framework for aspect-oriented programming. http://code.google.com/p/ajaxpect/.
[2]
Chris Allan, Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Ondrej Lhoták, Oege de Moor, Damien Sereni, Ganesh Sittampalam, and Julian Tibble. Adding trace matching with free variables to AspectJ. In Proceedings of the 20th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005), pages 345--364, San Diego, California, USA, October 2005. ACM Press. ACM SIGPLAN Notices, 40(11).
[3]
Ivica Aracic, Vaidas Gasiunas, Mira Mezini, and Klaus Ostermann. An overview of CaesarJ. In Transactions on Aspect-Oriented Software Development, volume 3880 of Lecture Notes in Computer Science, pages 135--173. Springer-Verlag, February 2006.
[4]
AspectJS. A function-call framework in JavaScript. http://www.aspectjs.com/.
[5]
AspectJS. A JavaScript framework for aspect-oriented programming. http://zer0.free.fr/aspectjs/.
[6]
Eric Bodden, Florian Forster, and Friedrich Steimann. Avoiding infinite recursion with stratified aspects. In Proceedings of Net.ObjectDays 2006, Lecture Notes in Informatics, pages 49--54. GI-Edition, 2006.
[7]
Cerny. A javascript framework for method-call interception. http://www.cerny-online.com/cerny.js/.
[8]
Thomas Cleenewerck, Kris Gybels, and Adriaan Peeters. Aspects in a Prototype-Based environment. In Dynamic Aspects Workshop, AOSD 2004, 2004.
[9]
Daniel S. Dantas, David Walker, Geoffrey Washburn, and Stephanie Weirich. AspectML: A polymorphic aspect-oriented functional programming language. ACM Transactions on Programming Languages and Systems, 30(3): Article No. 14, May 2008.
[10]
Rémi Douence, Pascal Fradet, and Mario Südholt. Composition, reuse and interaction analysis of stateful aspects. In Karl Lieberherr, editor, Proceedings of the 3rd ACM International Conference on Aspect-Oriented Software Development (AOSD 2004), pages 141--150, Lancaster, UK, March 2004. ACM Press.
[11]
Christopher Dutchyn, David B. Tucker, and Shriram Krishnamurthi. Semantics and scoping of aspects in higher-order languages. Science of Computer Programming, 63(3):207--239, December 2006.
[12]
Tzilla Elrad, Robert E. Filman, and Atef Bader. Aspect-oriented programming. Communications of the ACM, 44(10), October 2001.
[13]
Jesse James Garrett. Ajax: A new approach to Web applications.
[14]
Humax. A JavaScript framework for aspect-oriented programming. http://humax.sourceforge.net/.
[15]
jQuery. A JavaScript library to manage event handling, animating, and Ajax interactions for the Web development. http://jquery.com/.
[16]
Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William Griswold. An overview of AspectJ. In Jorgen L. Knudsen, editor, Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP 2001), number 2072 in Lecture Notes in Computer Science, pages 327--353, Budapest, Hungary, June 2001. Springer-Verlag.
[17]
Paul Leger, Rodolfo Toledo, and Éric Tanter. The AspectScript language. http://pleiad.cl/aspectscript, 2009.
[18]
Xavier Leroy, Damien Doligez, Jacques Garrigue, Didier Rémy, and Jérôme Vouillon. Language Objective Caml: Caml supports functional, imperative, and object-oriented programming styles. http://caml.inria.fr/.
[19]
Hidehiko Masuhara, Gregor Kiczales, and Christopher Dutchyn. A compilation and optimization model for aspect-oriented programs. In G. Hedin, editor, Proceedings of Compiler Construction (CC2003), volume 2622 of Lecture Notes in Computer Science, pages 46--60. Springer-Verlag, 2003.
[20]
Hidehiko Masuhara, Hideaki Tatsuzawa, and Akinori Yonezawa. Aspectual Caml: an aspect-oriented functional language. In Proceedings of the tenth ACM SIGPLAN International Conference on Functional Programming, pages 320--330, Tallinn, Estonia, 2005. ACM.
[21]
Nathan McEachen and Roger T. Alexander. Distributing classes with woven concerns -- an exploration of potential fault scenarios. In Proceedings of the 4th ACM International Conference on Aspect-Oriented Software Development (AOSD 2005), pages 192--200, Chicago, Illinois, USA, March 2005. ACM Press.
[22]
Leo Meyerovich, Arjun Guha, Jacob Baskin, Gregory H. Cooper, Michael Greenberg, Aleks Bromfield, and Shriram Krishnamurthi. Flapjax: A programming language for Ajax applications. In Proceedings of the 24th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2009), Orlando, Florida, USA, October 2009. ACM Press. To appear.
[23]
Mira Mezini and Klaus Ostermann. Variability management with feature-oriented programming and aspects. In Proceedings of the 12th Symposium on Foundations of Software Engineering (FSE-12), pages 127--136, Newport Beach, CA, USA, November 2004.
[24]
Robin Milner, Mads Tofte, and Robert Harper. The definition of Standard ML. MIT Press, Cambridge, MA, USA, 1990.
[25]
Prototype. A JavaScript library that aims to ease development of dynamic Web applications. http://www.prototypejs.org/.
[26]
Hridesh Rajan and Gary T. Leavens. Ptolemy: A language with quantified, typed events. In Jan Vitek, editor, Proceedings of the 22nd European Conference on Object-oriented Programming (ECOOP 2008), number 5142 in Lecture Notes in Computer Science, pages 155--179, Paphos, Cyprus, july 2008. Springer-Verlag.
[27]
Hridesh Rajan and Kevin Sullivan. Eos: Instance-level aspects for integrated system design. In Proceedings of ESEC/FSE 2003, pages 297--306, Helsinki, Finland, September 2003.
[28]
John Stamey, Bryan Saunders, and Simon Blanchard. The aspect-oriented Web. In Proceedings of the 23rd annual international Conference on Design of Communication: documenting & designing for pervasive information, pages 89--95, Coventry, United Kingdom, 2005. ACM.
[29]
Éric Tanter. Controlling aspect reentrancy. Journal of Universal Computer Science, 14(21):3498--3516, 2008. Best Paper Award of the Brazilian Symposium on Programming Languages (SBLP 2008).
[30]
Éric Tanter. Expressive scoping of dynamically-deployed aspects. In Proceedings of the 7th ACM International Conference on Aspect-Oriented Software Development (AOSD 2008), pages 168--179, Brussels, Belgium, April 2008. ACM Press.
[31]
Éric Tanter. Beyond static and dynamic scope. In Proceedings of the 5th ACM Dynamic Languages Symposium (DLS 2009), pages 3--14, Orlando, FL, USA, October 2009. ACM Press.
[32]
Éric Tanter. Execution levels for aspect-oriented programming. In Proceedings of the 9th ACM International Conference on Aspect-Oriented Software Development (AOSD 2010), Rennes and Saint Malo, France, March 2010. ACM Press.
[33]
Éric Tanter, Johan Fabry, Rémi Douence, Jacques Noyé, and Mario Südholt. Expressive scoping of distributed aspects. In Proceedings of the 8th ACM International Conference on Aspect-Oriented Software Development (AOSD 2009), pages 27--38, Charlottesville, Virginia, USA, March 2009. ACM Press.
[34]
David B. Tucker and Shriram Krishnamurthi. Pointcuts and advice in higher-order languages. In Mehmet Akşit, editor, Proceedings of the 2nd ACM International Conference on Aspect-Oriented Software Development (AOSD 2003), pages 158--167, Boston, MA, USA, March 2003. ACM Press.
[35]
Naoyasu Ubayashi, Hidehiko Masuhara, and Tetsuo Tamai. An AOP implementation framework for extending join point models. In Walter Cazzola, Shigeru Chiba, and Gunter Saake, editors, Proceedings of the RAM-SE Workshop on Reflection, AOP, and Meta-Data for Software Evolution, pages 71--81. Fakultät für Informatik, Universität Magdeburg, 2004.
[36]
Hironori Washizaki, Atsuto Kubo, Tomohiko Mizumachi, Kazuki Eguchi, Yoshiaki Fukazawa, Nobukazu Yoshioka, Hideyuki Kanuka, Toshihiro Kodaka, Nobuhide Sugimoto, Yoichi Nagai, and Rieko Yamamoto. AOJS: aspect-oriented JavaScript programming framework for web development. In Proceedings of the 8th workshop on Aspects, components, and patterns for infrastructure software, pages 31--36, Charlottesville, Virginia, USA, 2009. ACM.

Cited By

View all
  • (2023)An expressive and modular layer activation mechanism for Context-Oriented ProgrammingInformation and Software Technology10.1016/j.infsof.2022.107132156(107132)Online publication date: Apr-2023
  • (2020)Interfaces for Modular Reasoning in Context-Oriented ProgrammingProceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3422584.3423152(1-7)Online publication date: 21-Jul-2020
  • (2019)AwaitVizProceedings of the 34th ACM/SIGAPP Symposium on Applied Computing10.1145/3297280.3297528(2515-2524)Online publication date: 8-Apr-2019
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
AOSD '10: Proceedings of the 9th International Conference on Aspect-Oriented Software Development
March 2010
242 pages
ISBN:9781605589589
DOI:10.1145/1739230
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

  • AOSA: Aspect-Oriented Software Association

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 March 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AspectScript
  2. JavaScript
  3. aspect-oriented programming
  4. higher-order programming
  5. quantified events
  6. scoping strategies
  7. web applications

Qualifiers

  • Research-article

Funding Sources

Conference

AOSD '10
Sponsor:
  • AOSA

Acceptance Rates

Overall Acceptance Rate 41 of 139 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 19 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)An expressive and modular layer activation mechanism for Context-Oriented ProgrammingInformation and Software Technology10.1016/j.infsof.2022.107132156(107132)Online publication date: Apr-2023
  • (2020)Interfaces for Modular Reasoning in Context-Oriented ProgrammingProceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3422584.3423152(1-7)Online publication date: 21-Jul-2020
  • (2019)AwaitVizProceedings of the 34th ACM/SIGAPP Symposium on Applied Computing10.1145/3297280.3297528(2515-2524)Online publication date: 8-Apr-2019
  • (2019)A Declarative Enhancement of JavaScript Programs by Leveraging the Java Metadata InfrastructureScience of Computer Programming10.1016/j.scico.2019.05.005Online publication date: May-2019
  • (2018)Systematic adaptation of dynamically generated source code via domain‐specific examplesIET Software10.1049/iet-sen.2016.021112:2(112-119)Online publication date: Apr-2018
  • (2017)Sync/CCProceedings of the Symposium on Applied Computing10.1145/3019612.3019783(1245-1250)Online publication date: 3-Apr-2017
  • (2016)Using continuations and aspects to tame asynchronous programming on the webCompanion Proceedings of the 15th International Conference on Modularity10.1145/2892664.2892675(79-82)Online publication date: 14-Mar-2016
  • (2015)Customizable gradual polymorphic effects for ScalaACM SIGPLAN Notices10.1145/2858965.281431550:10(935-953)Online publication date: 23-Oct-2015
  • (2015)Customizable gradual polymorphic effects for ScalaProceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2814270.2814315(935-953)Online publication date: 23-Oct-2015
  • (2015)Towards modular instrumentation of interpreters in JavaScriptCompanion Proceedings of the 14th International Conference on Modularity10.1145/2735386.2736753(64-69)Online publication date: 16-Mar-2015
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media