#Frontend

0 Followers · 231 Posts

Front-end web development is the practice of converting data to a graphical interface, through the use of HTML, CSS, and JavaScript, so that users can view and interact with that data.

Learn more.

Article Nikita Savchenko · Jan 5, 2019 6m read

This article introduces InterSystems iKnow Entity Browser, a web application which allows to visualize extracted and organized text data mined from a large number of texts, powered by InterSystems iKnow technology, which is also known as InterSystems Text Analytics in InterSystems IRIS. Feel free to play with the demo of this tool or learn more about it on InterSystems Open Exchange.

6
3 1283
Article David Crawford · Jul 31, 2019 2m read

IRIS provides us with anti login CSRF attack mitigation, however this is not the same as a CSRF attack, as login attacks only occur on the login form. There are currently no built-in tools to mitigate CSRF attacks on api calls and other forms, so this is a step in mitigating these attacks.

See the following link from OWASP for the definition of a CSRF attack:

https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)

5
1 779
Question Dan Pahnke · Jul 23, 2019

Hello,

I've got a csp page that has successfully set up a websocket connection to a Cache class. When the websocket object's close function is triggered at the browser I was expecting one of the class' methods to fire at the server. The onclose method is triggered at the browser but nothing at the server. Is a method supposed to fire at the server?

Thanks,

Dan

Cache for Windows (x86-64) 2015.1.4 (Build 803_6) Tue May 15 2018 12:08:36 EDT

4
0 1258
Question David Crawford · Jul 15, 2019

CSP pages extend %CSP.Page. What about html/css/js/etc that are hosted on the same web application? Is there any way to override how they're processed like with how you can override a CSP page and CSP REST logic?

Thank you!

David

4
1 384
Article Ben Spead · Sep 12, 2017 1m read

The Widgets Direct sample application highlights many aspects of how to use InterSystems technologies to build a modern web application.  Features include:

  • Angular Material + AngularJS + JSON + REST based interactive application with Step by Step instructions on how it was built
  • Example scripts for server-side source control configuration with Perforce
  • %UnitTest logic for automated regression testing
  • %Installer class for automated instance installation from source control 
  • Scripts for Continuous Integration (CI) with Jenkins
  • Docker Manifest for automated provisioning of an instance
5
0 1543
Question Krishnamuthu Venkatachalam · May 30, 2019

Hi All,

I have a REST dispatcher class in which I enabled the Parameter HandleCorsRequest = 1;

I can able to access the API using Postman, but not with my web application. It throws the below error.

Access to XMLHttpRequest at 'https://ec2-10-200-XXX-X.com/REST/MRM/get/Message?MessageCode=ERR0006&L…' from origin 'https://ec2-80-106-XX-XXX..com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

2
0 1828
Question Mathieu Van Sevenant · Mar 12, 2019

Hello everyone smiley

I have a server configuration in a CSP Gateway installed on a PC (let's call it S2) different from the main one (let's call it S1). This configuration allows me to access a web application that is installed on S1, from a client C asking S2 for this webapp. But for now it works only in HTTP between C and S2, and we would like to use HTTPS (as it already works between S2 and S1).

First here are the tutos found in the doc:

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

8
0 2207
Question Thembelani Mlalazi · Apr 11, 2019

I have a query that I would like to  have refreshing at certain intervals lets say every 30 seconds with out refreshing the page content using the META TAGS

refreshes the whole page but I have a jquery function that will run at those intervals that I can use the problem is getting the jquery to call my COS function or is the way to do it with pure COS

2
0 490
Question Chip Gore · Mar 13, 2019

Hi -

I'm having odd behaviors on my EC2 hosted IRIS Community instance.

When I configure a "custom login page" in the System Management Portal for my web application I'm seeing a few different behaviors that are under documented (and also undesired)

The old Caché documentation indicates that the custom login page could be a ".csp" file, but this seems to nor be the case (i kept getting "not found" errors, even though I could bring up the page directly from the url FOR the login.csp file. To get around this, I created an HTML file and then, at least, the login page could be found to be rendered.

2
0 645
Article Nikita Savchenko · Feb 12, 2019 13m read

ˮ This is one of my articles which was never published in English. Let's fix it!

Hello! This article is about quite a practical way of developing InterSystems solutions without using the integrated tools like Studio or Atelier. All the code of the project can be stored in the form of "traditional" source code files, edited in your favorite development environment (for example, Visual Studio Code), indexed by any version control system and arbitrarily combined with many external tools for code analysis, preprocessing, packaging and so on.

6
6 3187
Question John Hotalen · Jan 25, 2019

Hello Cache Developers:  I was curious if anyone has ever created a TWAIN interface to their Cache Application?   I am new to TWAIN and hence the reason for this question.  From what I understand, TWAIN is software used by various digital imaging software and TWAIN provides an API for applications to call to be able to import images into their application.   I work with a healthcare application and was wondering what types of things are required for a Cache Web Application to call the TWAIN API to be able to load images into a Cache table.    Any input, sample code, or suggestions is

4
0 731
Article Fabian Haupt · Feb 12, 2016 8m read

Intro

Please note, this article is considered deprecated, check out the new revision over here: https://community.intersystems.com/post/tutorial-websockets

The goal of this post is to discuss working with Websockets in a Caché environment. We are going to have a quick discussion of what websockets are and then talk through an example chat application implemented on top of Websockets.

28
4 19360
Article Eduard Lebedyuk · Oct 8, 2018 5m read

InterSystems products (IRIS, Caché, Ensemble) already include a built-in Apache web server. But the built-in server is designed for the development and administration tasks and thus has certain limitations. Though you may find some useful workarounds for these limitations, the more common approach is to deploy a full-scale web server for your production environment. This article describes how to set up Apache to work with InterSystems products and how to provide HTTPS access. We will be using Ubuntu, but the configuration process is almost the same for all Linux distributions.

2
9 2930
Article Sergei Sarkisian · Oct 1, 2018 4m read

Not everyone knows that InterSystems Caché has a built-in tool for code profiling called Caché Monitor.

Its main purpose (obviously) is the collection of statistics for programs running in Caché. It can provide statistics by program, as well as detailed Line-by-Line statistics for each program.

Using Caché Monitor

Let’s take a look at a potential use case for Caché Monitor and its key features. So, in order to start the profiler, you need to go to the terminal and switch to the namespace that you want to monitor, then launch the %SYS.MONLBL system routine:

zn "<namespace>"
do ^%SYS.MONLBL
1
7 1116
Article Hansel Rudy Stange Gaete · Nov 19, 2018 1m read

Working on a proyect with :

Cache Object Script, Jquery and Bootstrap :

I have a big problem to do pagination with parameter, to query filter and registry limitation, but i find a solution using session and global:

Set FilterDate = %request.Get("df")
If (FilterDate=""){
    Set FilterDate = $Get(^NSSession(%session.SessionId,"FilterDate"))
}
If (FilterDate'=""){
    Set ^NSSession(%session.SessionId,"FilterDate") = FilterDate
}
1
0 527
Article Gevorg Arutiunian · Oct 8, 2018 2m read

This code snippet provides a ZEN page that downloads a stream from its database directly:


/// We assume that you have stored your data within this schema:
/// MyApp.Model.Storage: Filename,FileSize,Content,ContentType
Class zen.downloadStream Extends (%ZEN.Component.page,%CSP.StreamServer)
{
/// Wrapper to get the id of the download, we assume that the id is passed to this zen page
/// as a URI parameter, i.e.: MyApp.Downloads.cls?OID=1234
ClassMethod GetId()
{
    Quit $Get(%request.Data("OID",1))
}
 
/// Set the appropriate header for the file.
ClassMethod OnPreHTTP() As %Boolean
{
    Set tId = ..GetId()
 
    If ##Class(MyApp.Model.Storage).%ExistsId(tId) {
        Set tStream = ##Class(MyApp.Model.Storage).%OpenId(tId)
        // You could "guess" the content type by its file extension
        // or you can store it (before) in the database separately (like in this example).
        // Set Extension = $Piece(tStream.Filename,".",$Length(tStream.Filename,"."))
        // Set ContentType = ..FileClassify(Extension)
 
        Set %response.ContentType = tStream.ContentType
        Do %response.SetHeader("content-disposition","attachment; filename="_tStream.Filename)
        Do %response.SetHeader("Content-Length",tStream.FileSize)
    }
    Else {
        Set %response.Status="404 File Not Found"
        Quit 0
    }
    Quit $$$OK
}
 
ClassMethod OnPage() As %Status
{
    Set Download = ##Class(MyApp.Model.Storage).%OpenId(..GetId())
    Do Download.Content.OutputToDevice()
    Quit $$$OK
}

}

Link to code on GitHub

1
2 645
Article Chris Stewart · Apr 24, 2017 2m read

or "Bonus Breakage"

In our last lesson, we added a relationship between 2 persistent classes.  We are clearly going to need to start creating REST Services to expose CRUD operations for each of these classes, but before we do that, we should really finish defining our linkages.  We added code to our Widget toJSON to spool off related Accessory data, so we should really do the reciprocal and allow Accessories to return all Widgets that are compatible.

2
1 1309
Question Stephen Wilson · Sep 19, 2018
404 Not Found

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "notFound",
   "message": "Not Found"
  }
 ],
 "code": 404,
 "message": "Not Found"
 }
}

I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200.  If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?

1
0 2769
Question Mohan Kumar · Sep 13, 2018

Hi All,

I'm practicing Atelier in Eclipse, but

While working CSP page.

      1. Create new Web Application 

      2.  Open CSP Web Application in Atelier Project 

      3. New CSP page -> Save

i'm getting below error Message.  

/testv1/test.csp was saved locally but could not be saved remotely.

ERROR #5912: Page '/testv1/test.csp' does not exist

test.csp is saved locally but could not be saved remotely.

Reason: /testv1/test.csp was saved locally but could not be saved remotely.

ERROR #5912: Page '/testv1/test.csp' does not exist

i'm using MacOS with Eclipse Atelier.

3
0 682