The next step will be learning how to break the large big black boxes down into more focused components that can be easily tested in isolation to each other, and mocked/replaced when used inside of the calling component. This is much better and already feels closer to the comparable process in .NET. The code I am currently working on has a dialog-box, which can be updated – that can be split out into its own component. That includes initialisation, display updates and some button context functionality (once the processing is complete the text on the button changes from “Cancel” to “Close” but the functionality stays the same. These things become easier to test and wrap up a few of the JQuery/Templating calls quite nicely (making them easier to “Mock”). Another area of functionality which could be split out into its own component is the AJAX calls. Similarly, the “timer” based eventing system could be wrapped up as I noticed that there were several “clearInterval(…)” calls spread throughout the code
After all the above refactors have been completed I’m hoping to end up with a single “controller” type object that orchestrates all the newly created components. This should make it far easier to test this controller object and possibly look to finally extract some of the business logic into smaller components too.
Just a note about TypeScript Playground, an online REPL for TypeScript. Been around a while, but really useful for trying out a quick bit of TypeScript.