We learned few basic Typescript concepts in last video series. This time, instead of just talking to you about the concepts, I felt it is better to make use of examples. The intention is to understand how and where these concepts are used. In addition to that, I have added a few tips to the videos. (I got my hands on After Effects 🙂
The video begins with a Github URL that you can leverage to download the code and speed up the project creation step. Most of the configuration that we explored till now is already baked in.
The project contains an HTML page with a simple form having two fields – Name and Job. The intention of this exercise to invoke the API, pass the form information and display a success message. While working on this example, I was a bit concerned about the REST API. I had no intention to increase the complexity of the example by going through the process of building one. Luckily, there is a fantastic site available – https://reqres.in
I realized that most of the time I am just repeating quite a few steps to build this example. For e.g. whenever I used to change HTML or CSS file, I was manually copying it to dist folder. This was definitely
This led to a discovery of
Typescript and Modularity
It is too early to talk about modularity OR
The video ends with successful invocation of REST API and displaying alert message to the user. We learnt quite a few things in this video
- Using tools to speed up build process
- Use dummy REST API to quickly demonstrate UI prototype
- Use browser tools to verify API requests
- And most important how to use Typescript for Web development
Whats coming next???
It is true that for actual projects instead of using plain Typescript programs, we will be making use of frameworks/libries. The series will advance through some of the frameworks like Node JS, Browserify, JQuery etc. So keep a watch.