You're asking two things: how to persist an object, and how to implement a singleton.

A global on its own is not able to save an object. Something needs to map the structure of its class to a global layout of some kind. The simplest way to do this is to subclass %Persistent, rather than %RegisteredObject, then call %Save().

I notice, however, that you're using %ZEN.proxyObject, presumably to avoid defining a class/schema upfront. In that case, you may be interested in looking at the document data model (DocDM) in the 2016.2 field test.

As for implementing a singleton, it depends on the context. In general, I would look at overriding %OnNew() to load an existing object if it exists. If you want to persist its state, you'll need to consider concurrency.

Visual Studio Code got a lot of praise in a recent Hacker News discussion of an extension for the Go language. One user mentioned that the PHP extension is quite good, and works well with XDebug. It's also supposed to be good for JavaScript and TypeScript.

I've been using Xamarin Studio to write NUnit tests (C#) on the Mac. I loaded the project into VSC, and it's not bad. It doesn't seem particularly fast or lightweight, as some have claimed, but it's adequate. OmniSharp is included, so you can hover over method calls to see the signature, and each method definition is preceded by a count of how many times it's called.

Java support is not nearly as good out of the box, but there may be some extensions to improve that.

For COS, you could probably configure a task runner to use Atelier's REST APIs to save and compile files to a server. Syntax highlighting and debugging would take some doing, but the hope is that Atelier will scratch that itch better than VSC ever could.

I'd say that Visual Studio Code doesn't have enough to lure me away from Emacs for any extended period of time, but it's a capable, extensible editor.

Different people are going to have different workflows for unit testing, but I would encourage you to settle on a way to get those tests out of the database. I'd be nervous about running tests in a namespace that contains my only copy, since %UnitTest is designed to load and delete by default.

If you're using Studio with the source control hooks, it works pretty well to write the tests in a development namespace, then run them in a test namespace.