Application Maintenance

Version Information

In a tiered development environment, it’s important to know which application version is running a particular server.

Configuration

Add a configuration key with version information.

Example: LineDrop Play/Scala Web Application - Configuration

Version Controller

Ctrl-click controllers and select New - Scala Class.

Enter VersionController in the name field and double-click Class.

If prompted, click Add to add the file to version control.

Browse to the project repository to view the file:

LineDrop Play/Scala Web Application - Version Controller

Copy and paste the contents into the new file replacing the original content.

Version controller’s version method reads the configuration and prints out the version information in JSON format.

Routing

Add a route to map a URL to the controller method.

Test

Browse to http://localhost:9000/version to view the application version.

Commit and Push Changes

Select VCS - Commit from the top menu.

Review the files and directories and enter the commit message.

Click the dropdown arrow on the Commit button and select Commit and Push.

Click Push to confirm.

Sitemap

Although not required, the application may provide a sitemap to report links to a search engine such as Google.

Sitemap Controller

Ctrl-click controllers and select New - Scala Class.

Enter SitemapController in the name field and double-click Class.

If prompted, click Add to add the file to version control.

Browse to the project repository to view the file:

LineDrop Play/Scala Web Application - Sitemap

Copy and paste the contents into the new file replacing the original content.

Sitemap controller’s sitemap method creates a XML document containing link structure for the search engines.

Routing

Add a new route mapping.

Test

Browse to http://localhost:9000/sitemap to view the sitemap.

Commit and Push Changes

Select VCS - Commit from the top menu.

Review the files and directories and enter the commit message.

Click the dropdown arrow on the Commit button and select Commit and Push.

Click Push to confirm.

Reference

https://www.sitemaps.org/


Next: Library Updates