Question
Marco Blom · Feb 21, 2019

How to run server-side methods from Angular or PHP

HI Community,

Now Intersystems has developers definitely cut-off from Zen/CSP I am looking for sample code how to invoke server-side methods from Angular and PHP, Java client.

I only see some rest/json crud examples, but that is not the whole picture I assume.

Let's say I have a persistent Class with a class method to import or modify data...

I want to invoke this from my Angular App or PHP app.

any examples, suggestions?

00
1 0 5 225
Log in or sign up to continue

I see 5 options :

  • any classmethod can be projected as SQL Procedure. So using your ODBC adapter you may communicate that way with Caché
    based on rather poor personal experience of PHP & ODBC it is definitely not my favorite.
  • With Angular & PHP you are in the Web environment. So SOAP Webservices may be useful.
    I had a very positive experience with that approach. see it here  Feeling the power of Caché
  • Actually I would rather use REST in combination with JSON
  • If rather synchronous interaction between both sides is required AJAX (+JSON) could be a way 
  • Or for longer lasting asynchronous communication WebSockets might be appropriate.

So you have a choice what fits best to your needs.

Hi Robert

I desperately need an example of Angular using REST to talk to a FHIR server to convince the company that we should be using Iris for Health and Angular for our upcoming developments. The issue is I don't know angular, I understand Rest and I understand FHIR. How can I get up and running in Angualr in the next 3 days.

Nigel

Sorry, I never touched Angular I only know where it is coming from.