Is it correct that the application object should be initialized only once for the whole APP say "ABC" application

Is it correct that the application object should be initialized only once for the whole APP say “ABC” application, or is it initialized more than once

Thanks, Sunita

In general, yes.

In practice, there are three scenarios where this is not the case.

  1. During testing, where the app is often setup and torn down between tests.
  2. If you explicitly create more than one app on the page (I’ve had one time I did this, very special case for an embedded chat app within another app, would try to avoid doing it again).
  3. Calling application.reset() (same as you do during testing) during a logout (this also has pros and cons).

Hi,

Many thanks for the apt reply, I just have few questions regarding application intialization.

  1. Is it because the application Route are not stuctured or set properly.
  2. or is it because of a third party library which create its own application object.

please let me know.

Many Thanks, Sunita