Extensible modules for JavaScript
Autor: | Florent Marchand de Kerchove, Mario Südholt, Jacques Noyé |
---|---|
Přispěvatelé: | Laboratoire d'Informatique de Nantes Atlantique (LINA), Mines Nantes (Mines Nantes)-Université de Nantes (UN)-Centre National de la Recherche Scientifique (CNRS), Aspect and composition languages (ASCOLA), Mines Nantes (Mines Nantes)-Université de Nantes (UN)-Centre National de la Recherche Scientifique (CNRS)-Mines Nantes (Mines Nantes)-Université de Nantes (UN)-Centre National de la Recherche Scientifique (CNRS)-Département informatique - EMN, Mines Nantes (Mines Nantes)-Inria Rennes – Bretagne Atlantique, Institut National de Recherche en Informatique et en Automatique (Inria)-Institut National de Recherche en Informatique et en Automatique (Inria), Ce travail a bénéficié d’une aide de l’Etat attribuée au labex CominLabs et gérée par l’Agence Nationale de la Recherche au titre du programme « Investissements d’avenir » portant la référence ANR-10-LABX-07-01., ACM Press, ANR-10-LABX-0007,COMIN Labs,Digital Communication and Information Sciences for the Future Internet(2010), ANR-10-LABX-0007,COMIN Labs,Laboratoire d'excellence CominLabs(2010), Centre National de la Recherche Scientifique (CNRS)-Mines Nantes (Mines Nantes)-Université de Nantes (UN), Centre National de la Recherche Scientifique (CNRS)-Mines Nantes (Mines Nantes)-Université de Nantes (UN)-Centre National de la Recherche Scientifique (CNRS)-Mines Nantes (Mines Nantes)-Université de Nantes (UN)-Département informatique - EMN |
Rok vydání: | 2016 |
Předmět: |
JavaScript
[INFO.INFO-PL]Computer Science [cs]/Programming Languages [cs.PL] Unobtrusive JavaScript SIMPLE (military communications protocol) dynamic binding Computer science Programming language 020207 software engineering 02 engineering and technology Module pattern Construct (python library) computer.software_genre Extensibility module pattern 020204 information systems 0202 electrical engineering electronic engineering information engineering Code (cryptography) Delegation (computing) functor environment computer computer.programming_language |
Zdroj: | SAC SAC '16-31st Annual ACM Symposium on Applied Computing ACM Press. SAC '16-31st Annual ACM Symposium on Applied Computing, Apr 2016, Pisa, Italy., Proceedings of the 31st Annual ACM Symposium on Applied Computing, pp.3, 2016, ⟨10.1145/2851613.2851958⟩ ACM Press. SAC '16-31st Annual ACM Symposium on Applied Computing, Apr 2016, Pisa, Italy. Proceedings of the 31st Annual ACM Symposium on Applied Computing, pp.3, 2016, ⟨10.1145/2851613.2851958⟩ |
DOI: | 10.1145/2851613.2851958 |
Popis: | International audience; The module pattern in JavaScript is commonly used to encapsulate definitions by using closures. However, closures prevent module definitions from being extended at runtime. We propose a simple pattern that not only opens the module, but allows one to extend the module definitions in layers. The pattern leverages the with construct and the prototype delegation mechanism of JavaScript to mimick dynamic binding, while minimizing the changes made to the module code. |
Databáze: | OpenAIRE |
Externí odkaz: |