Structuring a very large Ember application


Hi ember community!

Our team is thinking about switching over to Ember from Angular. We currently have a very large .NET application that we are trying to modernize. In an initial attempt to rewrite this very large application, we chose to slowly take over portions of it by creating many small angular apps and embedding them in the views of the .NET application.

Although this method has satisfied our business requirements, the decision to have many separate angular apps and repos has lead to many problems that impede development. Over time we’ve seen each angular app diverge in test and build processes; having separate repos for each app has also made code reuse more difficult.

We were hoping to use Ember 2.0 and the included ember-cli to solve some of these difficulties.

Our approach to this problem is to develop a container Ember app that mirrors the .NET application with smaller nested Ember apps inside.

Is there a way to have a container Ember app with Ember applications nested inside that preserves the url routing mechanism?

I’ve talked to another Ember developer in a similar situations. He solved it by using iframes to nest ember apps in another ember app. This approach sounds ok, except the nested ember app cannot change the url because it is in an iframe.

I’ve also read that this may be possible with either git submodules, bower includes, or ember addons. Does anyone here have experience doing that?

If it is not possible to nest an ember app in another, is it possible to create distribution package that is a smaller self contained portion of a larger Ember app? (I would prefer this method, as everything, including common shared components would be in the same repo).


Can I include an ember app inside another ember app while preserving url routes?

Can I have a mega ember app and during the distribution process, build a self contained and self sufficient portion of it?


If there is no shared state/data and you are hosting on Apache you can write an advanced .htaccess file to include an ember app while preserving routes. Between the separate app’s you must use normal linking and not the link-to helper.

Perhaps you can create one mega git repository with Git Submodules ?


You might want to consider looking at Pods, and instead have one large Ember application. The reason we build multiple modules in, Java, C++ or C# is because it allows us to write lots of files and not worry about compile time for each module, especially if we haven’t changed anything. Javascript does not require compiling the files. If you want your building and testing process to be the same then just leave it all in the same application. Secondly Ember and Ember-cli have a configuration.js file that allow you turn on and off features very easily. So like in my case our company has three products, with several features used in common. We can just turn on and off features for the application. Pods allow you to define like minded components together then you work on them as a chunk. By the way I highly recommend Program With Erik good stuff.


Checkout the Engines RFC