Javascript News

Syndicate content
Pipes Output
Updated: 15 hours 9 min ago

3 Ways to Implement Embeddable Custom Badges

Sa, 2014-12-20 17:00

One great way of organically promoting your application is to provide “badges”; snippets of content that people can embed on their own websites.

This can contain up-to-the-minute information from your application about a user, piece of content or another object, dynamically generated and inserted into other websites. This is probably best illustrated with some examples:

In this article I’m going to take a look at some of the ways you can implement this.

Setting up our Example Application

All the code from this tutorial is available on Github. There’s also an online demo.

First, we’ll define our application’s dependencies using Composer:

"silex/silex": "~2.0@dev", "twig/twig": ">=1.8,<2.0-dev", "smottt/wideimage": "dev-master"

Continue reading %3 Ways to Implement Embeddable Custom Badges%

Creating Stateful Modals in AngularJS with Angular UI Router

Fr, 2014-12-19 20:00

There are a number of ways to approach implementing modals in an AngularJS application, including the popular angular-dialog-service and the official Angular-UI Bootstrap modal. In this article I'll share how I like to handle modals in Angular, using another Angular-UI service, the ui-router.

Thinking in States

The core idea behind this approach is that modals are in fact unique states of your application. Consider an e-commerce site. When you click the "Add to cart" button, a modal pops up asking you to log in. You enter your details and click "Continue", which show's you another modal with the details of your cart.

You've just traversed a number of states that just happened to be in modals. If we think of modals as states, then it makes sense to use a state management tool to go to and from different modal states.

Getting Started with the UI Router

Let's keep it simple to start with. First, we'll install the ui-router and add it to our Angular app.

1. Create a Simple HTML Page

We'll start by creating an index.html file with the following contents:

[html] < !doctype html> [/html]

jQuery has been included for some DOM work later on.

In addition to including the latest version of Angular itself, I've included the Angular UI Router, a CSS file (currently empty), and of course our app's main JavaScript file. Let's take a look at that next.

2. Create Your Angular App

The app.js file is incredibly simple at this point. We just create a module for our modalApp and then add the ui.router as a dependency:

[js] angular.module("modalApp", ["ui.router"]) [/js] 3. Fleshing Out the Interface

Before we can open a modal, we need a UI for the user to interact with. In this instance I've kept things simple with an "Add to cart button" in index.html:

[html] < !doctype html> Pusheen Hoodie

Now you too can look like Pusheen!

Add to cart [/html] 4. Configure the Initial States

We're going to be defining a number of states for each of our modals, but there's a bit of setup we need to do first. Since it's likely that we'll want to share behavior between our different modals, let's create a parent Modal state that our individual modals can then inherit from. The following code belongs in js/app.js:

[js] angular.module("modalApp", ["ui.router"]).config(function($stateProvider) { $stateProvider.state("Modal", { views:{ "modal": { templateUrl: "modal.html" } }, abstract: true }); }); [/js]

Continue reading %Creating Stateful Modals in AngularJS with Angular UI Router%

8 Steps to Take Before You Start Coding Your next iOS App

Fr, 2014-12-19 19:30

Whether you are a seasoned iOS developer or just starting out, one feeling is constant. You want to get started with your idea, and you want to get started now. Given the state of the app store ecosystem, this approach rarely yields success. There has never been a greater need to take a step back and answer important questions, perform necessary research and lay a solid foundation for your app before you type one line of code.

In this article, I’ll outline some steps you should consider before embarking on your next iOS app. I’m speaking from experience as I have developed apps in one weekend and have also spent the better part of a year on just one project. After many releases, I’ve identified successful practices that I now apply to every project to promote success.

Continue reading %8 Steps to Take Before You Start Coding Your next iOS App%

On Our Radar: Elastic SVG and Slack bots

Fr, 2014-12-19 18:00

Welcome to On Our Radar, a weekly round-up of news, trends, and other cool stuff from the world of web development. Designer tools This week we find that many articles are focusing on the needs of designers. Don’t blame the designer helps people to understand the role of a designer and how it’s not an […]

Continue reading %On Our Radar: Elastic SVG and Slack bots%

Review: Apps for Creating Online Graphs and Charts

Fr, 2014-12-19 17:30

Most of us -- even techies, marketers and other 'non-designers' -- at some time need to produce a diagram to help explain our views and ideas. For the purposes of this article, I'm going to characterize a 'diagram' simply as a geometrical symbolic representation of information.

You can separate most diagrams into two broad categories:

  • Graph based diagrams: This includes Tree Diagrams, Network Diagram, Flowchart, Venn diagram, Existential graph etc.
  • Chart like diagrams: This includes histograms, population density maps, exploded view, three dimensional diagrams etc.

Currently there is a growing selection of tools which focus on drawing charts. Gabrielle has already given us her views on the 5 best online tools for creating amazing charts.

In this article, I’ll be discussing some tools with the flexibility to cover both categories. But first let’s consider the parameters we should keep in mind while selecting a tool.


First, be sure to consider a tool which provides a wide range of diagram – all at one place. The range should include all of these diagrams:

  • UML
  • Flowchart
  • Venn Diagram
  • Org chart
  • Wireframe
  • Business Process Modelling
  • Network Diagram
  • SWOT Analysis
  • ERD
  • Structural
  • Class Diagram
  • Database Design
Real-Time Collaboration / Team building

As data is often owned by more than one master, collaboration with colleagues in real-time is a useful feature. Through this, you can invite your colleagues and clients for online chatting to discuss and contribute to diagrams in real-time. This kind of active participation by everyone to improve the diagram further.

Easy-to-use Interface

The tool should be easy-to-use. The canvas should be clearly visible with scroll up-down options. Drag-and-drop shapes and point-click features are covered under every online diagram tool.

Integration With Other Application

A common feature provided by online tools is integration with Google Drive, Google Apps, JIRA, Confluence, Jive, and Box.

The Social Network

The tool should be like a social network where team members and individual users can share their suggestions and thoughts regarding diagram development. This feature comes with a valuable restriction of creating diagrams privately or sharing it with others for promotion or suggestions.

Export and Import Facilities

The tool should provide with a feature to export and import diagrams. Some of them also provides with inserting images from computer, internet and cloud. The output can be in the form of image/file/document formats like jpg, bmp, pdf, csv, etc.

Revision History

Perhaps you've seen the CSS revision history feature in WordPress while updating child themes? A similar history feature is provided by some online tools which helps users in tracking and reverting changes in diagram development.

Novice to Expert

Sometimes it is important to look for a tool which helps novice users in becoming an expert. This is done by referring to help files and learning more about the features provided by the tool. Becoming an expert will help is easing with diagram development.

Multi-lingual Support

A high quality online application should provide support for various other native languages besides English.


The tool needs be fast to both load and use. Drag and drop functionality should not slow the whole process. Recovery options can also be provided in case of accidental corruptions or deletions.

Here, I have listed some professional online diagram tools:

Lucid Chart

Web-based diagramming software built on open web standards. Its features include:

  • Compatible as it’s built on open web standards.
  • Create the following using Lucid Chart:
    1. Flowcharts
    2. UML
    3. Network Diagrams
    4. Business Process Models
    5. Org Charts
    6. ERD
    7. Wireframing / Mockups
    8. Mind Maps
  • Integrated with Google Drive, Google Apps, Jira etc.
  • You can try the demo without signing.
  • Exporting the diagram to different formats like JPEG, PNG, PDF is simple.
  • Real-time collaboration with the team.
  • Provides revision history of the diagrams created.
  • Easy to share diagrams online.
  • They’ve provided with hundreds of templates and examples.

It’s an excellent tool to create diagrams online, go through LucidChart’s overview given on the home page of the website.

Free online software which the diagrams stored doesn’t go through servers. Instead, the user communicates directly with Google Drive or Dropbox. Other features include:

  • There is a plug-in provided for JIRA.
  • They claim to have an uptime of 100%.
  • Revision control is done in users Google Drive.
  • Translation is provided in more than 25 languages besides English.
  • Wire framing and mock-ups are part of free plans.
  • Create the following using
  • UML
  • Flowchart
  • Entity Relation

Some of its features differ from others like 100% uptime, JIRA plug-in, translations etc. They’ve also provided some differences on their official blog which makes them one-step ahead Lucid Chart.


With ProcessOn you can create different kinds of charts, such as: flow charts, organizational charts, EPC, and many others. It has the following features:

  • Real-time collaboration is possible through which all team members actively participate in modifying and improving the diagrams.
  • Files can be easily created and edited with easy to share features.
  • The diagrams can be exported in different formats.
  • Users can create a network of team by joining groups and inviting colleagues. This makes the process simpler.
  • Translation of the application is provided for 3-4 languages and rest is in process.

Image Source


It is the world’s first net-native business graphics application. Features include:

  • They’ve provided various themes and templates.
  • It’s easy to publish and share diagrams.
  • Revision control automatically stores each version which leads to ease in tracking changes.
  • Google Drive integration is provided.
  • Visio documents can be imported.
  • Create the following using Gliffy:
    1. UML
    2. Flowchart
    3. Venn Diagram
    4. Org chart
    5. Wireframe
    6. Business Process Modelling
    7. Network Diagram
    8. SWOT Analysis

Continue reading %Review: Apps for Creating Online Graphs and Charts%

No More var_dump – Introducing Symfony VarDumper!

Fr, 2014-12-19 17:00

Recently, Symfony went from Zend-like bloat and rigidity to extreme decoupling and modularity. With the new Developer Experience initiative, Symfony has done a Laravel-style 180° and dove right into making its components more end-user friendly, its docs more complete, and its AppBundles unbundled, simplifying entry and further development almost exponentially. Considering user friendliness, it’s a long way from “best pals friendly” but it’s definitely no longer hostile. One factor that contributes to this factor a lot is their continuous pushing out of new components that are incredibly useful outside of Symfony’s context. One such component is the new VarDumper.



You’re developing a feature. You either don’t feel like writing tests, or what you’re developing needs some variable testing in the middle of a function - something you can’t quite cover with a test. Inevitably, you resort to something like die(var_dump($var));. Even if you’ve abstracted it into a shorthand method like vddd($var), it’s still clumsy and unreadable, and tends to leave debugging snippets around your code, either as comments or, even worse, as code that can actually be triggered.

There’s little choice in the matter - sometimes we simply need our vddds. And sure, if you’re an Xdebug user, you’re probably used to a slightly better looking output than the raw PHP prints. Still, few good solutions existed that beautified this output for us enough to make it worth installing a dev dependency. Until VarDumper.

Continue reading %No More var_dump – Introducing Symfony VarDumper!%

Points of Confusion in Agile

Fr, 2014-12-19 17:00

One of the most confusing things about agile may be the fact that we call the estimated units of complexity and effort that will go into completing a story, points. We also use the term velocity to help estimate the number of story points a team believes it can handle in a given sprint. As soon as you introduce terms like these, engineers and managers alike instinctively start to think of them as a way of measuring the value of what is being done.

In fact, points and velocity have absolutely nothing to do with measuring the business value of the work done by the team. They also have no use as a tool for evaluating how hard the team is working, or how much objective work they are getting done. The true value of points is that they represent an abstract and relative metric for estimating what it will take to get one story done compared to another. Ultimately they are intended to help the engineers on the team get better at predicting what will be involved in addressing new stories. But trying to convince managers and engineers of this can be confusing when they see shiny points and graphs that look like they should be going up and to the right.

Continue reading %Points of Confusion in Agile%

What’s New in WordPress 4.1

Fr, 2014-12-19 00:30

WordPress 4.1, named “Dinah” after the jazz singer Dinah Washington, was officially released today. Here's a round up of what you can expect with this latest version. Around seven days ago the WordPress 4.1 Release Candidate became available, this article is based on the information shared in that release candidate. Any last minute changes will be updated as soon as possible. How Do I Get WordPress 4.1? Most users will be greeted with a message in your dashboard saying "WordPress 4.1 is available! Please update now". Clicking this link will take you to a page where can download the update and apply it all in one go. Easy! As always, I want to take a minute to remind everyone before applying any updates to your live sites, to make sure that you have a full backup and that you've tested theme and plugin compatibility with this latest version. Ideally, you should have a separate environment so you can always test anything that's important. SitePoint has featured articles on VVV (Varying Vagrant Vagrants) and Chasis which makes managing local WordPress development and testing environments a breeze. Introducing the New Twenty Fifteen Theme WordPress 4.1 will see the release of a new default WordPress theme called Twenty Fifteen. The theme was designed keeping a strong blog focus in mind and makes use of Google’s Noto web font. This font covers over 30 scripts and was developed to work across multiple languages, making it the perfect fit to help take WordPress closer towards the goal of stronger internationalization.

Continue reading %What’s New in WordPress 4.1%

Functional Wrappers in Sass

Do, 2014-12-18 19:30

I am not a big fan of having global variables all over the place, no matter the language. In Sass, as in CSS, we have nothing but a global namespace (although latest Sass versions progressively provide more scoping features). It's like a house with a single room: no matter how hard you try to organize your furniturs, at the end of the day there is still only a single room in the house.

What's the problem with this? When it comes to Sass, the problem is that variables can overlap. What if you have a variable called $baseline, and a Sass grid framework you use have a $baseline variable as well? Or worst, what if a Sass library you included uses a $_ variable to hold private content required for it to work and you happen to override it yourself with your own stuff? Simple: it breaks.

Coming back to my initial point: I am not a big fan of having variables to configure a Sass system. I shall be more precise and say "having only variables" because, of course, variables are the key when it comes to store data. Meanwhile, it has occurred to me that functional wrappers help a lot.

Functional what...?

You could think of function wrappers as getters and setters in a way that they are functions wrapping a variable declaration or retrieving to add some extra features on top of it: validation, error handling, default values, warnings, and so on.

Isn't it a pain to do this?, you say. It depends. There is something beautiful in a variable: its simplicity. A variable is obvious: it is a value mapped to a storage key. How could it get any simpler than this? Yet, I think raw variables are not best suited to handle things like library configurations and such.

Actually the choice is yours: either you have a function wrapper that handles everything from the very start (errors, parameter validation, default values...), or you make all of this in every functions and mixins you've got. I'll play clear: I'd rather go the former.

How does it work?

Continue reading %Functional Wrappers in Sass%

How to Simplify Form Building with JotForm

Do, 2014-12-18 18:00

It's our fault. We were the ones who opened Pandora's box. The proliferation of good, open source Content Management Systems such as WordPress mean clients can edit their website content without our assistance. Until they attempt to modify a form. Forms are an integral part of content. You can understand why a client asks "if I can add a heading, why can't I add an email request box?" The reality is more difficult. Even the most basic form requires development expertise:

  1. Create the form using HTML5 fields.
  2. Develop fallback code for older browsers, e.g. IE9 doesn't support new HTML5 field types or built-in validation.
  3. Develop validation code both client-side and server-side.
  4. Perhaps create or use custom fields such as map pickers, date handlers, file uploaders, etc.
  5. Implement security measures to ensure spammers cannot hack or use the system.
  6. Send the inquiry data in an email.
  7. Log the data in repository such as a database.
  8. Test the form on a variety of desktop, tablet and mobile devices.
  9. Create custom reports to summarize the inquiry data.
  10. Integrate the system with monitoring, analyics and/or sales systems.
Ironically, the slicker and simpler the user experience, the more development effort is required. Even if you're happy to proceed, the client will contact you 30 seconds after deployment…
  • "can we add just one more field?"
  • "can you send our CEO a weekly PDF summary of response statistics?", or
  • "can we output all this data to our CRM system for marketing analysis?"
The simplest forms rapidly mutate into mission-critical monsters. Even if you find a reasonable form builder plug-in for your CMS, they're rarely suited to non-technical end users and some custom code will be required to handle data flows and logging. Fortunately, there's an easier option…

Continue reading %How to Simplify Form Building with JotForm%

Efficient Chinese Search with Elasticsearch

Do, 2014-12-18 17:00

If you have played with Elasticsearch, you already know that analyzing and tokenization are the most important steps while indexing content, and without them your pertinency is going to be bad, your users unhappy and your results poorly sorted.

Even with English content you can lose pertinence with a bad stemming, miss some documents when not performing proper elision and so on. And that’s worse if you are indexing another language; the default analyzers are not all-purpose.

When dealing with Chinese documents, everything is even more complex, even by considering only Mandarin which is the official language in China and the most spoken worldwide. Let’s dig into Chinese content tokenization and expose the best ways of doing it with Elasticsearch.

What is so hard about Chinese search?

Chinese characters are logograms, they represents a word or a morpheme (the smallest meaningful unit of language). Put together, their meaning can change and represent a whole new word. Another difficulty is that there is no space between words or sentences, making it very hard for a computer to know where a word starts or ends.

There are tens of thousands of Chinese characters, even if in practice, written Chinese requires a knowledge of between three and four thousand. Let’s see an example: the word “volcano” (火山) is in fact the combination of:

  • 火: fire
  • 山: mountainsky

Our tokenizer must be clever enough to avoid separating those two logograms, because the meaning is changed when they are not together.

Continue reading %Efficient Chinese Search with Elasticsearch%

jQuery 1.11.2 and 2.1.3 Released – Safari Fail-Safe Edition

Do, 2014-12-18 15:46

Season’s greetings! After a thoughtful review of the Naughty and Nice lists, we have decided to leave a small present under the tree to finish 2014: jQuery 1.11.2 and 2.1.3! These releases include several bug fixes to make your cross-browser development experience better.

The most significant fix in this release is a workaround for a serious querySelector bug in Safari 8.0 and 7.1. When this bug popped up we were hopeful that it would be fixed in patch releases but that did not happen. Apple is by far the least transparent browser maker, and we have very little information about when the Webkit patch for this bug might be pulled into Safari. As a result, we have decided to patch this in Sizzle, the selector engine used by jQuery.

A bug like this one emphasizes the benefit of using a library like jQuery rather than going directly to the DOM APIs. Even modern browsers can suffer from bugs that aren’t fixed for a long time, and there are still cross-browser feature differences with several browsers in wide use such as Android 2.3. Special-case code for obscure browser issues can seem unnecessary until you spend a day trying to debug a problem in your own code caused by one. Or worse, lose a paying customer because they couldn’t use your site from their old phone.

Another bug that makes it difficult for us to test jQuery on iOS 8 is that the user agent of the simulator is incorrect so the iOS 8 simulator is not recognized by our unit test infrastructure. The fix for that issue is very simple but Apple won’t tell us if we can count on it being done. For now we’re doing our iOS 8 testing manually.

In addition, this release includes several changes inside jQuery to avoid holding onto DOM elements unnecessarily. Although the old code generally wouldn’t cause things to run incorrectly, web pages might run slowly and use more memory than necessary.

You may notice that we skipped a patch release number in the 2.x branch. We didn’t actually skip it, we built it and found a problem that caused problems when jQuery was used with node. (Many thanks to Denis Sokolov for letting us know immediately and prodding us to fix it!) Rather than shipping those files to the other CDNs, we decided to create new releases.

As far as the potential for compatibility or regression issues, we believe this is a very low-risk upgrade for anyone currently using 1.11.1 or 2.1.1. We are making this release ahead of jQuery 3.0 to ensure that you can use a Safari-safe version of jQuery without the need to review your code for compatibility with changes being anticipated in jQuery 3.0. If you do encounter bugs, in upgrading from the previous version, please let us know.

You can include these files directly from the jQuery CDN if you like, or copy them to your own local server. The 1.x branch includes support for IE 6/7/8 and the 2.x branch does not.

These updates are already available as the current versions on npm and Bower. Information on all the ways to get jQuery is available at Public CDNs receive their copies today, please give them a few days to post the files and don’t be impatient. If you’re anxious to get a quick start, just use the files on our CDN until they have a chance to update.

Many thanks to all of you who participated in this release by testing, reporting bugs, or submitting patches, including Chris Antaki, Denis Sokolov, Jason Bedard, Julian Aubourg, Liang Peng, Michał Gołębiowski, Oleg Gaidarenko, PashaG, Richard Gibson, Rodrigo Rosenfeld Rosas, Timmy Willison, and TJ VanToll.

Since the last release of jQuery we have moved from a Trac installation to GitHub issues, so there are currently tickets for this release in both bug trackers. References to the Trac tickets have been migrated to GitHub issues, however, so you can use this GitHub Issues query to review all the tickets.

Thanks for all your support, and see you at jQuery 3.0!

Chruby and Rbenv Tips and Tricks

Do, 2014-12-18 15:00

Rbenv and chruby are the cool kids on the block now. Obviously, we want the most we can get out of our favorite tools. So this article isn't about which one to like more, nor is it an introduction to either version manager. Instead, we're going to cover some advanced rbenv and chruby usage to maximize your productivity.

Continue reading %Chruby and Rbenv Tips and Tricks%

Getting Started with Slack Bots

Mi, 2014-12-17 20:00

Slack is a popular tool for encouraging better communication among team members. It comes with a slew of helpful features and services including third-party integrations and webhook support. Slack webhooks can be fun and useful, and they're easy to set up. In this tutorial we'll set up a simple server using Node.js and Heroku that will respond to your team's messages from Slack as a "bot." Familiarity with JavaScript and Git will be helpful. If you haven't used Git before, take a look at Git for Beginners to get started. Access to a Slack account is also assumed, but don't worry - they're free!

Creating a New Slack Integration

From the Slack web interface, open the menu in the top left corner next to your team's name and select Configure Integrations. Here, you can see a dashboard with all the integrations available to you. Scroll to the very bottom under DIY Integrations & Customizations, and add an Outgoing WebHook. Read the short description and then click Add Outgoing WebHooks Integration.

You will see the Outgoing WebHook configuration and an example of what the request and response payloads should look like. Our first bot will simply greet the user when called. To do this, we will allow the hook to listen for the Trigger Word "hello" on any channel. We don't know the URL it will be posting to yet, so we will come back to this page later.

Creating a Web Server

We'll be using Express 4 on Node.js to build a simple web server.

Create a new directory for your app, and run npm init to generate your package.json file. In your package.json dependencies, include "express": "^4.x.x" and "body-parser": "^1.x.x". The body-parser package will be used to parse the payload sent from Slack. Create the server file named app.js. Here, we will require the necessary modules, add the body parser middleware, error handler, and a test route. Then, we tell the server to start listening.

[js] var express = require('express'); var bodyParser = require('body-parser'); var app = express(); var port = process.env.PORT || 3000; // body parser middleware app.use(bodyParser.urlencoded({ extended: true })); // test route app.get('/', function (req, res) { res.status(200).send('Hello world!') }); // error handler app.use(function (err, req, res, next) { console.error(err.stack); res.status(400).send(err.message); }); app.listen(port, function () { console.log('Slack bot listening on port ' + port); }); [/js]

Run the server with node app and verify that visiting http://localhost:3000 responds with "Hello world!".

Writing the Bot Logic

Create a file named hellobot.js

This module will be where our bot logic lives. It will include one exported function that returns a message to Slack with status code 200. We'll start by parsing the data that Slack sends to our server, and then we'll respond with a properly formatted payload of our own. To do this, let's revisit our Outgoing WebHook under Configured Integrations. The Outgoing Data example shows us all the info Slack sends when an Outoing WebHook is triggered.

You can see that some of the data can be useful for authentication or routing, but for now we're just going to focus on the user_name property. Using this value, we can send a personalized greeting back to the user.

[js] module.exports = function (req, res, next) { var userName = req.body.user_name; var botPayload = { text : 'Hello, ' + userName + '!' }; // avoid infinite loop if (userName !== 'slackbot') { return res.status(200).json(botPayload); } else { return res.status(200).end(); } } [/js]

Continue reading %Getting Started with Slack Bots%

What Makes a Successful Startup?

Mi, 2014-12-17 18:30

When people look at major success stories in the startup world, one of the biggest things that comes to mind is luck. Yes, part of entrepreneurial success is timing, and luck often plays a slight role in the success of a venture, however when you look at the trends from the past few years it becomes apparent that there is a science to entrepreneurship which can help to improve your odds of success.

As discussed at the recent CEA Innovate 2014 conference sessions titled Startup Success Stories, top entrepreneurs from Tech Cocktail, Phone2Action and HD Radio gave insights and advice to help current and aspiring business owners increase their chances of success. Although business ownership can be daunting, by focusing on the key trends below, you can greatly improve your odds of success.

Continue reading %What Makes a Successful Startup?%

Improving the Pointer Events Polyfill

Mi, 2014-12-17 17:45

Today, we’re excited to announce that Google has transferred its Pointer Events polyfill to the jQuery Foundation. This polyfill was originally written by Google’s Polymer team but since Google has chosen to put their Pointer Event implementation on hold, we engaged to ensure that the polyfill is maintained and continues to be a tool developers can use as a path to the eventual native implementation in all browsers. Many thanks to Google and the Polymer Team for allowing us to build off their work and continue development.

The jQuery Foundation has been, and continues to be a strong proponent of standards and we are specifically strong proponents of the Pointer Events standard because it will simplify the way web developers handle user interactions. Today developers are saddled with two very different event models for mouse and touch, even though they share many similarities. The result is often code that has a myriad of special cases, particularly when the device itself generates “fake” mouse events from touches. The jQuery Foundation hopes to drive developer adoption of this unified event system. Our goal is to have all browsers implement this standard natively.

Just yesterday, the W3C took the Pointer Events specification to the Proposed Recommendation stage. This makes Pointer Events one step closer to a finished standard and gives browsers a solid base on which to implement these APIs. Some browsers have even begun their implementation. Unsurprisingly Internet Explorer, where the first implementation of Pointer Events began before being submitted to the W3C for standardization, has implemented Pointer Events and Firefox has a branch of their code base implementing Pointer Events which they intend to port to all version of Firefox. Both of these implementations recently passed 100% of the Pointer Events test suite so implementation is progressing nicely.

We want to thank Microsoft Open Technologies for their hard work on Pointer Events and their continued support. We also want to thank IBM, Mozilla, Google, Dojo and the many other organizations and individuals that have helped and continue to help make developers lives easier through the creation, fostering and promotion of new standards like Pointer Events. If you want to get involved or just want to start using Pointer Events in your projects, head over to the new Pointer Events repo and check it out.

The Ultimate Content Marketing Toolkit

Mi, 2014-12-17 17:30

Have you ever thought over the question: What makes someone choose your content over a competing article on the same subject? The answer is simple. If you want to be competitive in the world of content marketing, you need to understand exactly what the reader wants. You must meet those needs in an attractive, enjoyable way. Then, you need to put that content directly in front of the readers. The content marketing process can be time consuming and difficult to implement. That’s why using the right tools is essential.

Fortunately, today there are plenty of apps and tools that can guide you through the whole process, from content discovery and distribution to making your writing and marketing stages easier and more effective. There is no longer an excuse for poor quality writing on flimsy topics that no one wants to read.

Here are 20 tools that are considered popular today and proved to be effective helpers of successful writers and content marketers. I’ve classified them by purpose, type of content and by stage of content creation process.

Fishing for Content Ideas

Before getting the message across you have to get the lay of the land. No one wants to provide content that is out-dated and not interesting for the audience. So, you should first check out the sites, networks, and resources that identify the latest trends. Find out what your audience is truly interested in and which topics are popular at the moment with the help of the following sites:

Continue reading %The Ultimate Content Marketing Toolkit%

Dreamweaver CC: The Web Development Tool That Opens PSDs?

Mi, 2014-12-17 17:30

Where is the biggest bottleneck in your web development process? The part where things tend to bog down?

Sure, it varies from project to project, but I suspect for most of us it's the translation step from design to code -- from PSD to HTML. In fact, a thriving HTML/CSS industry has grown up around servicing designers who work in PSD.

Many tools have tried to merge these two very different processes to create graphic design tools that output code. While their intentions have been noble, we all know that it's difficult to serve two such different masters.

Adobe are taking a new approach to bridging that design/code gap. Dreamweaver CC 2014 is the first code editor (IDE) that lets you interact directly with your PSD comps. Past applications have tried to auto-generate code by second-guessing your coding decisions -- often less than successfully. Instead, Dreamweaver is giving you direct access to the PSD comp, and allowing you to surgically extract any image, color and CSS value straight into your coding window. Essentially, this means YOU are still the 'gatekeeper' for every line of code that gets written -- a situation that would appeal to a lot of us -- but the need to constantly switch between major applications reduces dramatically. It's an ambitious idea, right? Let's have a look how it works in practice. New Workspaces: Extract Panel and Dreamweaver The first thing you'll notice on launching Dreamweaver CC 2014 is the new Extract panel on the left side. Fold it out and you'll see any PSD file that you've synced to Creative Cloud Assets automatically appear. You can also load any PSD by just dragging it in there. The new Extract Panel in Dreamweaver Select any PSD and you'll notice Dreamweaver will take a few seconds to prepare it. Sidenote: You'll notice on the right that Dreamweaver also now offers SVG as a new file option. Perhaps we're at a time where SVG is being thought of as 'living code' -- like HTML and CSS -- rather than just another image format? I hope so. Interacting with PSDs in Dreamweaver

Once it's loaded, your PSD will display in the Extract workspace, but most of the useful tools are hidden by default. At the top right there are two buttons -- Styles and Layers.


The styles panel gives you a 'top down' inventory view of what is being used in your document -- colors, fonts, and gradients.

Color, fonts, and gradient choices are collated in the Styles panel

With eyedroppers and various rounding errors, it's not hard to end up with 2 or 3 slight variations of the same color. Clicking on any color swatch shows you all the places that that color is being used. This is the ideal place to clean up your color palette and perhaps rationalize your font list.

Continue reading %Dreamweaver CC: The Web Development Tool That Opens PSDs?%

Getting Started with Medoo – Examples of Use

Mi, 2014-12-17 17:00

In this article I’m going to walk you through Medoo, a lightweight database abstraction library for PHP. Its main features include:

  • Support for multiple databases - it supports MySQL, MariaDB, Sybase, MS SQL, PostgreSQL, and Oracle.
  • Secure - prevents SQL injection, it uses PDO.
  • Easy to use - its API is very intuitive.

While Medoo is nothing revolutionary, and the fact that it sports a very small filesize matters little to few, it’s still an interesting project that went from being outright dismissed to vaguely accepted, as evident in these threads. It’s on its way up, and that’s our reason for taking a look at it.


Even though the website recommends installing it by downloading a file and including it in your project, you should use Composer to do so.

Continue reading %Getting Started with Medoo – Examples of Use%

How to Accessibly Rotate Contents with jQuery

Di, 2014-12-16 20:00

Together with the parallax scrolling effect, rotating content is another example of an effect that you often see implemented in websites. You can see it used to rotate news, tweets, Facebook posts, and so on. When built using jQuery, often developers create the widget employing the hide() and the show() methods (or the similar methods such as fadeIn()/fadeOut() and slideUp()/slideDown()). The problem with them is that, after performing the animation (if any), these methods change the value of the display property of the selected element(s) to none and back to the original value respectively. This behavior leads to an accessibility issue. In this article we'll describe what the issue is and how you can use different jQuery's methods to achieve the same effect but taking care of accessibility. The Problem Some people, usually but not limited to visually impaired people, use the TAB key to navigate a website. If you're not familiar with this concept, what happens is that every time a user hit the TAB key a focusable element of the page is focused. The order in which the elements are focused follows the the order they appear in the DOM (exceptions apply) starting from the very beginning of the page. Some examples of focusable elements (learn more in When Do Elements Take the Focus?) are links, input fields, buttons, and everything that has a value for the tabindex attribute greater than or equal to 0 (learn when and how to use tabindex). The important point to understand is that an element hidden by setting its display property to none is not focusable. With this in mind you can see that if a TAB user is focusing an element (for example a link) that has been hidden using the hide() method and then the user presses the TAB key, there is a problem. Being hidden in that way is like the element has been temporarily removed from the DOM, so there isn't a next element to focus. What browsers do in this case is to reset the position, usually focusing the URL of the page. This causes a lot of frustration to the users because they have to start from the beginning of the page every time they reach this death zone. Even more, some of your users can't even see your awesome rotating effect - all they want to do is access your content easily. Show Me the Code To give you a better handle on this situation, consider the following markup: [html]

This is a text with a link 1 and another link 1

This is a text with a link 2 and another link 2

This is a text with a link 3 and another link 3

This is a text with a link 4 and another link 4


Continue reading %How to Accessibly Rotate Contents with jQuery%