Using Progress OpenEdge, Corticon, Rollbase And Node.js

Transcription

Track 1: The Empowered Business“Using Progress OpenEdge, Corticon, Rollbaseand Node.js to create a dynamic, rule- andmodel-driven Web-UI”» Mike Liewehr, AKIOMA Software» Frank Hilhorst, Progressive Consulting

AgendaThe IdeaThe SolutionTechnical overviewArchitecture explained on a live sampleDetailed technical explanationQ&A2

The Idea“Building web based configuration forms forself service sales of complex productswithout coding”3

The IdeaBuild complex, web based configuration forms without codingExamples: Car configurator Complex custom-built machines Online Insurance Enrollment Technically these are all similar4

The Concept

code rules code and design UI build database structure

Dramatically reduced time-to-marketLower costsNo errors

Requirements and challengesChallenges that came up when building the solution Data definitions vary greatly (cars, machines, people, policies ) Need a way to define data definition by end-userComplex rules, that are fully customer driven Allow to define complex rules without codingRich Browser-based UI UI has to be very flexible and dynamic, support for richcomponentsPerformance! UI has to adapt in realtime9

challengesChallenges that came up when building the solution and the Products to solve them:Data definitions vary greatly (cars, machines, people, insurance ) Progress RollbaseComplex rules, that are fully customer driven Progress CorticonRich UI which has to be very flexible and dynamic AKIOMA HTML5-ClientPerformance! - UI has to adapt in realtime Node.JS / Socket.IO / node4Progress / ABL (and some magic )10

Solution Live Demo11

Technical detailsCorticon RulesengineNode.js Socket.IO Node4Progress ServerRulesheetVocabularyOpenEdge Appserver screenDSAKIOMAUIConnectorClientWebbrowser HTML5JavaScriptSWAT UISocket.IO12

Technical detailsServerCorticon Rules Engine-Rule SheetVocabularOE Appserver-ScreenDSAKIOMAUI Connector8Node.js-Socket.IONode4ProgressA 1B 42C 3D-HTML 5JavaScriptSWAT UISocket.IOClient13

Detailed technical explanationDetailed explanation of the Architecture14

Introduction to Node & Node4Progress About Node Server side javascript engine Lightweight, scalable and fast Implements non-blocking programming model Involves using callback procedures Allows you to build web applications with featuresthat cannot be accomplsihed any other way Hot technology Microsoft is going Node, Progress is going Node,everybody is going Node About node4progress Bridge for accessing business logic on appserverdirectly from Node15

Node4Progress Mission Provide flexible and fast way to access businessfunctionality of the appserver Without additional effort to support new appserverprocedures Minimizing the number of middleware componentsneeded (e.g. Tomcat)16

Node4Progress Features and characteristics Small foot print (4MB) Fast Easy to install Npm install node4progress Communicates with appserver through JavaOpenClient Supports 2 methods for calling an appserverprocedure Calling a handler Dynamic appserver call Employs dataset object modelled after ProgressProDataset17

Converting output parameters of an Appserverprocedure into a JSON structure{"output":{"OutputParametes-1" : ".","OutputParametes-2" : ".","dsCustomer" : {.},“ErrMsg" : ""},"error": "“} Root level output tag contains output parametersparameters from appserver procedure Root level error tag contains error message ifexecution of appserver procedure failed18

Calling a handlervar node4progress require("node4progress")(null);var handler "handlers/CustomerHandler.p";var inputPars "NumCustomersToPull 2";node4progress.callHandler(handler, ;});19

Approach to calling any appserver proceduredynamically Define appserver procedure to call Node4progress.setAppSvrProc(.); Define each parameter Node4progress.setParameter(.); Define callback procedure Invoke appserver procedure Node4progress.invoke(callback);20

Calling appserver procedure dynamically(example)var node4progress r","input","NumCustomersToPull 5&batchNum lt){if(err){console.log("ERROR- " err);}else{console.log(result);result JSON.parse(result);}});21

Parameter types supported Data-types Table-handleDataset-handle Modes Input Input-output Output (append)22

Challenges of working with data When passing data as input Data needs to be formatted exactly right i.e. In read-json format Working directly with raw JSON structure is error prone Solution The node4progress dataset and temp-table objects23

The node4progress dataset object Getting the data in a dataset objectdataset tputJson); Objects provided DatasetTempTableBufferBufferField copyDataset, emptyDataset, writeJson forEach, bufferCreate, bufferCopy, bufferDelete, copyTempTable,emptyTempTable, findFirst, findLast, writeJson Method provided at the dataset level Methods provided at the TempTable level Methods provided at the buffer level Display, writeJson24

The node4progress dataset object Getting the data in a dataset objectdataset tputJson); Navigating the data in a temp-tabledataset. tNum ttCustBuf. (“cust-num”). (“bufferValue”);name ttCustBuf. (“name”). (“bufferValue”);}); Creating a new record in a temp-tablettCustBuf dataset. (“ttCustomer”).bufferCreate(). Populating the fields in a newly created temp-table recordttCustBuf. (“Cust-num”).bufferValue(100);ttCustBuf. (“name”).bufferValue(“frank Hilhorst”);25

The node4progress dataset object(continued) Buffer-copy data into a temp-table bufferdata {“cust-num”: 1180, “name”:”Frank Hilhorst”,”City”:”Miami”};ttBuf dataset. ta); Sending updated dataset as inputvar jsonStr ��dsOrderSchema.p”,jsonStr);26

SummaryProgress offers great productsCombined they provide even more valueThe whole is more than the sum of its partsNode.JS is here to stay and provides greatvalue for Progress partners27

Questions?Questions?28

Visit the Resource Portal Get session details & presentationdownloads Complete a survey Access the latest Progress productliteraturewww.progress.com/exchange2014

Corticon Rules Engine - Rule Sheet - Vocabular 8 2 4 . Detailed technical explanation 14 Detailed explanation of the Architecture. Introduction to Node & Node4Progress 15 About Node Server side javascript engine Lightweight, sc