Extensible Modules for JavaScript

Florent Marchand de Kerchove 1, 2 Jacques Noyé 1, 2 Mario Südholt 1, 2
2 ASCOLA - Aspect and composition languages
LINA - Laboratoire d'Informatique de Nantes Atlantique, Département informatique - EMN, Inria Rennes – Bretagne Atlantique
Abstract : 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.
Type de document :
Poster
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, 〈http://dl.acm.org/citation.cfm?id=2851958〉. 〈10.1145/2851613.2851958〉
Liste complète des métadonnées

https://hal.inria.fr/hal-01407340
Contributeur : Noyé Jacques <>
Soumis le : jeudi 1 décembre 2016 - 23:46:31
Dernière modification le : mercredi 5 décembre 2018 - 01:22:11

Lien texte intégral

Identifiants

Citation

Florent Marchand de Kerchove, Jacques Noyé, Mario Südholt. Extensible Modules for JavaScript. 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, 〈http://dl.acm.org/citation.cfm?id=2851958〉. 〈10.1145/2851613.2851958〉. 〈hal-01407340〉

Partager

Métriques

Consultations de la notice

688