Closed e9gille closed 6 years ago
I definitely agree that it's difficult to maintain large chunks of non-APL within an APL script. The technique I've adopted to maintain the non-APL is to copy it into in a separate file (dropping off the leading comment symbol by using block copy), modify it there, then copy/paste it into my APL script and use Comment Block to turn it into comments.
My intention was that JSONServer should have as small a footprint (few dependencies) as possible - currently you can just ]load JSONServer and you're good to go (yes, there is a dependency on Conga v3.0, but we know where that it in your Dyalog installation). This makes it trivial to integrate into an existing application.
If we integrate JSONServer into the Dyalog installation, then it's essentially the same sort of dependency as Conga, and I'd be more inclined to ship a separate file.
It may be easy to include chunks of text using the ScriptFollows approach, but I find it harder to manage and read. I wonder if it wouldn't be easier to keep such static resources in external files and read them in where needed. See: https://github.com/Dyalog/JSONServer/blob/c890409843baefce9f8a0dc2d4831ba0f0388f2f/Source/JSONServer.dyalog#L479
Compare with: https://github.com/e9gille/JSONServer/commit/650c764b8216766254505d6f198f643c24d81a59