You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to be able to construct the request handling machine that is NGApplication without any side effects.
Essentially, what we want to be able to do is to do something like this:
var app = new NGApplication( properties );
var response = app.dispatchRequest( new NGRequest( .... ) );
assertTrue( response.status() == 200 );
isDevelopmentMode() is kind of a relic from Wonder's static version, the reason it being static there that it's used in application initialization, before there's an application instance to invoke anything on (and I've hit the same problem in NGApplication).
It should definitely be a part of the "environment", i.e. properties used for initialization. Ideally I'd want to do away with the globally declared application() (and therefore global properties) altogether.
Activity
paulhoadley commentedon Dec 29, 2021
Possibly related: why is a method like
isDevelopmentMode()static? Presumably becauseNGApplicationis effectively a singleton, so it may as well be.hugithordarson commentedon Dec 29, 2021
isDevelopmentMode()is kind of a relic from Wonder's static version, the reason it being static there that it's used in application initialization, before there's an application instance to invoke anything on (and I've hit the same problem in NGApplication).It should definitely be a part of the "environment", i.e. properties used for initialization. Ideally I'd want to do away with the globally declared
application()(and therefore global properties) altogether.