go to post Istvan Hahn · May 7, 2020 Stuart, if I were you I would also consider the %Regex.Matcher class ReplaceAll method to use. For example: set list = "ABC~DEF~GHI~JKL~MNO~[~PQR~]" set matcher1=##class(%Regex.Matcher).%New("\[",list) set matcher2=##class(%Regex.Matcher).%New("\]",matcher1.ReplaceAll("Y")) write matcher2.ReplaceAll("N") Istvan
go to post Istvan Hahn · Mar 11, 2019 For sure I do not want to return to the coding style like S f="inputfile.txt" O f U f F R l D . Q:l="***END***" . D ##class(process).Input(l) But working with Python seems to be broadly accepted all over the globe without questioning the syntax of it. In other words: I agree with Robert. There is no perfect programming language and it is always painful to read a code written in an "unknown" language. On the other hand it does not mean that a programmer should not care about code maintainability. So what is the point? Everyone must find the balance between coding efficiency and readability. And tools are just tools helping us find the balance.
go to post Istvan Hahn · Jan 20, 2017 My suggestion: create an interim XSL file and copy-paste before debugging...
go to post Istvan Hahn · Dec 12, 2016 Hello Chris,Are those "action classes" following a pattern? In other words: do you have some basic repeated structure from whiuch your REST API is made of? If yes, then the "action dispatcher" can be much less complex by using URL path encoded dispatch instead of routing. I had an example doing that for Ensemble (https://community.intersystems.com/post/creating-restful-service-using-ensemble) quite a time ago. It Works for non-Ensemble services too. The key is that you have a single dispatch method in your "action dispatcher", which calls the static methods of your "action classes" AND the class name of it somehow derived from a "movable part" of your URL path.
go to post Istvan Hahn · Oct 6, 2016 Scott,Do not confuse your self. Response is the data being expected as a result of a call. Exception is never expected. An exception is like an asynchronous event trapped by a dedicated error handler. The trap prepares (or not) to do something to compensate the impact of an error.Therefor like in COS or Java you need to define a compensation scope (try block) and compensation handlers (catch block). BPL provides components to do it.Istvan
go to post Istvan Hahn · Sep 22, 2016 Thanks for the comments. This article is mainly for beginners and focusing on how to build RESTful services. Yes, selecting the right testing tool could be important. But let us help the beginners to buld their first service, let them try (using something) and once they are able to "fly" write them an article "Selecting the best tool for testing RESTful services".