Chris Stewart · Jan 20, 2016 go to post

Fixed it.  Was setting that property, but to "true" rather than to 1.  Rookie mistake

Chris Stewart · Mar 30, 2016 go to post

Fantastic.  Thank you both for your help.  I will migrate over to using %Object instead

Chris Stewart · May 27, 2016 go to post

This is excellent information.  I've been spooling data out of SQL cursors manually so far (in 2016.1), and this is definitely making me consider another version upgrade to get access to these features.

Chris Stewart · Nov 14, 2016 go to post

A follow up question.  I was able to push across a small filestream using my REST services, with the file stream encoded in BASE 64.  I then tried a large file, and received a MAXSTRING error.  I clearly need to use Streams to get round this, and was looking at the class documentation.  I believe there aren't Stream capable versions of the following functions, but I thought I'd ask here before I started coding:

1. Base64Encode (and Decode)

2. toJSON() (and fromJSON)

Chris Stewart · Jan 5, 2017 go to post

Thanks for the reply, Mark

This is a web application with links to binary attachments, that are stored as streams.  The streams are accessed via links on the page, and return the stream based on the OID generated (at present these are FileStreams, and the OID is pointing at the path on the FS).   I'm seperately looking to move these streams into GlobalStreams, to reduce some of the complexity around the file storage.

Chris Stewart · Apr 19, 2017 go to post

That's weird.  I've reuploaded the images and resaved, so hopefully they should stay uploaded now.  I will double check Pts 2 and 3 also

Chris Stewart · Apr 19, 2017 go to post

Hi Joe

My next article was going to be a debugging session, so this is a great question.  The first thing to do when Angular misbehaves is to open your browser debugger using F12, and seeing if there are any errors being logged.  The Angular errors very helpfully include a degree of self diagnosis. 

I will get the codebase up publicly (probably on github), and will post a link back on the articles

Glad you're getting some benefit from my rambling

Chris

Chris Stewart · Apr 19, 2017 go to post

Also, you will want to make sure that the ng-app is defined on the html tags, and that the ng-controller is defined for the body.  Importing the javascript is only half the battle, the hints in the html tell the runtime where to look for the logic

Chris Stewart · Apr 20, 2017 go to post

Hi Joe

The sytnax is different and incompatible unfortunately.  However, I've actually been doing all of my development against 2016.1, so the code I'm writing here is all feature compatible (I purposefully didn't explore any of the more advanced JSON functionality once I heard about the changes in the pipeline).  Essentially, the only difference is that the % calls are instead $ calls in 2016.1.  Since I've kept the logic basic, this means you should only need to convert a small amount of the code to make it compatible with 2016.1.  Stefan wrote a great summary of the functionality here, and this contains the 2016.1 versions of the syntax.  If I start referring to any new JSON functionality that does not have an equivilant syntax in 2016.1, I will make that very clear in the article

HTH

Chris

Chris Stewart · Apr 20, 2017 go to post

Hi Jill

You busted me!  I deliberately left off the Caché Security portion of the equation because it would have gotten very complex very fast.  

The apache config info is great.  I was lucky enough to inherit a fully configured httpd instance on my dev system

Many thanks

Chris

P.S.  Chasing up why the images keep disappearing from the post, hopefully will be resolved soon

Chris Stewart · Apr 20, 2017 go to post

"As far as I know the only change that can't be caught by find-and-replace is the one requiring COS expressions embedded within JSON to have parentheses"


This was my understanding of the differences too, so I've (probably at my own expense) been very careful to only use the methods that I know I can do a basic Find-Replace on in the future.  So, I've been assigning the results of any COS expressions to variables, then binding these to the Dynamic objects.  It's a little more verbose, but it should allow an easier translation path between .1 and .2

Chris Stewart · Apr 21, 2017 go to post

I have included a class to populate a small amount of sample data in the Data package (available on Github).  The data used in the articles is just an example, and any content will suffice, if you wish to create your own

Chris Stewart · Apr 21, 2017 go to post

Hi Evgeny, I'll contact you offline about pt1.  I've added the relevant ISC topics to the repo on Github now for point 2

Chris Stewart · Apr 25, 2017 go to post

Hi Joe

I didn't include one as the one in the demos is under a license.   Any small svg file will work in it's place for demo purposes

Thansk
Chris

Chris Stewart · Apr 25, 2017 go to post

Hi Joe, 

Are you using Chrome to debug?  You should be able to click through to the error on the Network tab from the Deubgger.  Anything that returns an error code should be highlighted in red, and if you click that red text, then it should give you the specific error coming from Caché.  If you get this error, I should be able to find my mistake in the exported code.

There's example of this debug process at the end of part 7.  I've also added an example logo to the github repo

Thanks

Chris

Chris Stewart · Apr 25, 2017 go to post

P.S.  It's probably Security, I've developed this example in Minimal Security, so you may need to assign Read/Write permissions to the Role attached to your web applications

Chris Stewart · Apr 28, 2017 go to post

I will annotate the screenshots above to make it clear which files are being displayed

Chris Stewart · May 3, 2017 go to post

HI Cheng

I was hoping no one noticed that :)  I made a mistake in the original version, when I was taking screenshots, but I had to retake one screenshot, and this is from the corrrected version.  The code on github is consistent, and uses the same Cursor throughout the example

Chris Stewart · May 5, 2017 go to post

HI Jennifer

I started building my application quite some time ago (over a year ago), so Angular 1.x was the best choice at the time with the support of the Material UI platform, and I didn't want to have to start again since the new version of Angular isn't compatible with the old syntax, or easy to migrate to.  However, one of the nice things about structuring the application with REST is that it is pretty straightforward to bolt a new front end, or even run a new one side by side with the old one.

Chris Stewart · Jun 3, 2017 go to post

Hi Ed

If you download the code from the linked GitHub repo, then I've provided some sample population methods for the persistent classes

Chris Stewart · Jun 28, 2017 go to post

I don't think this is a great idea, to mix the technologies, as both will try to manipulate the DOM, and you would likely see strange behaviour

If you are migrating the application in a modular fashion, I've found it's best to keep the functionality seperate, and tune the navigation to switch between the appropriate technologies and migrate the existing pages as you go.  The only thing to be careful about is your %session state if you do this (I've barely used %session on my Angular code, and instead try to write everything to work in a stateless fashion)

Chris Stewart · Jun 28, 2017 go to post

This tip has saved me a ton of hassle in a number of occasions.  One thing to note is that you will inherit the OS user that Caché is running under, so always remember to select your operating user carefully when installing Caché, so as to not give terminal users network access that they may not otherwise have