Category: Web Development

TPDP Episode #13: The Go Programming Language And Modern Development

March 28, 2017 Nic Raboy

I am pleased to announce that the latest episode of The Polyglot Developer Podcast has been published to all the popular podcasting networks which include, but are not limited to, iTunes and Pocket Casts. In this episode titled, The Go Programming Language and Where it Fits in Modern Development, I am joined by Go advocate, Matt Holt, where we discuss Go as an option to modern development.

In this episode we discuss where Go excels and how it compares to other popular development technologies such as PHP and Node.js.

Read More

Animate HTML Components In An Angular Application

March 24, 2017 Nic Raboy

When building a web application, not only do you need amazing features, but you also need a stunning user experience and that can often be managed by making good use of UI components. When I’m using my favorite web applications, the way components are displayed on the screen are sometimes what makes the application so memorable. Designers will often animate components to make them stand out.

When building a web application you can use CSS keyframe animations, but if you’re using Angular, there is another way. We’re going to see how to use the Angular Animations component to animate UI components on the screen.

Read More

Build A Custom Docker Image For Your Containerized Web Application

March 18, 2017 Nic Raboy

I’ve been working with Docker for a while now and I’ve found that I’m rarely using one of the vanilla images found on Docker Hub. By rarely, I don’t mean never, but in most cases I find that I’m building my own custom Docker image for any web application that I wish to containerize. This allows me to create an image that meets my needs and deploy it anywhere and anytime that I find necessary.

We’re going to see how to build a simple web application and turn it into a Docker image so it is containerized and easily deployable anywhere that Docker Engine is available.

Read More

Bundle HTML, CSS, And JavaScript To Be Served In A Golang Application

March 17, 2017 Nic Raboy

So I’ve been working on a project that uses the Go programming language. The application I’m building is a web application that I plan to distribute. The thing is, I don’t want to distribute hundreds of files to make it possible. The application has an API built with Go and the front-end that consumes the API is built with Angular. This lead me searching for a way to bundle all the files into the final binary.

There are several packages that exist for bundling assets into a Golang application. Popular packages include go-bindata, go-bindata-assetfs, and go.rice. I had the most success with go.rice, so we’re going to explore it in this article.

Read More

JWT Authentication In A Node.js Powered API

March 10, 2017 Nic Raboy

When it comes to API development, there is often a need to protect certain endpoints or rate-limit the API in general. Because you are working with endpoints from clients possibly on a different domain, you can’t authenticate users with sessions and cookies. It would also be a bad idea to pass around a username and password with each request. Typically endpoints are protected with tokens that are passed with each request and these tokens are often JSON Web Tokens (JWT) that work very well.

We’re going to see how to create a very simple API using Node.js with protected endpoints that require a valid JWT in order for requests to succeed.

Read More

JavaScript Libraries In A TypeScript Application, Revisited

March 6, 2017 Nic Raboy

If you haven’t already gotten involved with it, you’ll probably know that TypeScript is becoming increasingly popular. Being able to use a superset of JavaScript in a typed language that compiles down to JavaScript is a great thing. However, if you’ve ever played around with TypeScript and tried to use JavaScript libraries, you’ll probably know that sometimes it can be a real pain. Often JavaScript libraries do not ship with type definitions which are critical when it comes to playing nice with TypeScript.

If you’ve been keeping up with The Polyglot Developer you’ll probably remember two posts that were created. Previously I had written about including external JavaScript libraries in an Angular application as well as adding type definitions to external JavaScript libraries in TypeScript.

We’re going to revisit these two articles and explore all the ways to include JavaScript libraries in TypeScript applications. These include applications built with NativeScript, Ionic, and Angular.

Read More

Upload Files To A Minio Object Storage Cloud With Node.js And Multer

March 5, 2017 Nic Raboy

The recent Amazon S3 outage that took down much of the internet inspired me to talk about alternatives. Not too long ago I wrote about an open source object storage software called Minio and how I was using it on my Raspberry Pi for backups. The great thing about Minio is it shares the same APIs as AWS S3, but can be deployed to your own hardware, eliminating Amazon as a dependency.

This time around I thought it would be great to share how to use Minio as an object storage for a Node.js application that uses the middleware, Multer, for handling file uploads.

Read More