Posted on 9/5/2017 in Web Development
By Matt Wiseley
In the first part of this blog series, I introduced you to TypeScript and gave you a very quick demo on how to use TypeScript in our regular JQuery projects. Now let’s go a little deeper and discuss some of the pros and cons of using TypeScript in our web projects.
1. Object Oriented Programming Features
TypeScript lets us have interfaces, inheritance, and even more advanced concepts such as Generic types, Decorator types, and Dependency Injection in our scripts.
2. TypeScript Does Not Need a Runtime Plugin
If you remember, a few years ago, the internet "powers that be" decided that having browser plugins is not a very good idea, and technologies like Flash and Silverlight died. Due to this, all modern web technologies translate themselves into standard forms that all major browsers can understand and run. This includes scripting languages, like TypeScript or CoffeeScript, Markup languages, such as Haml or Markdown, and Styling languages like Sass or Less.
3. Back-end Developer Feel More Comfortable With it
4. It is Used in Popular Frameworks
TypeScript has become more and more popular over the last few years. Maybe the best moment of TypeScript popularity was the time when Angular 2 officially switched to TypeScript, which was a win-win situation.
1. Learning Curve
2. Needs Development Tooling
Although visitors’ browsers do not need any plugin to run TypeScript, developers will need special tooling for their editor or IDE to transpile TypeScript. This also includes the editor enhancements to highlight and format TypeScript keywords for you.
I would recommend using Visual Studio if you are on Windows or Mac, and if you want a more agile editor, or if you are on Linux, Visual Studio Code might be a better tool for you.
3. Cannot Easily be Edited by Content Management Systems (CMS)
4. Short Update Cycles
Well, this might be more of a personal opinion! I like it when tools get updated regularly and frequently, but how about a programming language?
TypeScript gets released very frequently, you can track them here. I believe this causes two problems: first, it makes it hard to study the language and you should always keep reading about it. Maybe that’s why there are not good up-to-date TypeScript books out there, because by the time a publication releases a TypeScript book, most probably the next version of TypeScript is already out!
Second, which might be a bigger issue, how should you integrate the updates in your projects? Should you just ignore them for the current project and use them for your next project? Either way, I would say your team should plan a strategy for it.
I love TypeScript! It is modern and neat, packed with scalable OOP features. I would say the fact that Angular developers have officially picked it, is enough for us to know how good it is. Still, each team should evaluate the benefits to see if it suits the project requirements.
Please let us know if you are using TypeScript in your projects, and why. Do you agree with our list of pros and cons? Let’s chat about it!
Contact Us Today!
Learn more about how you can leverage TypeScript or other web technologies to maximize the efficiency of your website!
Optimize Your Website
When people think of long-haul trucking, heavy shipping, or other sectors of the transportation industry, “cutting-edge online experience” may not be [...]
Healthcare websites face a unique balancing act of simultaneously conveying patient comfort and clinical prestige. If it’s done right, a website [...]
Have you ever been writing, designing, or managing a web page and realized you had more information than you knew what to do with?“Nobody will read [...]