Question
· 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?

Discussion (5)1
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.