Build A Time-Based One-Time Password Manager With Ionic 2

A few years back I created an Android and iOS application called OTP Safe that managed time-based one-time passwords.  This application was made with the first version of Ionic Framework and at the time was great because it accomplished more than the Google Authenticator application.  Now that Ionic 2 is approaching stable release, it seemed like a cool idea to take this one-time password application and build it with the latest and greatest including Angular 2.

We're going to see how to create an iOS and Android time-based one-time password manager using Ionic 2, Angular 2, and TypeScript.

Three Simple Ways To Get Online With A Raspberry Pi Zero IoT Device

As you know from the guides that I put out, I’m a Raspberry Pi collector.  I collect the full size units as well as the Pi Zero units.  In a previous post I explained how to emulate ethernet over a USB as a way to connect to a Pi Zero that is not using WiFi or ethernet.  However, what happens when you decide you’re at a point where you’d like to bring your Pi Zero online?

I’m going to show you three quick, easy, and cheap ways to get WiFi internet on your Raspberry Pi Zero IoT device, none of which will require any soldering or advanced hardware knowledge.

(more…)

Test Amazon Alexa Skills Offline With Mocha And Chai For Node.js

By now you’re probably aware that I’m all about Amazon Alexa skills since I’m a proud owner of an Amazon Echo.  I had released a Alexa skill called BART Control and published a guide on creating a simple skill with Node.js and Lambda.  If you went through my Node.js and Lambda guide you probably found it pretty painful to test the skill you were working on.  The constant building and uploading to Lambda could easily get out of control.  What if I told you there was a much simpler way that could save you a ton of time?

We’re going to take a look at adding test cases for testing an Alexa skill offline without ever having to upload the skill to Lambda.

(more…)

Unit Testing A NativeScript Angular 2 Android And iOS Mobile Application

Writing tests is a very important part of mobile application development, but not everyone does it.  It could be laziness, it could be because you don’t know how.  I fall into the category that I’m often too lazy to write tests.  I don’t have time to write tests, I just want my application done.  That is probably not a good answer.  Unit testing will lead to overall better applications with less problems down the road.

Not too long ago, Ben Elliot wrote a guest post on The Polyglot Developer regarding unit testing a NativeScript mobile application.  The thing is, that this was directed towards vanilla NativeScript.  While vanilla is a very valid option when it comes to NativeScript, I prefer using Angular 2 which is a bit different.

We’re going to see how to write unit tests for a NativeScript Android and iOS applications that use Angular 2 and TypeScript.

(more…)

TPDP Episode #8: Asynchronous and Event-Based Programming with RxJS

When it comes to modern JavaScript development, there are a few different ways to handle asynchronous events or data.  You could use promises and callbacks, but as great as they are, present certain limitations.  This is where RxJS comes into play with its reactive programming model.  In this episode of The Polyglot Developer Podcast, guest speaker Ben Lesh and I discuss RxJS and where it fits in modern JavaScript development, whether it be server-side or front-end.

Ben Lesh is a senior software engineer at the very popular entertainment streaming company, Netflix.  One of Ben’s projects at Netflix includes the development and maintenance of RxJS since it is heavily used by the company.  In the eighth episode, Asynchronous and Event-Based Programming with RxJS we discuss everything from what is RxJS, how it was inspired, who is using it, and why you should use it over a few of the alternative methods.  If you’ve ever heard of RxJava or Rx.NET, these projects share some similarities to RxJS.

(more…)

Create An Amazon Alexa Skill Using Node.js And AWS Lambda

Recently I published my first skill for Amazon’s Alexa voice service called, BART Control.  This skill used a variety of technologies and public APIs to become useful.  In specific, I developed the skill with Node.js and the AWS Lambda service.  However, what I mentioned is only a high level of what was done to make the Amazon Alexa skill possible.  What must be done to get a functional skill that works on Amazon Alexa powered devices?

We’re going to see how to create a simple Amazon Alexa skill using Node.js and Lambda that works on various Alexa powered devices such as the Amazon Echo.

(more…)

Converting Your Ionic Framework 1 Application To Ionic 2

Ionic Framework has been around for a few years now and has completely changed the way people develop hybrid mobile applications.  With Angular 2 and Ionic 2 nearing stable release, the Ionic 1 and AngularJS predecessor will be a thing of the past and forgotten.  What if you've gone all in with the first version of Ionic Framework, how do you convert to the latest and greatest?

We're going to see how to take a simple Ionic Framework application and convert it to Ionic 2.  While there will be similarities, the process is manual, but better in the long run.

Use Mozilla’s LocalForage For Key-Value Storage In Ionic 2

When it comes to saving data in an Ionic 2 mobile application, there are many ways to get the job done.  You can use the classic HTML5 local storage, but run the risk of compatibility problems between all available devices.  You can use SQLite, which is part of Ionic Native, but that will only work for Android and iOS and has more of a mobile API.  You can also use SqlStorage, but that is a very proprietary solution.  This brings us to localForage from Mozilla.

Mozilla advertises localForage as a wrapper to IndexedDB, WebSQL and localStorage which will offer maximum compatibility across the grid.

We’re going to see how to include localForage in our application which is a valid option for Ionic 2.

(more…)

Using Couchbase Server In A GoLang Web Application

Not too long ago I wrote an article regarding how to create a RESTful API using the Go programming language, but in it I only used mock data rather than an actual database.  What happens if we want to use a database with GoLang?  What database, or more importantly, what kind of database should be used?  Most APIs transfer data in JSON format, so it might make sense to store data in the same format.  This means that a relational database might not make sense.  Instead, NoSQL databases fit quite well when it comes to RESTful APIs.  A popular NoSQL database that stores data in JSON format is the open source Couchbase Server.

We’re going to take a look at how to include Couchbase Server into our RESTful web application written in the Go programming language.

(more…)

Using SqlStorage Instead Of SQLite In An Ionic 2 App

When it comes to Ionic 2 there are many ways that you can store your data.  For example you could use HTML5 local storage, Mozilla’s localForage library, or Ionic’s SQLite extension that is part of Ionic Native.  With these options available, I get a lot of requests for information on Ionic’s less advertised SqlStorage option.

We’re going to take a look at using SqlStorage in an Android and iOS application rather than the SQLite alternative.

(more…)