Compiling assets separatly for different pods. Is it advisable?


#1

Say, an app has multiple pods associated with ,

  • unsigned users
  • current user
  • admin user

Based on this great talk by Luke Melia on ember deployment. I’m thinking of building assets for these users separately with different pods. And serving different index.html for different users.

For eg:

  • when admin user makes a request for the first time, the server sends a index.html with 333-application.js, 333-application.css

  • when signed in user makes a request for the first time, the server sends a index.html with 222-application.js, 222-application.css

  • When unsigned user makes a request for the first time, the server sends a index.html with 111-application.js, 111-application.css.

By this way, the user only need to download the pages relevant to them. I think this might be particularly useful if I’m wrapping this up (using cordova) for just the admin user(again eliminating unwanted pages) or if a particular user is viewing it from their mobile (it would be darn fast?).

Questions:

  • Is this approach naive?
  • If it is a good approach, how can one use Brocfile to build separate assets?