Java Reference
In-Depth Information
In this chapter, we have learned the following:
• A framework is a JavaScript library of code that provides methods to make common
tasks easier to achieve.
• Frameworks can make programming much easier, but you should think carefully
about whether you require a framework and which one is best for your needs.
• A module is a self-contained piece of code that provides functions and methods that
can then be used in other files.
• JavaScript does not support modules, but there are patterns available that can mimic
• CommonJS Modules and AMD modules are two popular module patterns. Com-
monJS modules are used by npm while AMD Modules are used by RequireJS.
• Browserify and Bower are two popular package managers that can be used to install
modules and frameworks, as well as manage dependencies.
• The MVC pattern is used to organize code into distinct sections that are responsible
for different elements of an application.
• Template files can be used to separate view code from JavaScript; they also enable
dynamic code and programming logic to be inserted into the markup.
• Minification is the process of removing any redundant characters from the code in
order to reduce its file size.
• Files can be compressed on the server using the gzip compression tool.
• A task runner can be used to automate common tasks such as minifying code, run-
ning tests, and concatenating multiple files into one.
• Grunt and Gulp are two of the most popular task runners whose approaches slightly
differ, but which both have a large amount of plugins for automating common tasks.
Search WWH ::

Custom Search