Wednesday, May 4, 2016

Abstract

opl-small

Launching soon page with focus on the all-star team behind an upcoming design organisation tool called 'Abstract'.

by Rob Hope via One Page Love

Tuesday, May 3, 2016

2016 #ContentMarketing Trends: Insights & Predictions From 19 Experts

The Experts Weigh-In: 19 Content Marketing Predictions For 2016

Wondering, what the top industry experts are predicting for the state of content marketing?

Then wonder no more!

This infographic, courtesy of Express Writers, presents 19 content marketing trends and predictions that (according to experts) are going to dominate in 2016.

by Irfan Ahmad via Digital Information World

Browser Trends May 2016: Firefox Finally Overtakes IE

April brought us a shower of Samsung surprises so can the latest StatCounter browser statistics be similarly exciting?…

Worldwide Desktop & Tablet Browser Statistics, March to April 2016

The following table shows browser usage movements during the past month.

Browser March April change relative
IE (all) 12.54% 12.13% -0.41% -3.30%
IE11 9.40% 9.02% -0.38% -4.00%
IE10 0.80% 0.81% +0.01% +1.30%
IE9 0.87% 0.85% -0.02% -2.30%
IE6/7/8 1.47% 1.45% -0.02% -1.40%
Edge 1.98% 2.10% +0.12% +6.10%
Chrome 56.51% 56.89% +0.38% +0.70%
Firefox 14.29% 14.24% -0.05% -0.30%
Safari 4.17% 4.20% +0.03% +0.70%
iPad Safari 5.25% 5.26% +0.01% +0.20%
Opera 1.87% 1.83% -0.04% -2.10%
Others 3.39% 3.35% -0.04% -1.20%

Continue reading %Browser Trends May 2016: Firefox Finally Overtakes IE%


by Craig Buckler via SitePoint

Exploring Mailgun: The Email Engine for Developers

Quick Tip: Use Background White Noise for Greater Productivity

Vinyl player

In this age of endless information and clutter, productivity Nirvana has been searched for by so many, yet achieved by so few. While there is no ultimate solution that fits everybody, there are various processes and tools which have differing levels of impact for different people.

Noisli is one of these tools. It’s basically a background noise generator that helps you drown out annoying noises and that lets you create your perfect environment for working and relaxing. Noisli allows you to mix different sounds to create your very own sound environment tailored to your personal needs and taste. If you are one of those people who try out some new music playlist or radio station every week, Noisli might cater to your needs. In fact, I wrote this very article while Noisli was playing in the background.

Let’s have a look at its features.

Sounds

Noisli Sounds

Noisli features 13 environment looped sounds and three additional noises (White Noise, Brown Noise, Pink Noise). The fun thing is that you can activate one or more sounds and change the relative volume to create an always different, pleasing sound environment.

Timer

Noisli also offers a Timer function, which you can use to implement time management methods such as the Pomodoro Technique. It’s said to be a more efficient time management approach that cuts down on distraction and prevents burnout.

You can use the Timer to break down work into different sessions, traditionally 25 minutes in length separated by short breaks of five minutes. After four sessions you should take a longer break of 20 to 30 minutes.

Bonus: If you activate the “Fade out” function, the sound will gently stop and fade out at the end of the timer.

Continue reading %Quick Tip: Use Background White Noise for Greater Productivity%


by Elio Qoshi via SitePoint

The Divi Builder Plugin for Any WordPress Theme

As a WordPress user and developer, I can definitely say that I am into frameworks. I like trying out different frameworks and plugins, because it fascinates me as to what I can pull off with WordPress. When you dive deep into it, you can pull off some pretty amazing stuff.

One aspect of WordPress that I’ve felt has always been a little weak is their selection of page builders. WordPress drag and drop page builders range in quality, but most of the time they cause trouble. You try to integrate them, and they either break the theme, or their styles are overridden by the theme itself. There have always seemed to be limitations to WordPress theme page builders.

A theme I have always liked is Divi (I've covered Divi previously on SitePoint), which has its own page builder. I always thought Elegant Themes should create a separate plugin from their page builder. Apparently, they must have read my mind, because they just released their page builder as a plugin.

Advantages

I have a library of specific themes I go to when I need to turn around a project quickly. The problem is that preset themes don’t offer that much flexibility. I can go in and customize a WordPress theme all day long. Just because I can do something doesn’t mean I want to. It can be more cost effective, especially for lower budget or more time sensitive projects, to implement a customizable system for your project.

It Works with Any Theme

You can drop the new page builder plugin into any theme. This means that if you find just the right theme, you can easily customize it. This is especially great for specialty themes that do something specific. You won’t fall victim to trying to hack a theme to make it look how you want it to.

Continue reading %The Divi Builder Plugin for Any WordPress Theme%


by James George via SitePoint

How to Build a Todo App Using React, Redux, and Immutable.js

This article was rewritten on 3rd May, 2016. Comments relating to mistakes in the original article have been removed.

The way React uses components and a one-way data flow makes it ideal for describing the structure of user interfaces, however its tools for working with state are kept deliberately simple; to help remind us that React is just the View in the traditional Model-View-Controller architecture.

There's nothing to stop us from building large applications with just React, but we would quickly discover that to keep our code simple, we'd need to manage our state elsewhere.

Whilst there's no official solution for dealing with application state, there are some libraries that align particularly well with React's paradigm. Today we'll pair React with two such libraries and use them to build a simple application.

Redux

Redux is a tiny library that acts as a container for our application state, by combining ideas from Flux and Elm. We can use Redux to manage any kind of application state, providing we stick to the following guidelines:

  1. Our state is kept in a single store
  2. Changes come from actions not mutations

At the core of a Redux store is a function that takes the current application state and an action and combines them to create a new application state. We call this function a reducer.

Our React components will be responsible for sending actions to our store and in turn our store will tell the components when they need to re-render.

ImmutableJS

Because Redux doesn't allow us to mutate the application state, it can be helpful to enforce this by modeling application state with immutable data structures.

ImmutableJS offers us a number of immutable data structures with mutative interfaces and they're implemented in an efficient way, inspired by the implementations in Clojure and Scala.

Demo

We're going to use React with Redux and ImmutableJS to build a simple todo list that allows us to add todos and toggle them between complete and incomplete.

See the Pen React, Redux & Immutable Todo by SitePoint (@SitePoint) on CodePen.

The code is also available on GitHub.

Setup

We'll get started by creating a project folder and initializing a package.json file with npm init. Then we'll install that dependencies that we're going to need.

npm install --save react react-dom redux react-redux immutable
npm install --save-dev webpack babel-loader babel-preset-es2015 babel-preset-react

We'll be using JSX and ES2015, so we'll compile our code with Babel and we're going to do this as part of the module bundling process with Webpack.

First we'll create our Webpack configuration in webpack.config.js.

module.exports = {
  entry: './src/app.js',
  output: {
    path: __dirname,
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: 'babel',
        query: { presets: [ 'es2015', 'react' ] }
      }
    ]
  }
};

And finally we'll extend our package.json by adding an npm script to compile our code with source maps.

"script": {
  "build": "webpack --debug"
}

We'll need to run npm run build each time we want to compile our code.

React & Components

Before we implement any components, it can be helpful to create some dummy data. This helps us get a feel for what we're going to our components to render.

const dummyTodos = [
  { id: 0, isDone: true,  text: 'make components' },
  { id: 1, isDone: false, text: 'design actions' },
  { id: 2, isDone: false, text: 'implement reducer' },
  { id: 3, isDone: false, text: 'connect components' }
];

For this application, we're only going to need two React components, <Todo /> and <TodoList />.

// src/components.js

import React from 'react';

export function Todo(props) {
  const { todo } = props;
  if(todo.isDone) {
    return <strike>{todo.text}</strike>;
  } else {
    return <span>{todo.text}</span>;
  }
}

export function TodoList(props) {
  const { todos } = props;
  return (
    <div className='todo'>
      <input type='text' placeholder='Add todo' />
      <ul className='todo__list'>
        {todos.map(t => (
          <li key={t.id} className='todo__item'>
            <Todo todo={t} />
          </li>
        ))}
      </ul>
    </div>
  );
}

At this point, we can test these components by creating an index.html file in the project folder and populating it with the following markup. (You can find a simple stylesheet here on GitHub).

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="style.css">
    <title>Immutable Todo</title>
  </head>
  <body>
    <div id="app"></div>
    <script src="bundle.js"></script>
  </body>
</html>

We'll also need an application entry point at src/app.js.

// src/app.js

import React from 'react';
import { render } from 'react-dom';
import { TodoList } from './components';

const dummyTodos = [
  { id: 0, isDone: true,  text: 'make components' },
  { id: 1, isDone: false, text: 'design actions' },
  { id: 2, isDone: false, text: 'implement reducer' },
  { id: 3, isDone: false, text: 'connect components' }
];

render(
  <TodoList todos={dummyTodos} />,
  document.getElementById('app')
);

Compile the code with npm run build, then navigate your browser to the index.html file and make sure that it's working.

Redux & ImmutableJS

Now that we're happy with the user interface, we can start to think about the state behind it. Our dummy data is a great place to start from and we can easily translate it into ImmutableJS collections.

import { List, Map } from 'immutable';

const dummyTodos = List([
  Map({ id: 0, isDone: true,  text: 'make components' }),
  Map({ id: 1, isDone: false, text: 'design actions' }),
  Map({ id: 2, isDone: false, text: 'implement reducer' }),
  Map({ id: 3, isDone: false, text: 'connect components' })
]);

ImmutableJS maps don't work in the same way as JavaScript's objects, so we'll need to make some slight tweaks to our components. Anywhere there was a property access before (e.g. todo.id) needs to become a method call instead (todo.get('id')).

Continue reading %How to Build a Todo App Using React, Redux, and Immutable.js%


by Dan Prince via SitePoint