Do you use Bundling and/or AMD

Last updated by BrendanRichards almost 9 years ago.See history

Minification and AMD are techniques to improve javascript performance. They can both can be used with vanilla JavaScript and with Typescript

AMD and RequireJs

AMD is a client-side technology that allows you to break you Js code into small inter-dependent modules. The modules (and thier dependencies) required to render a particular page are determined at runtime and subsequently downloaded by Javascript. RequireJs is a popular AMD implementation.

Pro: Only the js modules you need are downloaded

Con: Each module is downloaded in a separate http request

Bundling and Minification

This is a server side technique that combines and optimises client side files into single, optimised downloads.

ASP.Net contains excellent server-side bundling support as outlined here:

ASP.Net vnext & VS 2015 also provides support for using task runners like Gulp or Grunt for bundling and minification.

Pro: Fewer Http requests and smaller files

Con: All client side modules are included in a single download

We open source. Powered by GitHub