Thoughts on programming, web development and design.

Circuit Board

Month: November 2017

TOP 5 Reasons for Switching to TypeScript

If you write front-end code, you have built a website using HTML, CSS and JavaScript. JavaScript is popular because it is easy to code and flexible. As your website add more features, you may noticed that your JavaScript gets more difficult to add new code. JavaScript doesn’t scale very well. To deal with this, you may have switched to another framework like Node or Angular JS.

Top 5 Reasons for Switching to TypeScript

TypeScript by Microsoft helps you to write JavaScript that scales. With TypeScript, you can write it and compile it into JavaScript. Your compiled code will run on any browser or JavaScript framework that supports ECMAScript 3 or greater. When you write valid TypeScript, it compiles into valid JavaScript.

Top 5 Reasons for switching to TypeScript

At the Milwaukee .Net Users Group, David Pine explained the 5 reasons why you should switch to TypeScript.

5. Compatibility

TypeScript is compatible to ECMSScript 3 and newer.

4. Tools

You can write TypeScript using popular coding tools like Visual Studio products also support TypeScript.

3. Open Source

TypeScript is open source. It is being developed on GitHub. You can look at the specification on GitHub. You can download the source code and post issues right on GitHub.

2. Type System

You can use types that you use in other programming languages like:

  • Classes
  • Interfaces
  • Abstract Classes
  • Namespaces

1. Compilation

“If it compiles, it is one step closer to working code.” – David Pine

TypeScript compiles into simple, clean JavaScript. Valid TypeScript is also valid JavaScript. With the compiled code, you can run it in any browser.

Want to see TypeScript Compiled into JavaScript?

You can go to Playland and see the TypeScript compiled into JavaScript.

TypeScript Playland Screenshot

JavaScript is every where on the web. As a developer, you have probably used and supported it in your projects. TypeScript helps you to write code using programming features that developers in other languages are used to. It creates compatible, clean JavaScript while allowing you to use the tools that your already have.

Building with a Headless CMS

Have you considered using a headless or decoupled CMS? Most websites are build using a traditional CMS. A traditional CMS gives you a way to store data, a UI to input the data and ways to display the data. You may have used a traditional CMS like Drupal or WordPress to build your website.

Building With A Headless CMS

What is a headless or decoupled CMS? The front end and content management system are separate from each other. Headless and Decoupled as similar but they are not the same. A Headless CMS manages the content and waits for the front end to do something with the content. With a Decoupled CMS, it prepares the content for delivery and figures out how it will present your content to a specific device or environment.

Why use a Headless CMS?

  • You are building a website or app that uses a framework like Angular JS, React or VueJS
  • You want to build a website with a Static Site Generator like Jekyll or Gatsby
  • You are creating a mobile app
  • You are creating content for use in different places

Where can I find a headless CMS for my next project? Headless CMS maintains a list of JAMStack content management systems. Or you can experiment with a static site generator.

What if you want to update your existing CMS to use as headless CMS?

If you are using WordPress, you have the option of using it as a headless CMS. You can use WordPress to store the content and display it using an API.

You are not required to use PHP you can use whatever language you want. JC Hiatt explains how to use react to create a headless WordPress site.

If you don’t want to update WordPress, you can use Cosmic JS. It lets you build your next modern web app with any programming language that you want.

When to use a headless CMS?

It depends on your needs and project. You may want to use a traditional CMS when you don’t have a development team and need a website that is easy to maintain. Use a headless or decoupled CMS when you have a development team and you want to create a custom interface for use with more than a website.

Powered by WordPress & Theme by Anders Norén