Blog

JavaScript articles

Exploring ECMAScript 6 - Array manipulation

Posted: Saturday 6th February, 2016 - 6:38pm
Author: James Griffiths

ECMAScript 6, commonly referred to as ES6, is the latest ECMAScript language specification that defines the standards for implementing JavaScript in web browsers. ES6brings with it lots of powerful new features that provide developers with more flexibility than ever when crafting their applications.

In the following article we're going to take a look at manipulating arrays in ES6.

Read more...

Remove an item from a JavaScript array by value

Posted: Monday 1st February, 2016 - 6:35pm
Author: James Griffiths

No matter how much you work with a given tool there will always be those 'aha' moments when you learn something new that you didn't realise was possible before.

One of those 'aha' moments was when we discovered the filter method in JavaScript.

Read more...

Using the revealing prototype pattern in JavaScript

Posted: Saturday 30th January, 2016 - 6:28pm
Author: James Griffiths

When developing applications with JavaScript you quickly realise the need to architect and structure your code in a way that's modular, scalable and efficient.

Due to JavaScript's flexibility there are many ways this could be achieved; some better than others.

In this article we're going to take a look at how this could be achieved using the revealing prototype pattern and discuss the benefits and drawbacks of this particular design pattern...

Read more...

Generating JSON objects dynamically in JavaScript

Posted: Saturday 26th September, 2015 - 10:09pm
Author: James Griffiths

Working with JSON provides front-end developers with many advantages over other data formats, least of which is the fact that it's a subset of the JavaScript language itself.

In this short tutorial we'll take you through dynamically generating a JSON object within JavaScript...

Read more...

Understanding the JavaScript revealing module pattern

Posted: Saturday 12th September, 2015 - 9:59pm
Author: James Griffiths

As our JavaScript applications start to become more complex and demanding it makes sense to turn towards using specific design patterns as a way of managing those needs. In this particular article we're going to take a look at one particular design pattern: the revealing module.

Read more...

JavaScript namespacing and modules

Posted: Saturday 12th September, 2015 - 9:52pm
Author: James Griffiths

As JavaScript has, at the current time of writing, no native support for namespaces we, as developers, have to implement our own approaches/solutions to avoid polluting the global namespace with objects/methods and variables that might conflict with/overwrite one another if we are not careful.

In this article we take you through using namespaces and modules to better manage your code.

Read more...

Measuring Javascript performance and debugging with browser inspector tools

Posted: Friday 4th September, 2015 - 10:11am
Author: James Griffiths

As JavaScript has become a central pillar of front-end web development, thanks to modern browser support, the tools we need to measure how our scripts are performing have become increasingly important.

In this article we're going to take a look at some of these tools that are available directly within the Google Chrome browser...

Read more...

Resolving CORS issues with Ajax requests

Posted: Sunday 26th July, 2015 - 6:41pm
Author: James Griffiths

Ajax makes life as a web developer a lot easier, particularly when used with a framework such as jQuery but, like all development related technologies, there will always be gotchas that can catch you unawares.

One of those is CORS...

Read more...

Using Google Maps in Angular JS

Posted: Tuesday 10th March, 2015 - 8:27pm
Author: James Griffiths

Angular JS, once you switch from a jQuery mindset, makes building out web apps relatively quick and thanks to the growing number of available plug-ins you can be sure to find a solution to fit your development needs.

One such need might involve implementing Google Maps which is what we are going to look at through this tutorial.

Read more...

Scrolling to a page anchor in Ionic Framework

Posted: Tuesday 17th February, 2015 - 8:03pm
Author: James Griffiths

If you've been working with the Ionic Framework you'll be familiar with setting up AngularJS routes for your controllers and view templates which are then triggered with hyperlinks used within your App. The combination of Ionic and AngularJS makes this easy to implement but when it comes to scrolling to a particular anchor inside a view template things get a little trickier.

Read more...

Documenting JavaScript with YUIDoc

Posted: Saturday 16th August, 2014 - 8:23pm
Author: James Griffiths

You either love it or you loathe it but as developers we all need to do it: documenting our code.

Given the ever increasing need for more complex JavaScript apps the ability to quickly understand what is going on (and more importantly, why) in the scripts we use can be helped along with the right kind of documentation.

Enter YUIDoc...

Read more...

JavaScript development in the browser console

Posted: Sunday 10th August, 2014 - 8:10pm
Author: James Griffiths

One of the great things about modern website development is the range of tools available to developers and nowhere is this truer than within modern website browsers. In fact, one of the most powerful and often under-utilised tools is that of the browser console.

Read more...

Handling floating point numbers in JavaScript

Posted: Saturday 2nd August, 2014 - 10:54pm
Author: James Griffiths

If you've been working with JavaScript for some time you're probably familiar with data type conversions and number formatting. Standard run-of-the-mill tasks for sure but things can get quite interesting when you start to play with floating point numbers...

Read more...

Browser data storage options for the front-end developer

Posted: Saturday 28th June, 2014 - 9:38pm
Author: James Griffiths

With universal support in modern browsers for HTML5 related technologies such as Local Storage front-end developers now have more options than ever when it comes to client-side data storage. In this article we're going to take a look at what those options are and how they stack up.

Read more...

Fixing the mobile header height in jQuery Mobile for iOS7

Posted: Tuesday 3rd June, 2014 - 9:32pm
Author: James Griffiths

If you're developing Phonegap applications with jQuery Mobile for devices running iOS7 then you're probably going to experience some issues with the placement of items within the application header. As Apple have changed how the header behaves in iOS7 you'll need to make some adjustments in your code to accommodate this.

Read more...
Page 1 of 2
Top