This morning on the old Caché Google Group, someone posed the following question, which I've decided to answer here, because it's interesting!
Is there a way to iterate ClassMethod's params, and get param's names and values?
The first answer I can come up with is: it's not easy! In any method, you could try to write code like this (where methodName is the name of your method):
I have a Cache classes with %TimeStamp (e.g. 2016-04-18 12:29:11) and %Date (eg. 64027) properties. And I have a javascript client app, which needs full CRUD over this properties.
But in javascript date/time are defined by ISO8601 (e.g. timestamp 2016-04-18T12:29:11Z, date 2016-04-18).
Most of projects on Caché, obviously, written not only in Cache ObjectScript, and should contain sources in other languages. Such as js or css for web-projects or any others. And it would be pretty good, if I could see all of files in one project, and possible to edit all of them. How to be in this case ?
And I think it is not a good idea, to place all project's sources in one root folder. Our project contains over 3 thousands classes and routines, and it is too difficult to find anything in such folder. Is not a good for it to use Java-way, and place every package in subfolder ?
Some may think it's a strange / daft idea, but just today the Raspberry Pi folks have announced that they've now sold more than 10 million of them..and counting. That's a huge potential marketplace, and a great platform for getting people to hear about Cache and try it out. Given its focus on the education sector, another great way of getting heard about.
In a comment on this post in the Field Test - 2016.2 community Bill McCormick suggested using Atelier's "Check for Updates" option from the Help menu. Here's what I get:
I just used Help\Check for Updates and updated my Atelier from 1.0.158 to 1.0.165. Is there any information published about what's new/fixed in this compared to previous public builds? Having that information might help us target our testing and so increase the value of our feedback to you.
In Atelier is there a way to configure automatic indent when typing open/close braces? From what I've found this is usually left to the language (e.g. Java > Editors) but I couldn't find a setting under the Atelier preferences.
For reference, this is what Studio does:
And here is Atelier:
Notice the return after the open-brace doesn't indent and the close-brace doesn't unindent.
Is there a better way to iterate through all properties of an object than the following? Perhaps without needing to open a definition of the class but directly against the object?
Just curious how many companies use in their work Docker containers, I mean not only with InterSystems products. And if such companies exist, which of them uses docker and doesn't use it for InterSystems products by some reasons. What are the reasons? For companies which already uses InterSystems in containers, how do you use it? Development environment, testing or even in production ?
And if you don't use but thought about it, what are the reasons which stop you.
As for me, I've been using InterSystems Caché inside a Docker container in some different cases:
Last weekend we held the Final of InterSystems Contest on Caché, DeepSee and iKnow under the aegis of IT Planet Student Championship in Ekaterinburg. BTW, this year we had more than 1,400 participants in InterSystems Contest.
Does anyone know of a library that can be used to create Mock objects for Objectscript classes?
Right now, my team has been building mock objects by hand to help circumvent dependencies when writing and executing unit tests, but I always wondered if someone had ever created a Mock library like Mockito to help quicken the process.
is there any API available that would return an MDX query string for a given saved pivot name? I could not find anything except for pivots with manual MDX. But that's not my case, I need to get MDX for any pivot.
I've been trying to write a method to compare two local variables, which may be arrays, for "equality" - that is, to see if they have all the same subscripts (if they're arrays) and values. This is the best I've come up with so far - are there any better/simpler approaches out there?
I'd like to know about what source control version is recommended to use with Caché / Ensemble. Can someone help me? If yes, there is some documentation to how to configure?
Is there something in Cache that is equivalent to partitioning a table in Oracle? I'm trying to break some big tables into groups so that the most frequently accessed data is faster to retrieve.
Here is some information on this concept from Oracle.
How suitable is Docker for standalone deployment of an Ensemble version and Ensemble application together?
The context is deployment by an application partner of an integration application and the supporting Ensemble version as a single package (single file ideally), to multiple environments and to multiple customer sites.
I don't have experience with Ensemble on Docker so I'm wondering what gaps and pitfalls may exist.
I'm curious to know what InterSystems clients are using for csp based web development methodology.
Are you doing tag based development, or class based development?
If you are using tag based development, what tools are you using to create the look and feel of your web pages? Are you using tools like Adobe Dreamweaver, or do your developers sit down and code HTML using plain editors like Notepad and Notepad++
Are you doing prototyping of web pages and then adding CSP tags, or are you just developing the finished csp page with no prototype?
I have discussed extensively with Andrew Cheshire, the author of the Atelier parser (which I'll be able to hack on and reuse for CachéQuality -- yay!), and while we were at it, we also discussed code coverage.
We ended up talking about the ZBREAK command and its /TRACE option.
If I have a cache.dat file from a Windows 2012 (64-bit) machine and I want to mount it on a Caché instance running on RHEL, will it work? Assume the versions of Caché are the same.
Is there a function in Atelier that's equivalent to Studio's "Find in Files"? Namely, to search for assets containing a given search pattern across an entire namespace -- not just across files that are currently in the local project.
I've been playing with the search functions in Eclipse, and so far haven't found a combination of options that will search against assets that are only on the server -- I can only get results for assets that are already in my workspace.
Let assume you have a infinitely scaling algorithm implemented in your application, using replication, ECP, or any other means of horizontal scaling, and let assume you know how to run your system under any volume of requests, the trick is to deploy required number of computing nodes in the cluster. If we are talking about cluster of 2-4 nodes your administrator (or as they call it today "devops engineer") will install anything manually. Probably he will easily handle 5 nodes configuration in the cluster.
I have a question on working with dev and prod environments.
After project is ready and signed, I usually migrate outcome to production using the export tool from the studio.
For changes/adding to existing projects, I exclude the production class (as it has some different values differing the dev from the live) and I add the differences manually afterwards.
My questions on migrating are:
Does anyone has (to share) his/her best practice steps on "migrating dev to prod"?
When we write unit test cases for cache object script code using %UnitTest.TestCase, what is the best way to write code to identify code coverage?
So, let say my unit test case hit all 10 lines of code of a method for a given class. So, unit test coverage should be 100% for that. But, using line-by-line coverage [(%Monitor.System.LineByLine] getting wrong percentage, because it also includes code comment/documentation as part of code. So, practically we can not ever achieve 100% of code coverage by using this API.