Search This Blog

Monday, April 27, 2020

turbitron - an app for excursions

turbitron is an iOS app in the making.
It's an app for team excursions.

Here's the dev website:

Thursday, January 26, 2017

Study of an AngularJS application: Feeding Excel based data into an SVG Flowchart with AngularJS and NodeJS

Reference article
Implementing a Flowchart with SVG and AngularJS
Source code from original article is here.
Customization goals
a) Feed the SVG flowchart nodes from excel datasheet
b) Understand a bit of the AngularJS and NodeJS client-server communication
c) Learn javascript debugging on server side as well as client side using VS Code editor
As a beginner to AngularJS-NodeJS, the customization is based on a partial study of the original article.

Most challenging challenge as a dummy
There was a space of time when I thought I was publishing the server side JSON data to the same URL as the front-end html page. And then trying to debug it and not knowing why: in one case the data was coming from the server side only, while in the other case it was coming from mocked data on client side. Kept on looking for whether data was getting lost, or did I need routing. There were debug sessions where both server side and client side individually appeared working correctly.
Some days later I realized I needed to consume server response data from different URL (it had to be different than URL of Index HTML page being viewed from browser).
Application environment
a) OS: Windows 10 desktop
b) Code editor: Visual Studio Code
c) Server-side: NodeJS + ExpressJS
d) Client-side: AngularJS, SVG, JSON
e) Application Data source: Excel
f) Server Data-publish format: JSON

Snaps of the working application
1. Start the node server from the terminal:
server is ready and starts listening on configured port:

2. Launch a browser and navigate to the application’s configured URL:
a 2-paned application opens up with the left pane showing the json data and the right pane showing the SVG nodes read from excel sheet:
the nodes can be rearranged by mouse drag and drop:

3. Delete one of the nodes from the feeder excel sheet:
refresh the browser and see the updated nodes – no server restart required:

4. Check the logs and see that only the server side logging done is visible:

When can we see the client side logs?
Client side debugging is possible using VS Code editor. Some configurations are required – please refer the launch.json file from the customized application code base.
Also required is a VS Code extension - Debugger for Chrome:
as well as the remote debugging port setting while launching Chrome:

Saturday, January 16, 2016

Code share - Test Run Summary Table with collapsible point of failure details

Video is here.

Code is here:

File: myscript1.js

function repeatTest($scope) {
  $scope.tests = [
    {testName: "Test1", overallResult: "Pass", firstError: "-", lastError: "-"},
    {testName: "Test2", overallResult: "Fail", firstError: "Page not found", lastError: "Page not found"},
    {testName: "Test3", overallResult: "Fail", firstError: "Could not select value in combobox - EmpAgeRange", lastError: "Could not find editbox - EmpAddressLine2"}

File: index.html

<!DOCTYPE html>

    <script src=""></script>
    <link rel="stylesheet" href="style.css" />
    <script src="myscript1.js"></script>


  <body ng-app="">
    <h1>Test Run Summary</h1>
    <div ng-controller="repeatTest">
        <thead style="background-color: lightgray;">
            <td style="width: 30px;"></td>
            <td>Test Name</td>
            <td>Overall Result</td>
          <td>Point of Failure</td>
          <tr ng-repeat-start="test in tests">
              <button ng-if="test.expanded" ng-click="test.expanded = false">-</button>
              <button ng-if="!test.expanded" ng-click="test.expanded = true">+</button>
          <tr ng-if="test.expanded">
          <td />
          <td />
          <td />
            <td colspan="1">First Error: <br>{{test.firstError}}</td>
          <tr ng-if="test.expanded" ng-repeat-end="">
          <td />
          <td />
          <td />
            <td colspan="1">Last Error: <br>{{test.lastError}}</td>

Monday, March 16, 2015

Multi XSD XML Validation


This program validates XMLs against referenced XSDs.

The XSDs are assumed to be external to (not embedded in) the XML.

List the XSDs and XMLs details in separate sheets in the program’s excel book and run the program.

The program will generate errors/ warnings in console window.

Thursday, November 20, 2014

Monday, November 10, 2014

Two-way XML Diffgram (XML structure sensitive)


With pretty printed source XMLs:


Same source XMLs, but in single line – diffgram output remains the same:


Download the program files from here.