Javascript News

Syndicate content
Pipes Output
Updated: 2 hours 53 min ago

Setting Minimum Checkout Requirements in WooCommerce

Do, 2014-08-21 20:00

Chances are that you want to set some kind of minimum requirements on your WooCommerce store before your customers checkout. What follows is a guide on how to set these requirements and restrictions, without needing to use any plugins at all:

  • Setting A Minimum Weight Requirement Per Order
  • Setting A Minimum Number Of Products Required Per Order
  • Setting A Minimum Quantity Per Product
  • Setting A Minimum Dollar Amount Per Order
Methods Used In This Article

There is always more than one way of setting minimum requirements in WooCommerce; the results might even be identical. But I consider the methods described below to be the right (or better) way of doing it. Any suggestions on how you accomplish these tasks or further improvements are always welcome and received well.

The following code has been tested in the latest versions available for WordPress (3.9.1) and WooCommerce (2.1.12). We'll be using the dummy data provided for WooCommerce when you install the plugin. The code should go in your theme's functions.php file and is heavily commented so it's easier to follow and/or modify if needed.

We are going to be using the woocommerce_check_cart_items action provided by WooCommerce to run our functions and execute our code. Visit the following link for a complete list of WooCommerce actions and filters, also known as hooks.

Continue reading %Setting Minimum Checkout Requirements in WooCommerce%

JavaScript Animations in AngularJS Applications

Do, 2014-08-21 19:00

AngularJS is a feature-rich framework for creating single-page web applications, bringing all capabilities that one needs for building rich and interactive apps. One of the key features that Angular brings is the support of animations.

We can animate a portion of the application to indicate a change occurring. In my last article I covered the support of CSS animations in Angular applications. In this article, we will see how to leverage JavaScript to animate the AngularJS apps.

In Angular, the only difference between CSS and JavaScript animations is their definition. There is no difference in the way the defined animations are used. To start with, we need to load the ngAnimate module to the root module of our application.

[code language="javascript"] angular.module('coursesApp', ['ngAnimate']); [/code]

The animation events to be handled in the JavaScript animation also remain the same. Following is a list of directives supporting animations and their events for different actions:

Directives Events ng-view
ng-if enter
leave ng-repeat enter
move ng-show
ng-class add

The above listing is the same as the one in the previous article, but doesn’t mention the corresponding CSS classes, as we don’t need them to define JavaScript animations. These events are generated only if the application module loads the ngAnimate module. Now let us see how to animate some of the directives.

Continue reading %JavaScript Animations in AngularJS Applications%

9 Reasons You Should Be Using CodePen

Do, 2014-08-21 18:00

At, they describe themselves as a “playground for the front-end side of the web.” CodePen is great for testing out bugs, collaborating, and finding new inspiration. It works by allowing you to create “pens”, which are sets of HTML, CSS, and Javascript. You can then display those pens on your profile, take feedback, and continue to edit those pens at any time.

Like many live code playgrounds, CodePen lets you learn in an open-source environment, displaying a live preview of the code changes, and even letting you embed your CodePen demos on any web page, like the one below.

See the Pen Full CSS NES by One div (@onediv) on CodePen.

In this article I’ll go beyond those features just mentioned to explain some of the things that I think puts CodePen above its competition, and why you should check it out if you haven’t done so already.

While explaining these features, I’ll also embed some random but cool pens in each section for you to check out.

1. CSS Options

CodePen includes some awesome features to write CSS faster. You can select to include Normalize.css or Reset.css in your CSS by simply clicking a radio button. You can also choose to use -prefix-free or Autoprefixer as well. This way there is no need to take the time to link to an external file (which is also possible, if you wanted to).

What if you aren’t sure about some of your CSS techniques being used? Don’t worry; CodePen has CSSLint integration to search through your CSS code and warn you if there are errors, warnings, poor browser support, etc.

Continue reading %9 Reasons You Should Be Using CodePen%

Neuro Web Design: How to Make Webs and Influence People

Do, 2014-08-21 16:30

In the first part of this short series about Neuro Web Design, we saw how our decision-making behavior is governed by unconscious processing and how our experience is driven by external factors such as social validation, similarity and other interesting human factors.

Now it’s time to see these principles in action.

In this second part, I’ll give you some suggestions on how to make websites persuasive and more inclined to make people ‘click’, or take action in general. Hopefully you’ll find them useful, especially if you have an e-commerce and want to improve your selling.

I’ve broken them into 6 principles you should take into account while planning the marketing strategy to adopt in your website (if you are a seller), or to keep in mind (if you are a buyer).

1) Similarity: a picture is worth a thousand words

The images make up the majority of our thoughts, regardless of the sensory modality in which they are originated, and regardless of whether we think of an object (i.e. a boat) or to the processes related to objects (i.e. a boat trip), words, or symbols.

In short, information conveyed through imagery is remembered much more readily than the written data, and we give it more attention.

Summary: Use a small amount of well-chosen words to describe your product or service, and combine them with attractive and incisive images.

Fear of loss

We are programmed to notice and pay attention to situations that can trigger in us the fear of loss.

In fact, the fear of losing motivates us more than the opportunity to win or gain. Faced with situations of potential loss, our bodies and our unconscious mind are activated faster than the conscious level.

Once explained it, imagine the effect that something like Only two in stock may have on our brain. This is a topic that people who intend to sell their products using an e-commerce service should deepen. In the image below, you can see an example of this practice applied to a website.

Continue reading %Neuro Web Design: How to Make Webs and Influence People%

12 Tools to Help You Buy the Perfect Domain Name

Do, 2014-08-21 16:30

Buying a domain name for that next project of yours can be a tricky endeavor.

Maybe the plot of virtual real estate you’ve had your eye on is already in-use. Or maybe it costs as much as actual real estate on the aftermarket, if it’s even for sale at all! Either way, the experience of sourcing, checking and acquiring can be daunting.

It’s increasingly difficult to find the exact domain you want – unless, that is, you’re willing to get creative by devising brandable monikers, or incorporating unorthodox domain extensions to create “domain hacks.”

In no particular order, here’s a new list of top Domain Name Generators and availability checkers – all of which allow you to find your domain and verify its availability in real time!

Recommended Domain Name Generators DomainsBot

DomainsBot offers a powerhouse of tools: while robust, it may require a bit more knowledge of domain name speculation in general.

When you decide on a root-word, plug it into the search, and out comes a myriad of combinations with the help of synonyms, prefixes, suffixes, and TLD (top level domain) extensions; you can refine results by excluding or adding any of the above. Beyond that, you can filter additional TLDs, choosing to include new gTLD extensions in your search (which can make for some great domain hacks).

Most helpful, you will be shown real-time availability of not just the domain suggestions returned to you, but their corresponding Twitter and Facebook handles to-boot. If something is available for you to hand-register, you can simply click “Available” and up pops a selection of over 20 domain registrars you can choose to buy your domain at. If your choice is available in the aftermarket, it will be listed with its corresponding price and marketplace where you can find it. Solid.

Lean Domain Search

Simply search any word, made-up or real, and it will generate potentially thousands of results – stringing together popular prefixes, suffixes and common words. Sort results alphabetically, by phrase-length, or by popularity. There’s a nifty list hidden on the main results page that shows you the 10,000 most popular search terms by domain registration count – albeit, the source blog post is over two years old.

You can also filter results to have your search term “start” or “end” with the suggested accompaniment, or copy all results to your clipboard. Since only available results show, when you’re ready to select one to register, simply click on its corresponding green box. Three registrars will emerge as choices when buying your domain, and results will also show if a corresponding Twitter handle is available.

One interesting thing I have noticed is that – before choosing a partner registrar – this tool will prompt you to setup a Wordpress account on your new domain. This is undoubtedly due to LeanDomainSearch being acquired by Wordpress’ parent company, Automattic about a year ago.

Continue reading %12 Tools to Help You Buy the Perfect Domain Name%

Stress Testing with

Do, 2014-08-21 14:00

If you are working on a serious project, you want it to scale. The thing about scale is, you only focus on it once you really need it.

I'm the CTO of an soccer/futbol social network based in Brazil. To put it mildly, futbol is big in my country. This summer, we focused our marketing on the World Cup, preparing our application to support as many users as possible. To do that, we had to benchmark and improve, but how could we load test? What tool should we use? Those are just some questions that came up once we started to address this challenge.

This is when we found

Continue reading %Stress Testing with

How Blogging Can Help You Land Your Dream Development Job

Do, 2014-08-21 14:00

There are countless benefits to starting and running your own blog, especially for programmers and IT professionals.

Whether you are wanting to discuss the ins and outs of a technology that only a few thousand (or hundred) people understand, or are looking for a neutral space to brainstorm your next project, blogs offer a perfect combination of flexibility, accessibility and low overhead.

When done right, a blog can also act as a springboard for finding work that challenges you--and pays well.

In this post, we'll be looking at what you can do with a blog to get the attention of hiring managers, recruiters and influencers from top companies and government agencies seeking the best workers in tech.

Continue reading %How Blogging Can Help You Land Your Dream Development Job%

OptionTree – A Theme Options UI Builder for WordPress

Mi, 2014-08-20 20:00

When was the last time you were excited about building an administration panel for your WordPress Theme? Chances are you're still building it by hand, and spending a lot of time on it, too. The goal of this article is to introduce you to OptionTree, a Theme Options UI Building for WordPress.

What OptionTree Will Allow You To Do

OptionTree will allow you to build a powerful Theme Administration page containing all kinds of functionality, from a simple text field, to Date Pickers and file upload fields. It’s also possible to create repeatable fields, tabbed sections, custom galleries, a CSS editor and many more. Think building whole administration options and custom metaboxes for your custom post types and taxonomies in under an hour. This is what OptionTree is all about, it sets at your disposal, a lot of pre-configured options types which you can use on your Themes in minutes, instead of hours.

[caption id="attachment_88293" align="alignnone" width="2508"] OptionTree (source:[/caption] Installing OptionTree On Your Site

There are two possible installation modes when using OptionTree. The first option is Plugin Mode, which is going to be the traditional way WordPress would like you to use plugins. Which means, OptionTree is installed and activated through the Plugins page and upgraded via the WordPress Plugins Directory. The second option is Theme Mode, this is where you include OptionTree somewhere within the directory of your theme and take advantage of the flexibility and control you’ll have over your themes upgrade path.

Continue reading %OptionTree – A Theme Options UI Builder for WordPress%

An Introduction to jQuery’s Shorthand Ajax Methods

Mi, 2014-08-20 19:00

Raise your hand if you've never heard the term Ajax. I’ll bet almost all of you have your arms down, close to their body. Ajax, which originally stood for Asynchronous JavaScript and XML, is one of the most used client-side methodologies, helping to create asynchronous websites and web applications.

Performing Ajax calls using raw JavaScript is of course possible, but dealing with all the different parts of the code can be a pain. This is even more true if you have to support a prehistoric browser like Internet Explorer 6.

Fortunately for us, jQuery provides a set of methods that deal with these issues for us, allowing us to focus on the task we want accomplish with the code. jQuery offers a primary method, called $.ajax(), which is highly configurable to fit whatever need you may have. It also provides a set of [shorthand methods](, called shorthand because they are simply wrappers for the $.ajax() method with a preset configuration, each serving a single purpose.

All except the $.ajax() method have one feature in common: they don’t operate on a set of DOM elements, but are called directly from the jQuery object. So, instead of having a statement like:

[code language="javascript"] $('p').ajax(...); [/code]

which selects all the paragraphs in the page and then calls the ajax() method, we’ll write:

[code language="javascript"] $.ajax(...); [/code]

In this article, we’ll discuss three of the most used jQuery shorthand methods: load(), $.post(), and $.get().


The first method we’ll discuss is load(). It enables us to load data from the server and place the returned data (often HTML code) into the elements matched by the selection. Before seeing it in action, let’s see its signature:

[code language="javascript"] load(url[, data][, callback]) [/code]

The meaning of each parameter is described below:

Continue reading %An Introduction to jQuery’s Shorthand Ajax Methods%

Getting Started with Mobile Angular UI

Mi, 2014-08-20 18:30

AngularJS is one of the many buzz frameworks in mobile and web development. We’ll create an app using Mobile Angular UI, a framework to develop HTML 5 mobile apps that combines AngularJS with Bootstrap. It provides essential mobile components missing in Bootstrap 3 such as switches and overlays etc. It has no dependency on jQuery but instead relies on libraries such as fastclick.js and overthrow.js to achieve a better mobile experience.

Getting Started

A demo of the app we’ll be creating is available on Heroku. The username is and password is sam. Source code is available on GitHub.

In this tutorial, we’ll see how to develop a responsive mobile application using Mobile Angular UI. This tutorial expects the reader to have a basic knowledge of AngularJS and Bootstrap.

Continue reading %Getting Started with Mobile Angular UI%

Understanding the SVG fill-rule Property

Mi, 2014-08-20 18:00

The SVG fill property paints the interior of a graphic with a solid color, gradient, or pattern. Using SVG inline enables full control of such properties on elements throughout the SVG document fragment within HTML.

In most cases what is considered to be the “inside” of a graphic is straightforward. However, when the graphic involves more complex compound paths such as those that intersect or enclosed shapes, what defines the inside of the shape becomes less clear.

The fill-rule property can then be included to further define our intentions for what is to be considered the inside of our complete shape.

This article will review the fill property and then describe the algorithm rules associated with fill-rule. Understanding the reasoning behind these rules can help eliminate any surprises when rendering your graphics in the browser.

The fill Property

Before jumping into fill-rule it’s important to understand the function of the fill property in general.

fill paints the interior of a specific graphical element, and is included within the code of the element to be filled. The interior of a shape is determined by examining all sub-paths and specifications spelled out within the fill-rule, and this space is then painted. “Paint” refers to the action of applying colors, gradients, or patterns to graphics through fill and/or stroke.

When filling a shape or path, fill will paint open paths as if the last point of the path connected with the first, even though a stroke color would not render on this section of the path.

To demonstrate the effect of fill on an open path let’s take a look at two basic SVG polylines:

Continue reading %Understanding the SVG fill-rule Property%

Analyze SitePoint Author Portfolios with Diffbot

Mi, 2014-08-20 17:30

As the managing editor of the PHP channel for SitePoint, I deal with dozens of authors, hundreds of topics and a constantly full inbox. Filtering out inactive authors and pushing the prolific ones to the top of the queue is hard when the channel is this big and a one-man operation, so enlisting the help of bots only makes sense.

I recently started the construction of an in-depth work-analysis tool that helps me with social spread, reviews, activity tracking, personality profiling, language editing and more, hopefully automating a large portion of my work soon, and a key component is author activity. Specifically, tracking how much they publish in any given week, month or season.

Author Profiles

Each SitePoint author has a profile page which lists their bio, their social network links, and their published posts. For example, here’s mine and here’s Peter’s. Each post snippet has the relevant information I need in order to track activity: a date, a title and a URL. By grabbing all of an author’s posts, we can group them by date and extract some statistics.

Granted, the publication time depends on a variety of factors - from my own ability to squeeze reviews into the current work queue, to sponsors and other channel preferences. Still, any insight is good insight, and as my tool helps me automate parts of my workflow, reviews will happen sooner.

That said, how can we fetch this author data reliably?

To API or not to API

The logical approach would be to consume an API. Something like a call to would make the entire task a breeze. Alas, SitePoint has no API and we’re forced to crawl it, unless we have database access (for the purpose of this demo, let’s assume we don’t).

Diffbot to the rescue! We’ve written about Diffbot before, so give our introductory post a read if you haven’t already to get familiar with it. In a nutshell, we’ll use Diffbot to automatically crawl all the pages of an author’s profile, extract the data we need, and get it back in JSON format.

Continue reading %Analyze SitePoint Author Portfolios with Diffbot%

PINQ – querify your datasets – introduction

Mi, 2014-08-20 16:00

You may have heard of LINQ (Language-Integrated Query), a “set of features introduced in Visual Studio 2008 that extends powerful query capabilities to the language syntax of C# and Visual Basic”.

It provides necessary interfaces and syntax to perform various queries on a given dataset so that operations like filtering, sorting, grouping, aggregating, etc can be performed.

PINQ (PHP Integrated Query) is “based off the .NET’s Linq, and unifies querying across arrays/iterators and external data sources, in a single readable and concise fluent API”. (Excerpted from PINQ’s official site)

Why another query language?

PHPers are very much comfortable with executing queries with either raw SQL statements or via ORM. We select the data from a database, process it and display it in a chosen format (say, a table form). If we need another set of data, we issue another statement, process the returned dataset and display it.

In normal cirucumstances, this process is both sufficient and efficient.

But there are cases where this process simply won’t work. Take, for example, a typical e-Commerce website. The user enters one search keyword (say, “router”) and the site displays every matching item. The initial search may only search items with their description, category or tags containing the keyword. Next, the user will start to fine tune the search results by selecting a brand, a price range, etc.

This fine tuning process is called “faceted” search. Some database engines (like SOLR) have this capability built in (as described in this series: Using Solarium for SOLR Search) but obviously MySQL does not come with this functionality.

That does not mean, however, that MySQL can’t provide such features. After all, it is all about constructing a new SQL statement and fetching the data again. This has some disadvantages, however:

  1. The criteria of the SQL statement, i.e., the “where” and/or “group by” part, can get very complicated after SQL construction.
  2. As the SQL statement will be very dynamic, it can’t be optimized and will make indexing more difficult.
  3. It will create a huge overhead when communicating the SQL statement back to the db server.

In these cases, PINQ may come in handy. It is a PHP version of the LINQ library which provides filtering, sorting, grouping, aggregating, and indexing on a given dataset.


In this series of two parts, we will demonstrate how to use PINQ to mimic a “faceted” search. We will use the sample book collection application’s data (see Data Fixtures in Symfony2 on how to dump the sample data) but with some slight modifications.

Also, we will use Silex, a very light-weight PHP framework and Bootstrap CSS to simplify the app setup. Please follow the instructions in their respective websites on how to set up a Silex web app and integrate Bootstrap CSS.

The sample data we used in this demo is slightly modified and I have uploaded to the repo for this demo. The source code can also be found there.

PINQ Installation

The recommended PINQ installation is to modify the composer.json file that comes with Silex and add one more line in its require section:

{ "require": { "silex/silex": "~1.1", "twig/twig": ">=1.8,<2.0-dev", "doctrine/dbal": "2.2.*", "symfony/twig-bridge": "~2.3", "timetoogo/pinq": "~2.0" } }

Continue reading %PINQ – querify your datasets – introduction%

10 Ways to Earn Money from Your Site

Mi, 2014-08-20 14:00

When you are running your own site and you start to see some serious traffic, you'll probably want to earn some money from it.

In this article we'll look at 10 of the most popular ways to make money from your site. In each section I'll list the big players in that specific field, but there are many more opportunities available--Google is your friend.

You'll find that you can mix and match many of these methods. Just be careful that you don't overcrowd your site with ads. And of course you'll need to test to find out what works best for your site.

Let's get started.

Continue reading %10 Ways to Earn Money from Your Site%

Adding a Media Button to the WordPress Content Editor

Di, 2014-08-19 20:00

Inserting a media file into a post with WordPress is not very complicated thanks to the dedicated button present by default. However, if you develop a plugin using media files, this button won't help your users insert the code needed by your functions.

Fortunately, it is possible to add you own media button, so you can make it do whatever you want, properly.

In this tutorial, we will review how to add a media button in the right place, how to open the media window when the user clicks on it and, finally, how to get the selected items in order to insert them simultaneously into both visual and HTML editors.

Add a Media Button

Adding our media button is the first and easiest part. As with customising many things in WordPress, we will use actions to put our button in the right place.

Begin by creating a new function in the dedicated file of your plugin or theme (e.g. functions.php). For this tutorial, I will use a function named add_my_media_button(). Hook your function to the media_buttons action which is, as its name suggests it, the action called when WordPress is displaying the media buttons.

Continue reading %Adding a Media Button to the WordPress Content Editor%

5 Uses for Vertical Media Queries

Di, 2014-08-19 18:30

Media queries are the core technology behind Responsive Web Design yet, despite a plethora of options, few of us dare to venture beyond min-width (and possibly max-width), i.e. [code language="css"] /* mobile-first layout */ .column { width: 100%; } /* tablet layout */ @media (min-width: 50em) { .column { float: left; width: 50%; } } /* desktop layout */ @media (min-width: 75em) { .column { width: 33.33%; } } [/code] Few other media query properties are required for general use:

  • width, height and the device declarations are a little too exacting
  • resolution can be used for high-density Retina screens but the new HTML5 picture element and srcset attribute are more appropriate for image content
  • color and monochrome properties may only be useful when targeting e-readers
  • aural, braille, handheld, projection, tv, scan, grid etc. have specific device use cases
  • aspect-ratio and orientation may only be needed when screens fall outside the standard 4:3 and 16:9 range
View the media query reference on MDN. However, should we show more love for the min-height and max-height properties? If we only consider min-width and/or max-width we may be making life more difficult for those using smaller devices. There are several situations when media query height properties are useful…

Continue reading %5 Uses for Vertical Media Queries%

A Look at Different Sass Architectures

Di, 2014-08-19 18:00

As the size and complexity of a project grows, you require some sort of logic to structure your Sass files. It helps to follow some agreed upon guidelines for creating files and folders when working in large teams and projects. Below is a review of some of the techniques in use today.


Bootstrap’s intention is to be a UI library for web developers to quickly get off the ground. It is logical for them to group all variables in a single file and keep all the mixin logic hidden. Their Sass architecture mimics this idea. Each component gets its own Sass file and there’s a ./_variables.scss file, which allows you to control all the variables involved with your project.

Bootstrap’s Sass architecture is unique in how it lays out its mixins. There’s a ./_mixins.scss file. This file imports all files from a mixins folder, which contains a separate file for every mixin used. Although button styles are defined in ./_buttons.scss, the mixins used for it are imported from ./_mixins.scss. This, in turn, imports the button mixins frommixins/_buttons.scss. Yo Dawg!

In addition to component-level mixins, the mixin folder also contains global mixins such as mixins/_border-radius.scss and mixins/_responsive-visibility.scss. Although bootstrap’s mixins are not overly complex, this architecture is better suited for a project where the mixins are really complex and require that they be broken down into smaller bits. Or in cases where you want to keep that logic hidden from visual styles of components. In conclusion, this architecture works best for Bootstrap but might not work for your sass project.

Here’s how the folder structure looks:

Continue reading %A Look at Different Sass Architectures%

How to Test Your Site Locally with Modern.IE

Di, 2014-08-19 17:20

This article was sponsored by Modern.IE. Thanks for supporting the sponsors that make SitePoint possible!

There’s no shortage of front end tools to help us test the quality of our code. Some examples of these tools are JSHint and JSLint, to test our JavaScript files, the W3C Markup validator, to test that our HTML code is valid and written according to the specifications, and the W3C CSS validator to verify our style sheets, but there are many more.

Recently on SitePoint, we’ve been highlighting another such tool: Microsoft’s Modern.IE. The service includes the ability to scan your website to identify common coding problems and generate a report (also available as a .pdf file). This report contains the result of each test and some recommendations about how to fix or improve it. This way you can ensure your code adheres to the current best practices, performs well, and implements features specifically designed to target Windows 8. All you have to do is to provide the URL of the web page you want to analyze.

Louis Lazaris wrote a great guide to this scan tool in his article Using modern.IE to Identify Common Coding Problems. His article covered live sites. In this tutorial, we’ll look at how you can perform the scan on a project hosted on your machine.

What’s Modern.IE?

Modern.IE is a service that provides a collection of different tools to test our web pages from different points of view and for different purposes. For example, Modern.IE offers several free Windows virtual machines to run any edition of Internet Explorer from a Windows, Mac, or Linux host.

Another feature is a free screenshot automation tool powered by BrowserStack. This tool loads up a given website on a range of mobile and desktop devices and presents captured screenshots in a few minutes. This means you can get screenshots of your website as it would be seen on the Android browser running on Android, on Firefox and Opera running on Windows 8, or even on devices you might not easily have access, to, like an iPhone 4S using mobile Safari.

If you want to know more about this and other features, you can read the articles Quick Browser Screenshot Testing at Modern.IE by Craig Buckler and Browser Testing with Modern.IE by James George.

Now that you have the context, let’s delve into scanning a local project.

Recently on SitePoint, we’ve been highlighting another such tool: Microsoft’s Modern.IE. The service includes the ability to scan your website to identify common coding problems and generate a report (also available as a .pdf file). This report contains the result of each test and some recommendations about how to fix or improve it. This way you can ensure your code adheres to the current best practices, performs well, and implements features specifically designed to target Windows 8. All you have to do is to provide the URL of the web page you want to analyze.

Louis Lazaris wrote a great guide to this scan tool in his article Using modern.IE to Identify Common Coding Problems. But his article was on a live site, in this tutorial we’ll look at how you can perform the scan on a project hosted on your machine.


Modern.IE is a service that provides a collection of different tools to test our web pages from different points of view and for different purposes. For example, Modern.IE offers several free Windows virtual machines to run any edition of Internet Explorer from a Windows, Mac, or Linux host.

Another feature is a free screenshot automation tool powered by BrowserStack. This tool loads up a given website on a range of mobile and desktop devices and presents captured screenshots in a few minutes. This means you can get screenshots of your website as it would be seen on the Android browser running on Android, on Firefox and Opera running on Windows 8, or even on an iPhone 4S using mobile Safari.

If you want to know more about this and other features, you can read the articles Quick Browser Screenshot Testing at Modern.IE by Craig Buckler and Browser Testing with Modern.IE by James George.

Now that you have the context, let’s delve into scanning a local project.

How to analyze a local website Installing the scan tool

The Modern.IE tool to scan a website is available for free on GitHub. To get a copy of the source, you can open the command-line and run the command:

git clone

You can grab a copy, install it and then start scanning your projects locally using a Git client.

Alternatively, you can click on the Download button on the right side of the page as shown in the figure below.

Once you have downloaded the tool, you’ll need to download and install Node.js (version 0.10 or higher). If you already have a version of Node.js installed, well, you’re one step closer to using this tool.

Continue reading %How to Test Your Site Locally with Modern.IE%

You Need to Build Your App for the Millennial User

Di, 2014-08-19 17:00

So you’ve got a new app idea. It’s not just a knockoff of the latest surprise hit. It’s something entirely new that addresses a real problem or fills a void with an elegant solution that no one else has brought to market.

It just might make you a billion dollars and let you fund that manned mission to Titan you’ve been dreaming about.

But to really hit it big with an app, you’ve got to develop it for the right demographic. Who are you going to build it for?

The Audience Your App Depends On

You could build an app for your mom, but you aren’t going to get rich designing innovative apps for her and her friends. The majority of Gen X — and previous generations — has already developed loyalty to the apps that have served them well, and they’re not likely to change.

Design for Millennials instead — a user base that comes to you without all the baggage of the way things used to be done. Millennials have a passion for the progressive and new, and they have values, ideas, and needs that existing apps have not yet addressed.

So, what do Millennials want?
1. Hyper-Focused Specialty Apps

I often wonder whether Facebook — the whole tortured, acquired, labyrinthine monstrosity of it — would succeed if it were released today. Older generations are used to the Swiss Army Knife-style apps with unwieldy feature sets and corkscrews, magnifying glasses, toothpicks, flash drives, compasses, and IFTTT integrations all in one fat package. Everything is included and convenient for nearly any need a user could have.

When you wanted to build a successful app for an older generation, the inclusion of several successful features was a good idea. A proprietary social network like Facebook appeals to the needs of that audience. Just don’t expect Millennials to have anything to do with it. Millennials want hyper-focused apps that do one thing — and only one thing — really well.

[caption id="attachment_87694" align="alignleft" width="200"] Source: Yo[/caption]

Look at Yo, a recent hit among Millennials. If you haven’t tried it, here’s how you use Yo. Open the app. Tap a friend’s name. That friend receives a push notification: “Yo.” That’s it. And it was a huge hit.

Or consider Timehop. Its creators took a modestly successful app (which had formerly just been an email-based service) and made it more successful by removing features.

Timehop collects photos from your social media history and shows you what you were doing on this day one, two, and three years ago. You used to also be able to look at what you were doing one year and a day ago, but then they stripped out the “and a day” feature. If you don’t look at it today, that information is gone until next year.

The experience became fleeting. What happened? Timehop’s share rates increased, and its creators found themselves on a solid growth curve.

The bottom line: Take whatever idea you have, and whittle it down to one key function.

Continue reading %You Need to Build Your App for the Millennial User%

Making Bootstrap a Little More Accessible

Di, 2014-08-19 16:30

Bootstrap and Color Accessibility

Like many front-end developers, I work with Bootstrap often. Sometimes I might need it for a quick proof of concept. Other times I may inherit a larger project which has Bootstrap entrenched in the Web Application. It's versatility and success has meant that you start to see it everywhere -- it is clearly a very useful and popular tool.

However, it was when I was tasked with making a Bootstrap-based Web Application accessible that I ran into a few problems.

As Bootstrap is mainly used for design I evaluated how accessible their base design was for people with visual impairments in terms of the colors.

But first a quick recap. What Is Bootstrap?

Bootstrap is a popular tool for creating front-end websites and web-applications. It contains HTML, CSS, and optional JavaScript extensions which can be added to your website to style and add functionality.

It is estimated that as many as 4.7 million websites, or 1.79% of all websites, use Bootstrap. It is also the number one project on Github with developers encouraged to contribute to the source code.

Bootstrap is quick to set-up, with a large amount of documentation and easy to follow instructions and guides on how to use their front-end framework. The Bootstrap team are continually releasing new versions and updates, and in their they have promoted several accessibility-focussed features in their most recent version release (3).

But how accessible is Bootstrap really? Before we can tackle that, we need to define what we mean What Does Accessibility Mean?

Accessibility has recently gained a lot more momentum as awareness of accessibility issues has steadily grown in the programming community. It is the practice of ensuring your website or web-application can be easily used by people with disabilities.

This can include many different types of impairments with a wide range of severity, however the main four types of disability referred in the Web Content Accessibility Guidelines (WCAG) are:

Continue reading %Making Bootstrap a Little More Accessible%