Understanding environments    Getting-started

When developing a real world application it is useful to incorporate the usage of environments. The concept of environments is common within rapid development as it allows you to control your code dependent on the current environment.

ajaxed currently supports two environments: DEV (default) and LIVE. You can set the environment in your config.asp using the AJAXED_ENVIRONMENT variable:

'live environment

The Library class provides some properties for the environment setting:

'gets the current environment
currentEnvironment = lib.env
'checks if it is development
isDevelopment = lib.dev
'checks if it is live (production)
isLive = lib.live

With those properties you can easily control your code dependent to the configured environment. E.g. You could disable google analytics during the development process. Just chuck this snuippet into your footer.asp.

<% if lib.live then %>
    //google analytics javascript
<% end if %>

Some interesting dependencies

Posted in Getting-started 5691 days ago

Version 2.1.1 Released4022 days ago