A high level look at Angular 2

03 September, 2016.

Developed by Google, Angular 2 is the newest version of the popular Single Page Application (SPA) framework. Angular 2 is a step in a new direction compared to previous versions, but has keep all the best characteristics and “lessons learnt” to deliver a fast, fully featured and rich ecosystem. About Angular 2 Angular 2 impacts your whole application, or at the least, a section of it, rather than specific pages. Angular 2 is best suited to new (“greenfield”) development, as it can be relatively…

Continue reading

TypeScript beginners guide

02 October, 2015.

TypeScript is a tool that enables you to write better JavaScript. You may have heard that TypeScript is a superset of JavaScript, but what does that mean? TypeScript is JavaScript. If you know JavaScript already, then you already know TypeScript. You can convert an existing JavaScript file to TypeScript simply by changing the file extension. TypeScript has a very low barrier to entry (you can easily write it using Notepad) and has a small learning curve. TypeScript has a transpiler, called tsc…

Continue reading

Writing AngularJS 1.x with TypeScript

24 September, 2015.

AngularJS 1.x is a front end JavaScript framework that has gained huge traction and popularity in the development community. AngularJS greatly simplifies previously hard tasks like two-way data binding, templating, the MVC design pattern, despendency injection and more. Using TypeScript, we can create more robust and scalable AngularJS code to deliver the ultimate user experience whilst avoiding the traditional spaghetti code nightmare that JavaScript applications can often descend into…

Continue reading

Using ES6 features with TypeScript

18 September, 2015.

TypeScript is a transpiler The TypeScript compiler converts your code from TypeScript, which is a subset of JavaScript, to TypeScript. Compiler vs. Transpiler There is some confusion about the difference between a compiler and a transpiler. A compiler takes your code and turns it into something very different, a whole new language. A good example is with a high level language such as C# or Visual Basic. When you write code and build it, the compiler (either csc.exe C# compiler or vbc.exe Visual…

Continue reading

Getting started with TypeScript

11 September, 2015.

This is the 101 tutorial which describes getting started with TypeScript using either the TypeScript Playground, Node.js or VS Code. At its simplest, TypeScript is a programming language that provides optional static typing for JavaScript. TypeScript is JavaScript. Any valid JavaScript is valid TypeScript. The beauty of TypeScript is that you can define types for your JavaScript variables and functions, and get compile time error checking and error reporting. This tutorial focuses on getting…

Continue reading

TypeScript Tips and Tricks

28 August, 2015.

Automatically compile TypeScript files when using VS Code If you’re writing TypeScript using Visual Studio, your files are automatically compiled when you save (assuming you haven’t turned this off…the feature is found in the Project Properties > TypeScript Build screen). If you don’t use Visual Studio, and instead are using a lightweight IDE such as VS Code or Sublime Text, you don’t get this feature. Manual compilation First things first, how would you normally compile a TypeScript file to…

Continue reading

What I learnt from using TypeScript "for real"

25 May, 2015.

I completed my first commercial Greenfield project using TypeScript over plain old JavaScript throughout, and there were some frustrations along the way. TL;DR TypeScript is awesome, for sure, but there needs to be improvements to tooling to streamline the experience. TypeScript is strongly typed of course, but it doesn’t force you to code in this manner, which can result in shoddy code. Tweaking is required to make bundling work properly. Tooling Frustrations When I started the project, I was…

Continue reading