Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Table of Contents

Introduction

...

  1. It enables you to change the Developer Settings without navigating away from your current page.
  2. It provides a visual reminder that VIVO is in Developer Mode. If a production instance were accidentally configured to run in Developer Mode, it would be easily noticed.

No Developer PanelImage AddedDeveloper Panel (closed)Image Added

 Since release 1.6, the VIVO application includes the concept of a "

Entering Developer Mode

...

developer.properties file

When VIVO runs in Developer Mode, it permits

 

...

  • These features can cause VIVO to run slowly, and there is no obvious indication that they are enabled.
  • It would be possible for a production instance to accidentally run with these features, and no one would know the cause of the slowness.

...

  • The features I have in mind would be even more costly in CPU, so the improvements in control become even more important.

starts up, it looks for a file in the home directory, named developer.properties. If the file is found, the settings are read from it. Any settings that are not found in the file keep their default values. If the file is not found, then all settings keep their default values until set interactively.

Code Block
titleA typical developer.properties file
developer.enabled=true
developer.permitAnonymousControl=true
developer.defeatFreemarkerCache=true

This example causes:

  • Developer Mode is enabled immediately. The specified settings are in effect even while VIVO is starting.
  • Users who are not logged in can manipulate the developer settings. Obviously, this should only be permitted on a development system.
  • The Freemarker template cache is defeated. Each time a template is requested, it will be loaded from disk. This will cause VIVO to run more slowly, but it means that a developer can see the effects of a template change immediately, instead of waiting for the template to expire and be reloaded.

The VIVO distribution includes an example.developer.properties file.  It contains descriptions of all of the settings, with examples. You can rename example.developer.properties to developer.properties, and uncomment the settings you want to use.

Interactively entering developer mode

Log in as a system administrator (or root). Go to the Site Administration page. Click on Activate developer panel.

Image Added

The Developer Panel will immediately appear below the page header. You may open it and change the settings, or you may navigate through VIVO. The Developer Panel will continue to appear in every page (except for pages that are used to edit the ontology).

The settings

When open, the developer panel looks like this:

Image Added

The following tables show the meaning of each setting in the developer panel, and how to specify it in the developer.properties file.

General settings

In the panelEnable developer mode
In the filedeveloper.enabled
EffectCauses the developer panel to be displayed on each VIVO page. Enables all of the other developer settings. If this is false, other settings will retain their values, but will not take effect.
In the panelAllow anonymous user to see and modify developer settings
In the filedeveloper.permitAnonymousControl
EffectIf true, any VIVO user may change the developer settings. If false, only a system administrator (or root) may change the settings.

Freemarker settings

In the panelDefeat the template cache
In the filedeveloper.defeatFreemarkerCache
EffectIf true, each Freemarker template is loaded from disk each time it is used. If false, a template change may be on disk for up to one minute before it is loaded.
In the panelInsert HTML comments and start and end of templates
In the filedeveloper.insertFreemarkerDelimiters
EffectIf true, you may view the HTML source for a VIVO page to see which Freemarker templates were used to create each portion of the page.
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 
In the panel 
In the filedeveloper.
Effect 

...