Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7831017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:32:18+00:00 2026-06-02T11:32:18+00:00

What is the best thing to do to avoid name collision between development/production environment

  • 0

What is the best thing to do to avoid name collision between development/production environment and testing environment for ember based application.

Usually, every Ember application has a namespace :

window.MyApp = Em.Application.create();

in production, I run some initialization functions by redefining the ready property of Em.Application

window.MyApp = Em.Application.create(

    ready: function() {
      // create some objects
    }
);

But, in my test enviroment, I don’t want to run these initialization functions because I create objects myself. Using the same definition of MyApp causes a collision because objects I create insert the same element in the DOM. So how can I use the same namespace MyApp without the ready function when I test my application ? I use jasmine to test the application.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T11:32:22+00:00Added an answer on June 2, 2026 at 11:32 am

    I keep the glue code which instantiates my controllers, creates and setups views out of the Application#ready function.

    Take pangratz/ember.js-dashboard for an example: core.js holds just the Namespace definitiion, whereas controllers.js, views.js and so on define my classes. The glue code which instantiates the controllers, creates the views and setups the bindings is defined in main.js. The main.js is then used among the others in the ‘real’ application in the index.html.

    I use interline/ember-skeleton for the basic application layout, which itself uses QUnit for testing. But this should be applicable for Jasmine too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the best way to avoid that an application is copied and used
Here is the best js graph drawing thing - http://thejit.org/static/v20/Jit/Examples/Other/example2.html It is so impressive,
What's the best way to log an NSError ? - (void)checkThing:(Thing *)thing withError:(NSError *)error
What patterns do you think are best for silverlight games? Some main areas of
Which do you think are best practices for making a windows dialog compatible both
No matter what you read about ASP.NET routing or REST I think the best
Best explained with code I think, this is just a simple example: public class
The best way I can think of to ask this is by example... In
I think this is just a Best Practices question, but I was wondering if
What do you think is the best way to create SEO friendly URLs (dynamically)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.