Thursday, October 04, 2012

TypeScript brings types to Javascript

One of the things that I generally get frustrated with when I have to code in Javascript is the lack of safety that strongly typed languages such as Delphi bring to the table. Most of the tools, while they offer basic language helpers, do not do much about the structure of your javascript application. There is no "code insight" for Javascript function least not for MY code.

One of the latest offerings from Microsoft, as presented by Anders Hejlsberg, is TypeScript. It appears to me that TypeScript is a game changer in the world of Javascript development.

TypeScript is an extension to Javascript. Everything you can do in Javascript, you can also do in TypeScript. TypeScript "compiles" to Javascript, so there is no special plugins that need to be deployed. Its all about adding the missing "type" and providing code gen helpers to make your code cleaner and easier to understand. Its all about adding that little bit more information that will make your (Javascript) applications much easier to maintain.

Looking over what TypeScript does, it makes sense. Its simple enough that it shouldn't take long to learn to apply.

If you do any Javascript development, take a look at TypeScript.

Wednesday, September 05, 2012

Metro Icons for Delphi XE3

In playing around with Delphi XE3 and the new Metro UI wizards, I found I needed a few icons to explore with. After a little searching, I discovered a gem in the free utility MetroStudio.

This application allows you to quickly create Metro-ized icons from either a collection of over 1400 symbols, or even a symbol from a font installed on your machine.
For example, the lightning bolt can be used as a tile:
or as a tool bar image:

I haven't gotten that far into it yet, but another thing I find missing for the FireMonkey version that appears to be an oversight is the lack of a flow layout panel that flows from top to bottom, left to right. The default flow layout panel flows left to right or right to left. Unfortunately this makes laying out a metro style application a manual process, and doesn't easily allow for the addition of dynamic content which would flow appropriately based on screen dimensions.