0 Followers · 332 Posts

Caché Server Pages (CSP) is both an architecture and toolset used to build an interactive web applications with the InterSystems Data Platform.

Article Robert Cemper · Aug 23, 2017 2m read

I worked through the Community for proposals to provide end users
in an easy way with data formatted as EXCEL sheet.

There is a great article Tips & Tricks - SQL to Excel

there's an important message embedded: "EXCEL can interpret HTML tables and display them as usual"

Where's the light weight export to EXCEL ?
Good old CSP is well equipped to produce HTML tables accepted from EXCEL as input.
With modern Browsers you don't even need <head>and  <body> tags.
So the required code around your SQL result set is really slim.
And you are free to add any formatting you need either by HTML or in SQL.

1
1 1669
Question Sébastien Demoustiez · Jul 27, 2017

Hello,

I have a DB server (ser-app-db) where cache is installed as server.

I have a Web server (ser-app-w) where cache is installed as web server and configured as CSP gateway.

I followed the configuration guide (https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…) and ser-app-w perfectly display the CSP and CLS pages.

But that's not working for my REST service, for exemple with the REST sample:

http://ser-app-db/csp/samples/docserver/request(GET): work and show the request

http://ser-app-w/csp/samples/docserver/request(GET): return a 404.

9
0 1493
Question Lucas Scarduelli · Jun 14, 2017

Hi,

I only use Caché and CSP, I am making a simple request in CSP page with #call method, and I have to define a callback of this #call method, can I do this?

This is my simple request in CSP page (javascript):

            PainelBordoResource.prototype.obterIndicador = function(requisicaoParametros) {
                let retorno = #call(painelbordo.PainelBordoResource.obterIndicador(angular.toJson(requisicaoParametros)))#;
                return retorno;
            };
 

1
0 501
Article Chris Stewart · Apr 24, 2017 4m read

or "Things are going to break"

We left our application over the weekend, secure in the knowledge that it was returning data from our primary persistent class, User.Widget.  However, Widgets Direct are the premier supplier of both Widgets AND Widget Accessories, so we should really start working on adding these Accessories to our application. 

3
0 1451
Question Sean Connelly · May 17, 2017

From a browser, an XMLHttpRequest to a CSP page on a different server will obviously hit the CORS security check.

To get around this I can set the Access-Control-Allow-Origin header on that particular CSP class.

However, setting any request headers on the XMLHttpRequest object will trigger a pre-flight OPTIONS request.

This OPTIONS request is not handled by the target CSP page and the Access-Control-Allow-Origin header is never set, triggering a CORS error.

I can see in the new REST class that it can get a handle on the OPTIONS request but standard CSP pages don't seem to get them.

3
0 781
Question Amir Samary · May 10, 2017

Hi everyone,

This is:

Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.2 (Build 736U) Fri Sep 30 2016 12:25:56 EDT

The server is on RedHat Linux while the browser is running on Windows (Firefox).

I am helping a partner build a complex modern HTML5 web application that talks with Caché using REST calls. They have been using %CSP.REST very successfully. Security works great as well. 

11
0 10142
Question sansa stark · Apr 21, 2017

Hi All,

    We are using the InterSystems cache 5.02
    We having 80 license unit but don't the reason 50 unit have been consumed (CSP unit)
    This happen because of this page ran frequently "/apps/docmatic/%CSP.SysConnection.cls"
    Can anyone explain why this page ran frequently and consume license?
    
Thanks,
Sansa.    
    

1
0 226
Article Chris Stewart · Apr 20, 2017 3m read

We finished our last lesson with our Widgets Direct page iterating over a list of widgets, displaying an ID and a Name value.  While we have been able to achieve this with only a small amount of coding, the page itself is not the most visually appealing place to be.  The AngularJS framework is providing a powerful Model-View-Controller framework for our structure and logic, but it does not implement anything that will provide a nice UI experience.  For that we need to implement a UI toolkit.  We have numerous options here; the leading toolkits are BootStrap from Twitter and Angular Material

3
0 1798
Question Sean Connelly · Apr 19, 2017

WebSockets look to be supported reasonably well in Cache. I have yet to use them in production so I am wondering how well it has worked for other developers.

In particular what happens when the browser does not support WebSockets, or when a firewall blocks the connection.

Have you had to write your own long polling fall-back?

I've read the documentation and found this interesting article...

https://community.intersystems.com/post/asynchronous-websockets-quick-tutorial

but no mention of long polling fall-backs that I can see.

15
0 11763
Article Chris Stewart · Apr 21, 2017 2m read

At the end of our last lesson, we ended with our page displaying a nice (but garish) Angular Material Toolbar, and our Widget data displaying in a list of Material cards.  Our page feels a bit static, and we already know that the large number of Widgets that we will be dealing with will not be especially usable on a static list.  What can we do to help?

0
0 1455
Question Paras Batheja · Mar 15, 2017

Hi,

We have a application developed in CSP and JS. Is there any way to make this application available in multiple language like Spanish etc.

We are ready to re-write the code in Zen also if it supports that feature.

Could any one of you please assist/advice a Solution to reach the required goal using Cache technologies, it will be a great help if someone has any sample code for the same.

Thanks 

Paras

7
0 526
Article John Murray · Feb 14, 2017 1m read

If you are developing applications that use CSP or Zen, or potentially any of the other InterSystems web-related stuff that's built on top of CSP, then it's important to know how to keep one particular secret.

A central part of the CSP security architecture is a server-side session key. "Server-side" because its value should never be revealed to the client that is issuing the web requests. If it is revealed, a malicious client might be able to use it to bypass your security and make your server do things you don't want it to.

1
0 719
Article Chris Stewart · Apr 19, 2017 3m read

We finished our last lesson with our Widgets Direct page receiving a Welcome message as a property of a JSON object, which was unpacked and displayed on the page. However, we are on Lesson 3, and we still haven't had any talk of displaying widgets yet.  

Let's change that.  Widgets Direct are a leader in widget and widget accessories, so we clearly have numerous items to display.   To transfer this, we will need to declare and return our first array.  Let's go back to our REST.Dispatch class, and add this data to our Service.

0
0 1920
Question Greg Arnold · Apr 12, 2017

We are using an F5 load balancer to route public traffic to our IS server. My goal is to block public access to the Management Portal, and only allow what we want to expose, such as REST/SOAP services. At the F5, they can block URL wildcards or specific ports, so those are our options.

Since the URLs for the web services are in the same path ([host]/csp/healthshare/[namespace]/*), I can't see any URL wildcards happening. That leads me to ports; is there a way to put services on a specific port for all services, and everything else stay on a standard web port?

5
0 433
Question Jim Regan · Mar 24, 2017

I have a 100% ZEN application combined with 100% ZENReports and am also using IFind which is part of the solution.

 Our application is a cloud hosted solution where we lease a server which does not have a website, only  Cache configured under IIS.  Connectivity to our site is premised on a URL string such as  u12345.usa-server.com/csp/namespace/Cache.cls

2
0 330
Question Fred Gustafsson · Feb 2, 2017

So I installed Atelier, created my project, imported and compiled all my classes but now I need to import all my CSP files too but I can't find any instructions on how to do so. Just copying the files into [project]\CSp\csp is not working as they don't show up in the project tree.

2
0 577
Question Chris Stewart · Jan 5, 2017

I'm currently re-engineering an application from CSP pages directly accessing COS Methods, to an Angular/Material front end accessing a REST DAL.  Both the Angular front end and REST services are hosted from the same Caché instance and the same namespace, but the REST services have their own CSP application, with all calls being routed through a Dispatch class.  

5
0 614