Showing posts with label TypeScript. Show all posts
Showing posts with label TypeScript. Show all posts

Thursday, August 31, 2017

Where is the link to TypeScript 2.5?


TypeScript 2.5 (the latest) is now available for download here:

http://www.typescriptlang.org/#download-links



TypeScript2.5_0

If you have installed npm, installing TypeScript is a breeze.

> npm install -g typescript

Read here for installing npm:

http://hodentekhelp.blogspot.com/2017/08/what-is-npm-and-how-is-it-useful.html

Thursday, November 10, 2016

What is TypeScript and how different is it from JavaScript?

JavaScript is loosely typed. You can simply declare a varible. Loosely typed language can result in errors sooner or later in compilation. For exmaple if you declare the variable 'AGE', it could be written as an integer (25) or even as a string (twentyfive, twenty-five etc). In a typed language there is no ambiguity, 'AGE' will be declared as a varible of type int (for integer).

TypeScript is strongly (option) typed. TypeScript is Open Source. TypeScript does not enforce strong typing. Let us say you declare a variable 'Age' and later when you use it for first time use, such as age=25; the language takes 'Age' as an integer (a feature called Type Inference). Type Script also has advanced features like interfaces and generics.

The advantage of strongly typed language is that the compiler finds it easy to handle unambiguously resulting in easier maintenance and increased performance.

TypeScript 2.1 is in the process of being released with yet more new features. Check out the following post.

Wednesday, July 27, 2016

Can you code in TypeScript in Visual Studio 2015?

I have Visual Studio 2015 Community and I can say that you can indeed code in TypeScript and Visual Studio 2015 provides support. As you can see from the next image, VS Community 2015, TypeScript 1.8 is installed.



As to what type of templates exist, all you need to do is to create a new project and take a look at the installed templates and look for TypeScript as shown here:

Tuesday, May 24, 2016

How do you get the node.js project templates in Visual Studio 2015?

In a recent post I tried to install Node.js tools that is supposed to help create node.js project types in Visual Studio Community 2015. After installing, I realized that I could not access the node.js templates in Visual Studio. I noted however that the installer version was NTVS 1.1.1 VS2015.msi.

As an after thought I found an easier route to get the node.js support for Visual Studio 2015 Community. This post describes the steps.

After launching Visual Studio 2015 Community ( I have the Update 2, version 14.0.25123.00 Update 2) you can access Extensions and Updates menu item as shown.

NodeJsTools_07.png

Click on the menu item. The Extension and Updates window appears as shown. You need to search for node.js in Visual Studio Gallery. You will find both 1.1 and 1.2 versions.


NodeJSToolsPlug_inVS2015.png

Click Download button for version 2.

The related msi file gets downloaded. The version is


NodeJsTools1point2.png

You may double click the downloaded file to install the plug-in. But first take care of the Apache license.


NodeJsTools_001.png

The extension gets updated as the program installs.


NodeJsTools_001_2.jpg

Once the extension is installed, when you create a New Project... in Visual Studio 2015 Community you should be able to see all the node.js templates as shown in the next image.


NodeJsTools_05.jpg

Monday, May 23, 2016

How can you program IOT controllers using JavaScript?

Arduino boards can be programmed using Arduino software and Intel IOT boards can be programmed using Intel XDK IOT. Using JavaScript to program controllers would be very useful as most browsers are HTMl5 compliant. The Johnny-Five Robotics and IOT program is an interesting option.

Johnny-Five is the JavaScript Robotics & IOT platform released by the Bocoup group. Johnny-Five is maintained by a growing number of talented developers.

What is Bocoup?
Bocoup  is a group that championed the cause of Open tools and Work Flow. They really seems to have people with very varied and diverse talents to tackle web, data, and visualization.

How does Johnny-Five handle the Hello World (or Blink for that matter)?
It looks like 1-2-3 really.

1. Install Node.js(Prefer 4.2.1 LTS)
2. Setup your board
3. Run: npm install johnny-five

What else is needed?

You also need to run the Firmata protocol for the controller board to communicate with the computer.
Interestingly Johnny-Five can handle over 30 different arduino compatible boards from the likes of Raspberry, Intel, Arduino, Sparkfun and many more.

This is very impressive indeed as each of these boards are handled by their vendors like Arduino, Intel and others.

How about non-arduino boards?

There are platform specific IO Plugins (for example, Galileo-IO plugin) .These plugins can speak the language of the platform as they implement Firmata compatible interfaces.

You will be hearing more about Johnny-Five in my blogs, here and here, keep reading....