Monthly Archives: January 2015

Dong Shin 01.30.2015

  • added lots of debug to Services classes
  • refined Logging App
    • added distinct styling for FATAL, ERROR, WARN, INFO, DEBUG
  • adding more debugging to Login Service.

Phil 1.30.15

8:00 – 5:00 SR

  • Had a scary email from Ronda about the center where our servers live getting shut down sometime in June. I thought we had started this process, but maybe not?
  • Meeting with Ronda at 4:00 on Monday.
  • More Typescript/Angular integration. Today’s results!
  • First, plain old angular HTML:
<!DOCTYPE html>
<head lang="en">
    <meta charset="UTF-8">
<body ng-app="simpleApp">
<div ng-controller="MainCtrl as mc">
    <p>String = {{mc.myString}}</p>

<script src=""></script>
<script src="simple.js"></script>

  • Next, the TypeScript (simple.ts):
/// <reference path="../definitelytyped/angularjs/angular.d.ts" />

class TestClass{

      this.myString = "Hello, TypeScript4";

class AngularMain{
   public doCreate(angular:ng.IAngularStatic, sfn:Function){
      this.myModule = angular.module('simpleApp', []);
      this.myController = this.myModule.controller('MainCtrl', [sfn]);

new AngularMain().doCreate(angular, TestClass);
  • Last, the generated JavaScript code (simple.js):
/// <reference path="../definitelytyped/angularjs/angular.d.ts" />
var TestClass = (function () {
    function TestClass() {
        this.myString = "Hello, TypeScript4";
    return TestClass;
var AngularMain = (function () {
    function AngularMain() {
    AngularMain.prototype.doCreate = function (angular, sfn) {
        this.myModule = angular.module('simpleApp', []);
        this.myController = this.myModule.controller('MainCtrl', [sfn]);
    return AngularMain;
new AngularMain().doCreate(angular, TestClass);

Phil 1.29.15

8:00 – 5:00 SR

  • Deployed swf fix
  • Tried FR webapp again, but login still won’t work. The service can’t be found.
  • Working on using Typescript for our modules, now that we’ve settled on a variant of the Angular Prototype pattern.
  • Had to get the definitely typed angular and jquery ‘libraries’ and put them in their own folder for the
    /// <reference path="../definitelytyped/angularjs/angular.d.ts" />
  • declarations(?) to work.
  • Went back to the angular with typescript video. The key points are really around 15:00 in, where the controllers and factories are built. Sean Hess’s github repository for the demo code is here.

Dong Shin 01.29.2015

  • deployed new FA to fix AddableComboCB errors – done
  • deployed new Funding Request
    • couldn’t login – /FinancialAssistant/login returns 404
  • working on Funding Request
    • added more debug flags for Spring libs, outputs to FinancialAssistant logs
    • added dialog, more detailed messages on login failure
    • adding more debugging to server codes

Dong Shin 01.28.2015

  • deployed new FA/RA
    • AddableComboCB not behaving – fixed
  • working on Funding Request
    • added login field
    • re-arranged Load Funding Request window
  • working on Logging
    • fixed error deleting logs

Phil 1.28.15

8:00 – 3:30 SR

Dong Shin 01.27.2015

  • working on adding Primary Lab PM to FA/RA
    • ALTER TABLE `budget_centers` ADD `primary_lab_pm` VARCHAR(255) NULL DEFAULT NULL AFTER `req_type`;
    • CREATE TABLE IF NOT EXISTS `primary_lab_pms` (
      `name` varchar(255) NOT NULL
      ) ENGINE=InnoDB
    • added Primary Lab PM to FA as AddableComboBox
    • added Primary Lab PM to __view_project_detailed_data for Query Builder – budget_centers_primary_lab_pm
    • added Primary Lab PM to RA

Phil 1.27.15

8:00 – 4:00 SR

  • Working on promoting the dialog and server components to the Novetta libs folder(s)
  • Aaaaaand while working on that I figured I’d make sure that inheritance works with my example server factory class. Turns out the Revealing Module Pattern breaks inheritance because the private functions don’t come along with closure, which surprised me. A google search brings up this post by MetaDuck, which I’m looking at….
  • No luck with that. It’s wierd, I’m just not getting the pointer from angular when I inherit. Giving up for a little while.
  • Moved password dialog to the novetta libs
  • Moved phpConnection to novetta libs
  • Ok, after a long walk to clear my head, I realized that my problems are because factories require a return object. This means that you have to change the first line of the inheritance code to store that return object so that it in turn can be returned to angular:
function QueryServiceFn2($http){
   var retObj =, $http);
   globalU.inheritPrototype(this, QueryServiceFn);
   return retObj;
  • And that works just fine. Going to check that closure works the way that I think it should now. And lo, it does. So here’s a full example of inheriting a factory object:
globalUtils.appMap.phpFactories2 = (function(globalU, base){
   "use strict";
   function QueryServiceFn($http){
      var retObj =, $http);
      globalU.inheritPrototype(this, base);
      return retObj;

      queryServicePtr: QueryServiceFn
})(globalUtils, globalUtils.appMap.phpFactories.queryServicePtr);
  • To override a function, simply declare it normally and then set the pointer in retObj to point at the new version. The only thing to watch out for is that closure won’t hold. If you need access to an item in the base class that’s accessed through closure, you’ll probably have to copy it.

Dong Shin 01.26.2014

  • working on Funding Request App
    • added a flag and a dialog when clearing data, check for any edits
    • fixed a bug in Contract Details – need a copy (deep copy) of the array for independent management

Phil 1.26.14

8:00 – 3:00 SR

  • Looks like the presentation went well. Chris wants a single presentation as well, which should be easy – just add the FY to the title and then make one large slideshow.
  • Hopefully finishing login directive.
    • Added in the factory calls to the http calls. Needed to add an additional then to process the reselts of the password query.
    • Working on a reset password capability – done.
    • Cleaning up CSS.