Friday, October 16, 2015

Keep Up to Date With the Latest Trends in Mobile Marketing - #infographic

Keep Up to Date With the Latest Trends in Mobile Marketing - #infographic

Mobile marketing spending will pass $100 billion in 2016 to account for over half of all digital advertising, predicts eMarketer. By 2019, this figure is projected to nearly double to over $195 billion. Mobile device use in the United States and China is driving this growth, with the global smartphone population set to reach 2 billion smartphone users next year, while tablet users will pass 1 billion this year.

The growing demand is changing and reshaping everything from how websites are designed to how payments are processed. To run an effective promotional campaign in today's economy, it's imperative to keep up to date with the latest trends in mobile marketing, such as the following:

by Irfan Ahmad via Digital Information World

Smartcrop.js – Content Aware Image Cropping

Smartcrop.js is a javascript library implementing content aware image cropping. Smartcrop.js implements an algorithm to find good crops for images.


by via jQuery-Plugins.net RSS Feed

A Beginner’s Guide to Currying in Functional JavaScript

If you’ve come across the term currying before, but never knew what it meant, you can be forgiven for thinking of it as some exotic, spicy technique that you didn’t need to bother about. But currying is actually a very simple concept, and it addresses some familiar problems when dealing with function arguments, while opening up a range of flexible options for the developer.

One of the advantages touted for functional JavaScript is shorter, tighter code that gets right to the point in the fewest lines possible, and with less repetition. Sometimes this can come at the expense of readability. Until you’re familiar with the way the functional JavaScript works, code written in this way can be harder to read.

Currying, or partial application, is one of the functional techniques that can sound confusing to people familiar with more traditional ways of writing JavaScript. But when applied properly, it can actually make your functional JavaScript more readable.

What Is Currying?

[author_more]

Briefly, currying is a way of constructing functions that allows partial application of a function’s arguments. What this means is that you can pass all of the arguments a function is expecting and get the result, or pass a subset of those arguments and get a function back that’s waiting for the rest of the arguments. It really is that simple.

Currying is elemental in languages such as Haskell and Scala, which are built around functional concepts. JavaScript has functional capabilities, but currying isn’t built in by default (at least not in current versions of the language). But we already know some functional tricks, and we can make currying work for us in JavaScript, too.

To give you a sense of how this could work, let’s create our first curried function in JavaScript, using familiar syntax to build up the currying functionality that we want. As an example, let’s imagine a function that greets somebody by name. We all know how to create a simple greet function that takes a name and a greeting, and logs the greeting with the name to the console:

var greet = function(greeting, name) {
  console.log(greeting + ", " + name);
};
greet("Hello", "Heidi"); //"Hello, Heidi"

This function requires both the name and the greeting to be passed as arguments in order to work properly. But we could rewrite this function using simple nested currying, so that the basic function only requires a greeting, and it returns another function that takes the name of the person we want to greet.

Our First Curry

var greetCurried = function(greeting) {
  return function(name) {
    console.log(greeting + ", " + name);
  };
};

This tiny adjustment to the way we wrote the function lets us create a new function for any type of greeting, and pass that new function the name of the person that we want to greet:

var greetHello = greetCurried("Hello");
greetHello("Heidi"); //"Hello, Heidi"
greetHello("Eddie"); //"Hello, Eddie"

We can also call the original curried function directly, just by passing each of the parameters in a separate set of parentheses, one right after the other:

greetCurried("Hi there")("Howard"); //"Hi there, Howard"

Why not try this out in your browser?

JS Bin on jsbin.com

Continue reading %A Beginner’s Guide to Currying in Functional JavaScript%


by M. David Green via SitePoint

Sourcehunt: Hacktoberfest 2015 Edition – Hack to Glory

We love open source. In fact, it’s almost exclusively what we write about. But using the outreach we have for drawing attention only to our own work wouldn’t be fair - so we decided to try something new with this post / series, and just in time for #hacktober!

Ascii pumpkin

Sourcehunt

Much like the great guys and gals at DigitalOcean have their Hacktober open source drive, and Facebook has theirs, our sourcehunt posts will be a new monthly type of article, listing open source projects that could use some extra contributors. In this post, we’ll mostly be focusing on less known projects, those that don’t have an army behind them already.

To suggest projects you’d like to see on this list next month, just shout out tweets with hashtags #sourcehunt and #php - here’s the link to the combination. Naturally, if you’d like to sourcehunt a project written in another language, alter accordingly.

Note that sourcehunt will be a year-round project, not just hacktober, so get those submissions in!

Continue reading %Sourcehunt: Hacktoberfest 2015 Edition – Hack to Glory%


by Bruno Skvorc via SitePoint

Building Database-free Websites with Statamic CMS

A content management system (CMS) is a package of code around which you build a dynamic website—with components that change, adapt and update automatically, in contrast to a hard-coded, static site.

In this article, Gareth Redfern presents a relatively new type of CMS that's challenging the more established database-driven model.


Statamic CMS

Statamic is a flat-file CMS that has been in the wild since 2012.

It's built in PHP, and cleverly combines static and dynamic functionality. While some coding skills (HTML and CSS) are required to create a Statamic site, it's very simple to work with—having its own, intuitive templating language, and not requiring any knowledge of PHP.

All you need to get going is a code editor and an FTP program to connect with your server, and you can have your own site up and running quickly.

There's a handy 38 second video on the Statamic site that shows the CMS in action.

Statamic is a commercial product—$29 for a personal license and $99 for a pro license. That may be off-putting people used to free options like WordPress, but benefits come with this modest price—not least prompt and direct support from the development team.

Version 1 of Statamic doesn’t have a free demo, but version 2—due for beta release and built on top of Laravel—will offer this option.

Terminology

A flat-file CMS stores all your content in text files, rather than in a database—allowing you the freedom to write content directly in files using Markdown. (This is where the “static” part of the Statamic name comes from.)

Statamic is sometimes compared with static site generators such as Jekyll, which run your site through a converter that then produces HTML files for you to upload to your server. Although Statamic does have a static site generator, it requires PHP to run on your server, and is much more dynamic than the likes of Jekyll.

The Control Panel

Because Statamic is dynamic, it offers a control panel for adding and editing your content—which means it's a viable CMS to hand off to clients, unlike Jekyll.

The control panel is fully responsive, and offers a very clean, easy-to-use interface which both clients and fellow developers love.

Statamic Control Panel The Statamic Control Panel

Although the control panel is available, you don't have to use it, as you can also work directly with text files and upload them as needed.

Version Control Your Complete Site

Having your whole site based on simple text files—including the content—carries the great advantage that everything can be version controlled, and even stored and edited in your favorite Git hosting service.

This removes a lot of the headaches that traditional database-driven websites can give you when it comes to keeping content in sync from staging to production.

Types of Sites That Suit Statamic

Statamic lends itself well to the majority of website builds, with some popular blogs and company sites running it as their preferred CMS.

Of course, if you have a very large, content-heavy site with complex relationships, then a database-driven site may be more appropriate—though personally, I haven’t come across a site that Statamic can’t handle yet.

Getting Started

Installing Statamic is very simple.

You can run it locally on a server environment like MAMP or WampServer. You can then transfer everything to your server as needed.

First you should run a quick server check to make sure your host meets the minimum requirements.

After running the checks, just drop your files into the root of your site and enter some basic config settings in the settings.yaml file, enable the sample.htaccess by renaming it to .htaccess, and you're all set.

Updating is even easier: you just need to swap out two folders, _app and admin.

The Folder Structure

Folder Structure

The standard install comes with two example themes, and content which can be used as a starting point for creating your own theme.

All your written content is stored in the _content folder. In that folder, you have two “types”: pages and entries.

Pages are for your more static content, which can still be edited via the control panel, but which tend to be single pages like an “about” page. Entries are more dynamic, being added or updated on a regular basis. Blog or news articles are a good example of this type of content.

Each content page will have a YAML header—which is basically your template variables and content stored between 3 dashes.

If you haven’t heard of YAML before, it's a very human readable language used for storing data. One important point to remember when you're first starting is that YAML is very specific about indentation (use 2 spaces). Here's an example of a YAML file:

Example YAML File

Continue reading %Building Database-free Websites with Statamic CMS%


by Gareth Redfern via SitePoint

Dow-Smith Studio

opl-small

Unique redesign for London-based digital agency 'Dow-Smith Studio' featuring browser windows within your browser that are draggable and closable.

by Rob Hope via One Page Love

How a Typo Got Natalie Rogers Hooked on Envato Tuts+