When comparing JSPM vs Qoopido.demand, the Slant community recommends JSPM for most people. In the question“What are the best client-side JavaScript module loaders?” JSPM is ranked 4th while Qoopido.demand is ranked 5th. The most important reason people chose JSPM is:
JSPM is registry agnostic, it can pull packages from npm and github and is built in such a way it can support more.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Registry agnostic
JSPM is registry agnostic, it can pull packages from npm and github and is built in such a way it can support more.
Pro Module style agnostic
Loads ES6, AMD, CommonJS and globals.
Pro Can transcompile ES6, JSX and Typescript
Pro Much faster than Webpack or Browserify
While Webpack and Browserify recompile the source code using Babel, jspm is the only packager that can load prebuild/minified code downloaded from the npm registry.
Pro Bundled based on imported modules without any config
Create the bundle file without config and add only the modules imported.
Pro Switch between async or sync load
With a simple command you could change between load the modules async by systemjs or sync with a bundle file.
Pro Easy install packages from npm, github or any git repository
Pro Versioned package urls
It creates a packages folders which are versioned. This makes it future proof for a time where we stop bundling all the code. In the following presentation Guy Bedford calls bundling an anti-pattern.
Pro Very easy to start with
Pro Supports localStorage caching
Modules will get loaded via XHR/XDR and get cached in localStorage to prevent further requests which improves performance escpecially on mobile
Pro Fallback URLs
Any type of dependency can have multiple URLs defined to be used as fallback.
Pro Additional support for loading HTML, CSS, JSON, and text
Loading is dealt with via handlers
that are themselves modules (dynamically loaded and cached). Qoopido.demand comes with support for its own module format built-in and offers handlers
for css
, json
and text
. Due to handlers
being modules themselves it is really easy to write custom handlers.
Pro Optional support for SRI (sub resource integrity)
Support for SHA256, 384 and 512 identity checks for all types of loaded modules was added in version 2.0.7
Pro Offers internal auto-bundling to reduce the number of requests
By taking advantage of auto-bundling, it means that demand itself will combine requests without the user having to manually define a bundle.
Pro Supports sourcemaps
Pro Optional lz-string compression of localStorage cache content
Cached modules can be optionally & automatically compressed with lz-string loading a plugin (included in the distribution) either globally or on a per module or even per path/part of path base.
Pro Per module setting of cache parameters
Version 1.1.2 of Qoopido.demand adds the possibility to not only set global caching parameters valid for all modules but allows for fine grained cache control on a per module basis.
Pro Can load new modules without being recompiled
It's the one of the few modules in this category that can handle IOC-style dependency injection. The others work well for apps that have knowable dependency lists at compile time, but this is one of the few that can load new modules without being recompiled.
Pro Optional cookie support to communicate module caching state to the server
Cookie support within Qoopido.demand can be enabled globally or per module. Whenever the localStorage cache for a module changes an accompanying cookie gets updated/deleted so the server can handle the clients module caching state and, e.g., inline modules as long as the client das not have them in localStorage.
Pro Supports loading of non-module scripts
Qoopido.demand offers loading of legacy scripts as if they were modules through probe
functions. These probe
functions are similiar to Require.js shim
, but where shim
allows only string parameters, Qoopido.demand's probes
are JavaScript functions that can check whatever you want.
Pro Promise like interface
Although not depending on native promise support it offers a promise like interface which greatly improves readability of code
Pro Supports nested dependencies
Dynamically loaded modules can have further dependencies that will get dynamically resolved and loaded
Pro localStorage caching removes the need to bundle
It enables and encourages the development of atomic modules that do not necessarily have to get bundled (manually or via build-process) to gain performance
Pro Support for legacy browsers
Qoopido.demand has recently added support for legacy browsers. Including IE8.
Pro Supports loading of bundles
From version 1.1.1 onwards Qoopido.demand is able to load multiple concatenated modules in a single request (like jsdelivr) while maintaining automatic module resolution.
Cons
Con You need to be an expert to write shims
You can load any module. But that comes with the price:
you need to find or write configs to load a particular rare module.
Con Doesn't hide complexity
JSPM doesn't try to hide complexity from the user. I.e. when some issue emerges you need understand a lot to be able to patch it or create a workaround.
Con Watcher has bugs
Watching would benefit from improvements
Con Unstable API
0.17 is still in beta. 0.16 is lacking features.
Con Poor bundler performance
Bundling performance is slow, though offset by the fact that bundling is not required during development, since it can load dependencies asynchronously.