Chapter 10
Libraries

JavaScript has been around for 18 years. In all that time, it still lacks a simple library loading mechanism. This is not for lack of need. There are many independent solutions and even several attempts at standards (commonjs, AMD, and ECMAscript harmony modules).[14][15][16] As these standards have languished in various states of usefulness and adoption, the community has generated more loader plugins than can be counted.

Despite all of these efforts, the surest way to load additional JavaScript libraries is via a combination of additional <script> tags and compressing multiple files into a single compressed JavaScript script. Neither solution is without problems (such as load order and deployment complexity).

Mercifully, Dart has the concept of libraries built in. Better yet, they are very easy to work with. Dart currently supports two different vehicles for importing functionality into Dart code: part and import.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.102.50