Follow the guide below to decide which approach is the best for your situation. If in doubt use Apps/C.
- Middleware for loading apps, resolving vendor dependencies at runtime and sandboxing CSS styles.
- You are loading a lot of apps on a page and they are likely going to depend on the same vendor library dependencies. These are resolved at runtime, in the browser, and thus you can save on requests by sharing the same libraries over and over. You want to automatically prefix your CSS styles so that your app does not clash with the rest of the apps/styles on the page. You want to provide an example config that people are to use with your app, but want to give developers the ability to override. You want to create a repository of apps and have a delivery mechanism ready (git is supported).
- Dynamic resolving of libraries at runtime is nice but it takes one app to crash them all. You could also encounter a situation where one app needs say jQuery 1.9 and another jQuery 2.0, try solving that one.
- Use Apps/C together with pommejs to load apps in an iframe so it has no chance of colliding with the other resources on the page.
- Builder for ComponentIo based packages.
- Use it when you want as small a build as possible relying on packages in the ComponentIo ecosystem. As all vendor dependencies take the CommonJS approach to loading files, you will unlikely going to encounter difficulty running your app besides other apps on the page.
- Use Apps/C and use the grunt-component-io task to make use of libraries available through the ComponentIo ecosystem.
- A Grunt based builder. Allowing to run arbitrary tasks and make use of Bower ecosystem for vendor dependencies.
- You need to prefix your CSS styles yourself (use grunt-rework) and your bundled packages can clash if you are depdending on libraries that export themselves globally (on window object). To alleviate these issues you can load your app using the pommejs library. Since none of your builds share resources (unless you make a mega-build), your apps can get bulky.