go to post Jon Willeke · Apr 29, 2016 Looks like the class has been described as deprecated since 2012.1.
go to post Jon Willeke · Apr 20, 2016 See the discussion in this previous post: https://community.intersystems.com/post/unittest Basically, you can use the /noload and /nodelete qualifiers, specifying the tests by class name. Be aware that if you forget the /nodelete qualifier, you'll delete your test classes.
go to post Jon Willeke · Apr 19, 2016 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.
go to post Jon Willeke · Mar 16, 2016 The /exportversion qualifier probably would not have helped in this case. It just strips new keywords from the class definition.
go to post Jon Willeke · Mar 15, 2016 Are you aware of the /exportversion qualifier (documentation for which is hidden in the COS reference for the $system variable)? If your code is otherwise portable, this qualifier is intended to allow "reverse flow" of code by omitting anachronisms during XML export.
go to post Jon Willeke · Mar 4, 2016 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.
go to post Jon Willeke · Feb 25, 2016 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.