Use Grunt To Lint And Uglify Your JavaScript Project

December 17, 2014 Nic Raboy

JavaScript is a forgiving language unlike Java or C#. Because of this, we can’t always trust that our code is correct. I don’t mean that the logic may not be correct, I’m talking about syntax and structure.

Lint via Wikipedia:

…modern lint checkers are often used to find code that doesn’t correspond to certain style guidelines. They can also be used as simple debuggers for common errors, or hard to find errors such as heisenbugs

In addition to needing to lint your code for errors, you may also consider compressing and obfuscating your source code. This can be done through the process of uglification or minification.

Minification via Wikipedia:

Minification (also minimisation or minimization), in computer programming languages and especially JavaScript, is the process of removing all unnecessary characters from source code without changing its functionality.

Linting and minification are two tasks that can easily be run with a task runner such as Grunt or Gulp. In this example, I’ll be demonstrating how to use Grunt to run these tasks.

Read More

Force HTTPS On All Pages Of Your WordPress Site

December 15, 2014 Nic Raboy

Because of popular request, I decided to make my entire WordPress blog secured behind an HTTPS connection. In addition to requests, I also read that search engines such as Google reward site owners that have complete sites behind HTTPS.

In a previous post I made, I explained how to generate and install an SSL certificate to an Apache web server, but things are a little different in terms of WordPress.

Read More

Understanding Tabs In Ionic Framework

December 12, 2014 Andrew McGivery

A very popular pattern on all mobile platforms is the tabbed interface. This interface is especially popular on iOS where it is encouraged by Apple’s design language over a side menu. It has the advantage that the user can see all of the options available to them whereas a side menu’s options are hidden by design.

Ionic has a very simple tabs directive allowing you to implement these kind of interfaces with lots of options for different styles (icons only, text only, text and icon). In this tutorial, we’ll take a look at the ionic-starter-tabs project on GitHub and break it down piece by piece to get a good understanding of how it works.

Read More

Debugging Your Android Source Code With ADB

December 11, 2014 Nic Raboy

Debugging your source code is a critical part of any application development process and Android is no exception.

A lot of people post comments or email me asking me to help them with their application that isn’t working. The first thing I try to ask for are the log files. I do this because 90% of the time, the log files have an error message that tells us exactly what line the error is on.

Read More

Open Dynamic Links Using The Cordova InAppBrowser

December 8, 2014 Nic Raboy

Previously I had written a post regarding how to use the Apache Cordova InAppBrowser plugin to launch external URLs in an Ionic Framework application. This previous post was basic and was only enough to get you started.

Since then, I’ve been asked a few times how to use the InAppBrowser as the default method to launching URLs. More specifically, URLs that have been created dynamically by users.

Read More

Using Nested States With The AngularJS UI-Router

December 6, 2014 Nic Raboy

When coding, it is good practice to reduce duplicating your code as much as possible. When you build a website, multiple pages may be grouped with specific layouts that are used any number of times. You don’t want to duplicate your layout code across these pages.

A common thing to do in web design is to use templating. This exists similarly across many web languages, but in this example I’m going to demonstrate how to do this with AngularJS and the UI-Router extension.

Read More

Use ngStorage For All Your AngularJS Local Storage Needs

December 2, 2014 Nic Raboy

I’ve been doing a lot of work with AngularJS lately, and in particular Ionic Framework. However, up until recently I have been using either HTML5 local storage or SQLite.

Now I’ve switched gears and started using the AngularJS module ngStorage which has made my life a lot easier.

Read More