Ben Spead · Mar 4, 2021 go to post

There are different kernels but other than that you should be able to run the same ObjectScript code on both platforms and it will behalf identically.  If you are going to be doing file interactions, then I suggest using the %File library class which will make your code portable between Windows and UNIX file systems.  Likewise if you are calling out to other executables, you will need to instrument your code to call out appropriately based on your platform. 

Ben Spead · Feb 18, 2021 go to post

I am assuming you want to create a tag-based CSP page as a quick and dirty way to through up some data in a table?  If so, the basic steps would be:

  1. Load a JS library like https://www.tablefilter.com/ to make your filtering easy
  2. Write out your <table> and <th> tags 
  3. Create a <script language='cache' runat='server'> block to hold your ObjectScript which will fetch your result set 
  4. Use %SQL.Statement to create and run the query and fetch the data
  5. Iterate over the resultset, and write out a row of HTML for each row in the resultset using &html<>
  6. End your </script> tag and then end your </table> tag

Hope that gets you rolling!

Ben Spead · Jan 5, 2021 go to post

This is definitely possible, although it will be very painful :)  You can use Studio to edit any sort of flat files on the OS, and Studio has been used for years to edit .js and .css files.  You can use Studio to edit the source files for your React or Angular app, but you will then need to use the CLI in order to build your app for testing (you could also roll your own server side source control hooks to do this).  So if your organization is currently locked into Studio, this can be done but you'll need to do extra work to make it work.

If you have the flexibility, I would strongly recommend that you leverage VSCode rather than Studio for this.

Ben Spead · Dec 31, 2020 go to post

please share the doc link you are referring to.  ZF calls are still supported and we use them for our source control integration within InterSystems.  The zf(-1) has been deprecated and replaced with zf(-100) and you can certainly use that to do the same thing but may need to change your zf input slightly to use 100.

Ben Spead · Dec 15, 2020 go to post

No, no - *please* don't encourage the the use of eXecute ... that can make maintenance so very difficult :(  Most ObjectScript coding standards I have seen strictly forbid the use of this :) 

Ben Spead · Dec 11, 2020 go to post

@Rich Taylor - John is correct, server-side source control models are fully supported and that is the dominant model for many (including internal apps at ISC, and our implementations in the field).  I did a presentation at Virtual Summit on how to choose between Private / Shared Dev servers and Client-side vs Server-side source control and what the IDE options are for each.  Tim Leavitt also did a session on the topic of server-side source control with VSCode.  Here are the links:

https://learning.intersystems.com/course/view.php?id=1638

https://learning.intersystems.com/course/view.php?id=1615

My team has been very active in the VS Code plug-in testing and development to ensure that it will be fully functional for our serverside source control based workflows.

Ben Spead · Dec 3, 2020 go to post

The new UI is now live for all users!  Feel free to leave any questions or comments.  

Ben Spead · Nov 21, 2020 go to post

Unfortunately not - AppS.REST is only supported for InterSystems IRIS as it relies on enhanced JSON support that exists there but not Caché.

Ben Spead · Nov 19, 2020 go to post

Thanks for the update George - note, this really isn't a CCR-related question.  

Ben Spead · Nov 19, 2020 go to post

Sorry @Jeffrey England - I only just saw this now (feel free to use an @ mention in the future).

This control doesn't currently include any sort of dropdown.  It was based on the System lookup in the old UI where people could just drop in their SysCode to drive navigation.  Adding a dropdown of some sort is on the roadmap, but it's not trivial as some people have access to hundreds of Systems (so it's not a simple dropdown - it will eventually be a combination typeahead dropdown which pulls from all Orgs a user has access to).  

We will be moving live an update to this component soon which makes it more clear that SystemCode is optional (but it will still be a text field).

Hope that helps explain things!

Ben

Ben Spead · Oct 28, 2020 go to post

In that case I can't see how a 1.4 sec query could trigger any sort of timeout from a CSPGateway perspective.  I think you have something else going on - maybe an uncaught error in your code?

Ben Spead · Oct 28, 2020 go to post

Phuc,

Assuming the SQL is being run synchronously from within the CSP page, then the page will not be able to send it's response to the client while it waits for the SQL to complete.  Are you saying that the average response time of the query is 1.4 minutes?  If so then I think you need to see if you can speed up your query, call for the data asynchronously, or change your CSPGateway configuration so it has a longer timeout.

Ben Spead · Oct 5, 2020 go to post

You can get a Community Edition of InterSystems IRIS as Evgeny suggested, or if you need a new developer license for your Caché instance you should work with your Account Manager to get one.  If you are not sure who your account manager is, contact the WRC who should be able to help direct you.

Ben Spead · Sep 21, 2020 go to post

I agree with both Tim and Evgeny.  In addition, I will add that we also store our unit tests in a different location, which has a top level of /internal for all of our in-house applications.  We store unit tests and test data in /internal so our integration scripts can explicitly ignore changes in those branches when we're porting things to our LIVE branch.  This ensures that no testing code or testing data ever make it into production.  

Ben Spead · Sep 14, 2020 go to post

@Perla Escarcega  - taking a closer look at this, I think we had an issue with a historical file clean-up routine which was a little too overeager to reclaim space.  All of your source is safe and available but you may need to create a fresh ItemSet to push this source.  Note - you should always be making fresh ItemSets anyway because the head revision may be newer than what is in your historical ItemSet, and you don't want to get an older revision of something which breaks when interacting with a newer revision of other items.  So simply create a new ItemSet for BASE and deploy it and you should be all set.

P.S.  This does raise the question of why you are initializing a new Secondary BASE environment from old ItemSets as opposed to just grabbing the head revision of the BASE source and running Refresh to pull it all into the Namespace?  I am afraid your approach may be significantly more risky than the recommended approach.  

Ben Spead · Sep 14, 2020 go to post

Actually - I take back my statement now that I looked at the error more closely.  It appears as though it's trying to fetch an ItemSet by ID that doesn't actually exist.   What is the CCR in question?

Ben Spead · Sep 14, 2020 go to post

@Perla Escarcega  - the fact that it is already in LIVE should not have any bearing here.  I am guessing that the newly created Namespace is part of a newly created instance?  It looks like you may have an older version of the CCR Client Tools with a bug in it.  Could you provide the results of "Do Version^%buildccr" so we can see what versions of the tools you are running?

Ben Spead · Sep 11, 2020 go to post

I hope that someone else can chime in and confirm, but my understanding is that we don't release Caché on containers, only InterSystems IRIS containers (I just looked in the Distributions section of the WRC to confirm).  However, you should be able to get a InterSystems IRIS container to play with so this shouldn't be a blocker for you - just grab an InterSystems IRIS container (available via the WRC Distributions page, or Docker Hub) and use that to try the demo.

In terms of Caché on containers, I know that there are people in the community who have 'rolled their own', and you can find details on threads here, but I don't think you want to go in that direction if you're new with containers.  

HTH - good luck!

Ben

Ben Spead · Sep 11, 2020 go to post

I need to defer to @Sergei Shutov  for many of the answers but I can help with one of these:
[quote]

- General web application question for Cache/IRIS: once I create the web application for example at \csp\mxdtest, any subfolder there is treated as part of the app, yes?  So i could create C:\InterSystems\Cache\CSP\mxdtest\images and the images folder are part of the web applcation  \csp\mxdtest?

[/quote]

Yes, that is correct.  Your subfolders under the root should be navigable via the CSP application.  NOTE - I think this can be overridden by web server settings, but this is the default behavior and I leverage it frequently for my apps

Ben Spead · Sep 11, 2020 go to post

I will admit - I was taken by how persuasive the tone was and was planning a rebuttal until I got to the last paragraph.  Well done Igor :)

Ben Spead · Sep 1, 2020 go to post

@sjbttt sjbttt  - it sounds like you want to set up source control which controls this Readonly property on the server, is that correct?  If that is the case, then you will need to use server-side source control hooks.  https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GSTD_Hooks  would be a good place to start understanding how to manage this in general.

For your specific question, the way we force classes to be read-only with our source control hooks is via the GetStatus() method which should be extended from the %Studio.SourceControl.Base subclass of your hooks (see https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?APP=1&CLASSNAME=%25Studio.SourceControl.Base
).  This method returns an "Editable" property which your hooks control and which can be used to force the IDE (Studio, Atelier or VSCode) to treat the file as Readonly, thereby preventing users from changing it.  In our development workflow, we will force the class to be Readonly in the following situations:

  •  The user does not have it checked out
  • A different user has it checked out
  • The entire namespace has source locked (e.g. for non-development environments)
  •  It is mapped from another namespace (we manage our source branches based on Namespace so we treat a read-only those things which are not in the current Namespace

Hope this is helpful.  

Ben Spead · Jun 24, 2020 go to post

That may be the cleanest you can get it, unless you know that the methods are always Classmethods of the class you are calling in which case you don't need to send $classname() every time.  But sending it does allow for the generalized use-case of calling to different classes.

I was playing around to programmatically figure out how many argument a method accepts using %Library.ClassDefinition, however I just realized that if $classmethod() can't accept variable argument quantities than this doesn't help at all and you'd still end up with the approach that you have above.  

It may be worth a note to the WRC to ask for an enhancement to $classmethod() (unless someone chimes in here to say that there is a way to pass a variable number of arguments to it)

Ben Spead · Jun 24, 2020 go to post

I think you could generalize the sample I pasted about which uses $classmethod but passing in a collection of some sort with the Method name as the first item and the arguments for the method as additional items and then iterate through that.  It could be a $LB of $LBs or a JSON object.  It would be easier if there was a set number of arguments that were allowed.  This approach is probably a little safer than the use of Exceute.

Ben Spead · Jun 24, 2020 go to post

Not sure what you mean by occurring before and after.  However, you could pass the name of the method and then execute it using $ClassMethod within MethodA()

Something like:

Do ..MethodA("Method1","var","Method2",0)

MethodA {method1, arg1, method2, arg2) {

Do $classmethod($classname(),method1,arg1)

Do $classmethod($classname(),method2,arg2)

}

But again, I am not entirely sure what you want to accomplish here....