Home

DRK™

Modularizing and Packaging JavaScript for Scalable, High Performance Web Apps

With the advance of MV* frameworks you can observe as JavaScript evolves ahead of official specs towards large scale development. It requires even higher level of maintainability and one of the first focuses here is encapsulation and information hiding. We need the code-base to be organized into independent, interchangeable components so that each of them contained code implementing only one aspect of desired functionality. Here comes to help the Module pattern. Module is a portion of code enclosed with a scope where all the members have private access by default and do not pollute global namespace. To get access to a member of module we have to export it within module scope and import it outside of module.

Prior to Ecma-262 Edition 6, which is still a working draft, JavaScript had no build-in facilities to define a module. However…

View original post 257 mots de plus

Publicités

Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s