Saturday, November 14, 2015

The Landscape of Customer Identity: Has Facebook Peaked? - #infographic

The Landscape of Customer Identity: Has Facebook Peaked? - #infographic

This infographic produced by Gigya, takes a closer look at how consumers used their existing social media credentials to authenticate their identities across websites and mobile applications in Q3 2015.

A key takeaway is: Facebook's share of logins as a third-party identity provider on mobile applications remained significantly higher than all other IdPs, though Google+ did steal 1 percent away from the world's largest social network in Q3. Yahoo's presence as an identity provider on mobile applications has completely vanished.

Check out this infographic for more insights.

by Irfan Ahmad via Digital Information World

Dropit : jQuery Dropdown Menu Plugin

Dropit is a jQuery plugin for single level dropdown menu’s. Nothing fancy pants in here. Just simple and flexible dropdown’s in jQuery.

The post Dropit : jQuery Dropdown Menu Plugin appeared first on jQuery Rain.


by Admin via jQuery Rain

Animating an SVG Menu Icon with Segment

A tutorial on how to implement an animated menu icon based on the Dribbble shot by Tamas Kojo using SVG and Segment, a JavaScript library for drawing and animating SVG paths.

The post Animating an SVG Menu Icon with Segment appeared first on jQuery Rain.


by Admin via jQuery Rain

CircletPreloader jQuery Plugin

CircletPreloader is a small jQuery plugin that for as circular loading animations show depict the state of charge of various HTML DOM elements as a percentage.
The aim was to get along with as few KB, while flexibility as regards the possibilities for the representation of the loading animations. The minifie JavaScript file is only 2, 74 KB hard and needs no other and / or external JavaScript libraries. One can CircletPreloader even without jQuery use and is therefore completely independent. Using various parameters can be the loading animations individualize a large scale.

The post CircletPreloader jQuery Plugin appeared first on jQuery Rain.


by Admin via jQuery Rain

Pinterest Launches Visual Search: This Week in Social Media

Welcome to our weekly edition of what’s hot in social media news. To help you stay up to date with social media, here are some of the news items that caught our attention. What’s New This Week Pinterest Introduces Visual Search Tool: Pinterest’s new visual search tool “lets you find all those things you don’t have […]

This post Pinterest Launches Visual Search: This Week in Social Media first appeared on Social Media Examiner.
Social Media Examiner - Your Guide to the Social Media Jungle


by Grace Duffy via Social Media Examiner

Gobelins interactive experiments

19 experiments made by interactive design students during a 4 days workshop.
by via Awwwards - Sites of the day

Friday, November 13, 2015

An Overview of JavaScript Templating Engines

This article was peer reviewed by Chris Perry and Ritesh Kumar. Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be!

In this article we’re going to give an overview of templating in JavaScript. We’ll first discuss what JavaScript templates are, when we should use them and how we implement them, before going into a bit more detail regarding some of the popular templating engines out there. We’re going to focus on mustache.js, Handlebars.js and jQuery Template.

What Are JavaScript Templates?

JavaScript templates are a method of separating HTML structure from the content contained within. Templating systems generally introduce some new syntax but are usually very simple to work with, especially if we’ve used templating systems elsewhere previously (eg. Twig in PHP). A fun point to note is that token replacement is usually symbolized by double curly brackets ({{ ... }}), which Mustache and Handlebars derive their names from (hint: turn them sideways to see the similarity).

When Should We Use JavaScript Templates?

[author_more]

As soon as we find ourselves including HTML inside JavaScript strings we should be starting to think about what benefits JavaScript templates could give us. Separation of concerns is of utmost importance when building a maintainable codebase, so anything which can help us achieve this should be explored. In front-end web development this is epitomized when separating HTML from JavaScript (this works both ways in that we shouldn’t include JavaScript inline in HTML).

Some common scenarios which could benefit from JavaScript templates are real-time web apps (for example a live streaming app for event commentary), or internationalization (i18n), which will quite often require that different content is displayed using the same formatting.

How Do We Implement JavaScript Templates?

We’ll go into more detail on this with specific library examples, but essentially it’s as simple as including our chosen library, fetching our template and rendering it alongside some data.

Most libraries support both inline and external templates. Inline templates are great for when we’ve got very few templates or we know that we'll be using the included templates on each page load, but generally our templates should be external. External templates bring many benefits, chiefly that templates will never be downloaded to the client unless they are needed by the page.

mustache.js

Mustache is a multi-language, logic-less templating system. The mustache.js implementation is just one of many. So once we’re used to the (very simple) syntax, we can use it in a variety of programming languages.

Key Points

  • 9kb file size (small)
  • Simple
  • No dependencies
  • No logic
  • No precompiled templates
  • Programming language agnostic

Example

<script id="template" type="x-tmpl-mustache">
  <p>Use the <strong>{{power}}</strong>, {{name}}!</p>
</script>


//Grab the inline template
var template = document.getElementById('template').innerHTML;

//Parse it (optional, only necessary if template is to be used again)
Mustache.parse(template);

//Render the data into the template
var rendered = Mustache.render(template, {name: "Luke", power: "force"});

//Overwrite the contents of #target with the rendered HTML
document.getElementById('target').innerHTML = rendered;

See the Pen Mustache.js example by SitePoint (@SitePoint) on CodePen.

As you can see in this example, the Mustache.render function takes two parameters: the Mustache template, as well as a view object that contains the data and code needed to render the template. In this case we are replacing name and a power variables with simple strings, but it’s possible to do much more. For example loop over an array, or make use of a special rendering function that uses the current view as its view argument.

Continue reading %An Overview of JavaScript Templating Engines%


by Jamie Shields via SitePoint