What is the best practices for large modular application with emberjs

We are building a large modular application ,

  • on the server side it is an asp.net mvc application, consisting a quite complex onion architecture,
  • on the client side it is an ember application.

we have these projects in visual studio solution:

  1. platform.core
  2. platform.data
  3. platform.web (includes ember application and all bootstrapers needed)
  4. Modules (each module includes two thing among others, a web service on server side, and a POD for ember side)

from asp.net perspective the platform.web setups everything, loading base page template, setting up web services, and everything needed on the server including ember-data needs.

from ember perspective platform.web is the main ember app generated by ember-cli and every module in asp.net side will be a sub route (actually a POD) in ember side.

the main point is this application is a modular app and needs to load modules dynamically in application start up.

we managed to copy each module pods to main project using gulp, ember-cli, visual studio 2015 and compile them at once, but we need to include pods dynamically at runtime. we also managed to compile pods separately outside ember app.

our problem is:

  1. how to load sub routes dynamically in ember?
  2. how to compile a pod separately using ember-cli, and introducing the compiled POD to the ember application in runtime?
  3. is it supported out of the box , or we need deep dive in ember-cli and make our own pipeline?

It sounds a bit like ember-engines, which doesn’t yet support lazy loading of engines.

2 Likes