Why I love Typescript

I’m an object oriented programmer.

Strange sentence. What does that mean? Most people will think I create programs in object oriented languages, like C# (which I do). But there is a deeper meaning in this sentence. I think objects. I think instances. I think properties and methods and getters and setters and inheritance and all those nice things that you can read in books about object oriented languages.

Later in my career I began to realize that object orientation is something that I have done all my working life. Even when programming in Clipper, back in the day, I was thinking objects. I couldn’t simply create an entry form for an administrative application. No, I needed to create a screen designer, having objects (e.g. fields + labels) on the form, linked to database fields which would get their own content. Of course, quite difficult to do in an environment like Clipper, but you would end up with a very versatile and clean application.

From Smalltalk and Delphi (Pascal) I ended up using C# and .Net. That’s been my playing field for the last 8 year or so and it suits me very well. The language constructs simply fit me like a glove and I can create just about anything that pops into my head in a clean and proper way.

But, the modern days demand that you create web applications. Let’s not go into if that’s a good or a bad thing: it’s a fact of live. And with web applications you have to have Javascript. There’s no getting around it. It’s the thing that drives 99% of the applications in your browser and if you want to make any impact as a software developer you’ll have to touch it. I know there’s MVC and a bunch of other technologies out there, but Javascript is important to the WWW-world. There is no getting around it (there, I said it twice).

I couldn’t. I hated it. I got itches when I saw it. I drove me nuts and made me very grumpy. I once spoke the legendary words: “If ever I will create Javascript in my professional career I will stop and go start sell curries”. You need to know I love curries, so that wouldn’t be a bad career decision for me. But you get the idea: I would rather eat my hat than create a Javascript app. Whenever somebody speaks the words: “I created this Javascript object”, there’s always this monkey with me that yells: “No, it is not, it is a variable, it’s a string, it’s nothing!”. I’ve grown up a bit, but I’m still not selling curries as a living.

But then came Typescript. This guy Anders Hejlsberg is something else, right? I mean: Delphi, C#, Typescript. I can see the analogy to my own career here…¬†Typescript completely changed my view on the web world. Where previously I struggled (as in the Clipper days) to put my ideas into the computer through Javascript, Typescript saved my day. From the day I started using and thinking Typescript all of a sudden I could create a Javascript app. As long as I had this tool (Typescript) that I could use to have it translate my object oriented thinking into the Javascript world of variables, string, functions and evals. And Microsoft is still working on improving the support in Visual Studio for it. Let us pray it will never go away again. I would never, ever think of renaming a variable in a big Javascript app. With Typescript and the support in Visual Studio it is as easy as Ctrl+R, Ctrl+R.

I don’t want to over-exaggerate, but I think Typescript saved my life. Where previously I stayed in the typed and compiled world of desktop apps using the wonderful MVVM concepts, I could now embark in the Wonderful World Wide Web. Typescript made me do it and above all, brought back the joy in creating a web front end for an application.

So, there you have it. I love Typescript because I think and breath objects. Typescript enables me to create web apps. Nothing more, but certainly nothing less.

About Author: Bart Roozendaal

Leave a Reply