Web Development

Syndicate content 21 

ˮ 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

Last comment 2 March 2019
3 3
588

views

+ 6

rating

This post is intended to guide you through the new JSON capabilities that we introduced in Caché 2016.1. JSON has emerged to a serialization format used in many places. The web started it, but nowadays it is utilized everywhere. We've got plenty to cover, so let's get started.

Last comment 11 January 2019
1 33
6716

views

+ 32

rating

There are several options how to deliver user interface(UI) for DeepSee BI solutions. The most common approaches are:

  • use native DeepSee Dashboards, get web UI in Zen and deliver it in your web apps.

  • use DeepSee REST API, get and build your own UI widgets and dashboards.

The 1st approach is good because of the possibility to build BI dashboards without coding relatively fast, but you are limited with preset widgets library which is expandable but with a lot of development efforts.

The 2nd provides you the way to use any comprehensive js framework (D3, Highcharts, etc) to visualize your DeepSee data, but you need to code widgets and dashboards on your own.

Today I want to tell you about yet another approach which combines both listed above and provides Angular based web UI for DeepSee Dashboards -  DeepSee Web library.

Last comment 8 January 2019
2 7
767

views

+ 2

rating

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

Last comment 7 January 2019
2 2
220

views

+ 6

rating

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.

Last comment 25 December 2018
7 4
282

views

+ 3

rating

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

As the result, you will see the following:

Last comment 14 December 2018
7 2
354

views

+ 3

rating

So, one day you're working away at WidgetsDirect, the leading supplier of widget and widget accessories, when your boss asks you to develop the new customer facing portal to allow the client base to access the next generation of Widgets..... and he wants you to use Angular 1.x to read into the department's Caché server.   

There's only one problem:  You've never used Angular, and don't know how to make it talk to Caché.

This guide is going to walk through the process of setting up a full Angular stack which communicates with a Caché backend using JSON over REST.  


This is a parent page for the multipart series on creating a Material-Angular1x-REST-JSON-Caché application.  The current list of articles is

Last comment 13 December 2018
3 10
3057

views

+ 16

rating

In this article, I would show how you can upload and download files from InterSystems products via http.

The questions about working with files over http arise fairly often on community and I'm usually linking to my FileServer project which demonstrates file upload/download but I'd like to talk a bit more on how we can serve and receive files from InterSystems products.

Downloading a file

If you have a file in on a file system and you know the path you can serve it from REST or CSP context by calling this method

Last comment 26 November 2018
3 2
341

views

+ 3

rating

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
}

Previously i write the code centred on $request, but this have a problem when you navigate for more than 2 pages on pagination links, loosing filter and sending you to same number page, but without filter.

Thanks for read !! 

Last comment 19 November 2018
0 2
88

views

+ 1

rating

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

Last comment 9 October 2018
1 2
97

views

+ 1

rating

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.

The code we can use is essentially the same as we used on the Widget side.  We will iterate over the bridging class and return the toJSON of all referenced widgets.  We are definitely sure we have a toJSON for the Widget class, so we shouldn't be expecting any errors.  We add the code to WidgetAccessory and compile, before loading our service in the REST debugger to make sure everything is spooling OK

Last comment 24 September 2018
1 2
448

views

+ 3

rating

Hi everyone,

 

are you curious which topics we are going to cover at this year’s Global Summit? You have come to the right place! I will provide you with a sneak peek of what you can expect from the areas I am responsible for.

Last comment 5 September 2018
1 3
636

views

+ 5

rating

or "Didn't you say you would cover Persistent Objects in Part 5, Chris?"

Yes, that was the plan.  This is a pretty important topic, so it get's its own Article

Up until now, we've display widget JSON that has been created by a basic loop.  Clearly this isn't of much value.  Now we have our stack connected together, and we can see that the data is flowing to the Welcome page, it's time to complete the stack and start feeding our service from "real" data.


Let's start with our (very basic) Persistent class for Widgets.  We have 4 properties to hold Name, Description, Price and current Quantity.  We would like to expose all of these on our page.

Last comment 4 July 2018
0 3
684

views

+ 2

rating

So, one day you're working away at WidgetsDirect, the leading supplier of widget and widget accessories, when your boss asks you to develop the new customer facing portal to allow the client base to access the next generation of Widgets..... and he wants you to use Angular 1.x to read into the department's Caché server.   

There's only one problem:  You've never used Angular, and don't know how to make it talk to Caché.

This guide is going to walk through the process of setting up a full Angular stack which communicates with a Caché backend using JSON over REST.  

Part 1 - Setup

To start fresh, we will create a Namespace for our new application - WIDGETDIRECT, and set this up with Code and Data databases, and appropriate Security roles.  

Our next step is to set up 2 Applications to serve web content; one for the Angular web content and one to serve the REST conten

Last comment 3 July 2018
0 6
2289

views

+ 14

rating

In this article I would like to present the RESTForms project - generic REST API backend for modern web applications.

The idea behind the project is simple -after I wrote several REST APIs I realized that generally, REST API consists of two parts:

  • Work with persistent classes
  • Custom business logic

And, while you'll have to write your own custom business logic, RESTForms provides all things related to working with persistent classes right out of the box.
Use cases

  • You already have a data model in Caché and you want to expose some (or all) of the information in a form of REST API
  • You are developing a new Caché application and you want to provide a REST API
Last comment 17 May 2018
3 8
2983

views

+ 12

rating

Hi All
This is the index to a series of articles I hope to create over the coming months.

ZEN and ZEN Mojo are no longer being actively developed by Intesystems - this is a great shame as it is a fine product that works so well for business applications.
However ZEN is a 15 year old product and I need a path forward to replace the ZEN UI with a supported development framework.

This article is an index of the other articles I have, or plan to write. - the articles will be subject to change as I develop my thoughts and climb the learning curve.

Last comment 12 May 2018
0 7
629

views

+ 12

rating

Index to Articles

Published 2018-05-11 Last edit -

Hi All

I this article I detail some strategic issues that a new development UI will need to address - these are the ones that I can think of now - others may come to light during this journey.

See the webinar by Eduard Lebedyuk here from the last Global Summit describing  modern web development and Caché

And, as always, if I have missed something please comment....

Last comment 12 May 2018
0 4
545

views

+ 12

rating

Index to Articles

Hi All

I am an avid user of ZEN for over 10 years now and it works for me.
But it seems that Intersystems are no longer actively developing it (or ZEN Mojo), the only published reference to this  is here

As an aside, Intersystems makes fine products (I have been using the technology for 35 years) and has great support BUT they are not good at being open with their product road map/retirement plans.  This is very embarrassing  to me when talking with my end user clients.

Last comment 11 May 2018
0 8
992

views

+ 15

rating

Index to Articles

Hi All

It's been 6 weeks since my original article sad
- - - - -but I have been busy on this project smiley

I have been looking at/thinking about a replacement for ZEN for around 12 months but only really started in depth 4 months ago.
Also been in IT for long enough that I can "get a feel" for a product/technology and make decisions accordingly without going into great detail. 
Any new technology has a learning curve and I don't want to waste time and effort on something that won't fly. 
And, as always, I am looking to minimise the learning curve as I want to concentrate on delivering business benefit. 

0 3
0

comments

383

views

+ 14

rating

This series of articles aims to address the following topics:

  • Creation of a web application based on REST pages;
  • Overview of some tools for tracing (debugging) HTTP requests;
  • Switching from hyperevents to... hyperevents;
  • Integration with jQuery File Upload;
  • Conversion of JSON from the {id:1,parentId:1} format to the {id:1,children:[{}]} format for tree visualization;
  • Integration with jQuery EasyUI (using datagrid and tree as examples);
  • Other topics.

Last comment 8 March 2018
0 3
496

views

+ 4

rating

In our last lesson, we implemented a new REST Service to allow us to perform CRU operations on Widgets, and refactored our Controllers to allow the page setup to be decouple from the content.

When we created our Widget Services, we did not implement a Deletion operation, which the HTTP Delete verb provides.  As this is a base table for other parts of the Widgets Direct empire, we don't want to be able to do a hard Delete of the WIdget values, as this could cause issues with our ordering and billing modules.  So, we will add a "Deleted" property to the class, and have the Delete operation set this Boolean flag instead.  We will adjust our GetAllWidgets method to ignore any records which are marked as "Deleted"

REST.Widget

Last comment 2 March 2018
0 6
501

views

+ 3

rating

Hi, Community!

In the second part about DeepSee Web, I’ll describe what customization options you have with DSW.  

There are two types of customizations: widget customization and dashboard panel customization.

Example of dashboard customization on Developer Community analytics.

Last comment 4 December 2017
0 3
281

views

+ 2

rating

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

We will be adding articles which discuss the above list of features to drill down in more detail on each topic (feel free to  comment if there is something you want to see done sooner rather than later)

Last comment 23 October 2017
0 6
795

views

+ 5

rating

Sometimes you can face the situation when you did update the web app on Caché server but you cannot get the newest version of the app in a browser.

Here are couple recipes which help me to solve it. From simplest to more sophisticated and not obvious.

1. Refresh page in a browser

In Chrome it is Ctrl+R or 'Refresh' button. Obvious, but helpful.

2. Hard reset in a browser

If you are in Chrome, open Developer tools

and then right click on Refresh button.  Less obvious and very helpful sometimes.

3. Clear cache in CSP Gateway

Last comment 20 October 2017
0 2
334

views

+ 2

rating