Friday, February 12, 2016

jQuery Accounting : jQuery Wrapper for Accounting.js

This is a simple, jQuery plugin wrapper for accounting.js. It allows you to format data values directly from HTML.

The post jQuery Accounting : jQuery Wrapper for Accounting.js appeared first on jQuery Rain.


by Admin via jQuery Rain

headerMessage : Pure CSS3 Slide Down Toggle Header

Pure CSS3, without javascript. Nice slide down toggle header message.

The post headerMessage : Pure CSS3 Slide Down Toggle Header appeared first on jQuery Rain.


by Admin via jQuery Rain

The Battery Isn’t The Only Thing Your Smartphone Usage Is Draining - #infographic

Is Your Smartphone Sucking The Life Out Of You?

You only need to walk into a restaurant on any given night of the week to see the effects of smartphone addiction in play. People lookup reviews on their phone while hovering outside the door. Once seated, they pick out their menu selection from photos posted on Yelp. And then the thumbs go through the ritual dance of texting friends, changing Facebook statuses, or Tweeting about the decor before the appetizer even arrives. We’re all plugged into our smartphones, nearly 24/7. It’s generally agreed that the iPhone changed the game when it came to smartphones. Suddenly that cumbersome thing in your pocket became a gateway to a whole new world. Social media, news events, “the Internet” existed in your pocket, easy-to-use, and everywhere, always. That was back in the stone age of 2007. In less than 10 years, we’ve become a nation of smartphone addicts. This infographic created by Dialed-In examines some the health hazards that come with being stapled to your smartphone - and the scary thing is, we haven’t even seen the long-term effects yet.

by Irfan Ahmad via Digital Information World

How to Build Your Own Dependency Injection Container

A search for “dependency injection container” on packagist currently provides over 95 pages of results. It is safe to say that this particular “wheel” has been invented.

Square wheel?

However, no chef ever learned to cook using only ready meals. Likewise, no developer ever learned programming using only “ready code”.

In this article, we are going to learn how to make a simple dependency injection container package. All of the code written in this article, plus PHPDoc annotations and unit tests with 100% coverage is available at this GitHub repository. It is also listed on Packagist.

Planning Our Dependency Injection Container

Let us start by planning what it is that we want our container to do. A good start is to split “Dependency Injection Container” into two roles, “Dependency Injection” and “Container”.

The two most common methods for accomplishing dependency injection is through constructor injection or setter injection. That is, passing class dependencies through constructor arguments or method calls. If our container is going to be able to instantiate and contain services, it needs to be able to do both of these.

To be a container, it has to be able to store and retrieve instances of services. This is quite a trivial task compared to creating the services, but it is still worth some consideration. The container-interop package provides a set of interfaces that containers can implement. The primary interface is the ContainerInterface that defines two methods, one for retrieving a service and one for testing if a service has been defined.

interface ContainerInterface
{
    public function get($id);
    public function has($id);
}

Learning From Other Dependency Injection Containers

The Symfony Dependency Injection Container allows us to define services in a variety of different ways. In YAML, the configuration for a container might look like this:

parameters:
    # ...
    mailer.transport: sendmail

services:
    mailer:
        class:     Mailer
        arguments: ["%mailer.transport%"]
    newsletter_manager:
        class:     NewsletterManager
        calls:
            - [setMailer, ["@mailer"]]

Continue reading %How to Build Your Own Dependency Injection Container%


by Andrew Carter via SitePoint

This week's JavaScript news, issue 270

This week's JavaScript news
Read this e-mail on the Web
JavaScript Weekly
Issue 270 — February 12, 2016
The latest major version of Angular 1. Its main theme is to improve the upgrade path to Angular 2 for Angular 1.x-based developers.
Angular Team

The latest ECMAScript spec makes a compelling case for developing without heavy libraries or frameworks, says Andrew Rabon, but are we ready yet?
Andrew Rabon

Raymond Camden offers tips, techniques and tools that can improve your development skills for anyone learning JavaScript.
Telerik Developer Network

JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties. Here you will learn everything about JWT and how to use them for authentication!
Auth0   Sponsored
Auth0

It’s in alpha but Transcrypt is a Python to JS transpiler that implements much of Python 3.5 including support for multiple inheritance and comprehensions.
Jacques de Hooge

Gentle, well-presented 4 parter on functional JavaScript, starting from ‘why’.
James Sinclair

An excellent, free set of 14 bitesize videos giving a straightforward guide to contributing to a JavaScript-based GitHub project. Kent encourages you to link to this from your own projects’ README files for the benefit of others.
Kent C Dodds

TJ VanToll explores the growing usage of JavaScript outside the browser including for working on the server, mobile device apps and desktop apps.
Telerik Developer Network

Jobs

  • TIDAL is looking for Front-End DevelopersDo you want to join the team responsible for building listen.tidal.com. Our ambitions for the product are very high, and we want to strengthen the team with more skilled and highly motivated front-end developers. TIDAL
  • Frontend Developer at Backbase (Amsterdam)Being a Frontend Developer at Backbase gives you the opportunity of not only working with the newest technologies, but also mastering your leadership skills through implementing our product at our client’s offices. Travel the world; tickets/hotels are on us. Backbase
  • Frontend Architect (f/m) at Takeaway.com (Berlin or Amsterdam)Are you that experienced frontend specialist that has come to take a bird’s eye view of your subject field? Can you bring structure, oversight and efficiency to an online leader’s frontend development? Then join us! Takeaway.com

In brief

Curated by Peter Cooper and published by Cooper Press.

Stop getting JavaScript Weekly : Change email address : Read this issue on the Web

© Cooper Press Ltd. Office 30, Lincoln Way, Louth, LN11 0LS, UK


by via JavaScript Weekly

Quick Tip: Installing React Native

React Native has fast become one of the hottest frameworks for building cross platform mobile apps. Based on JavaScript and Facebook’s React Library it focuses on performance and tight integration with the native platforms supports. With Facebook invested in the framework and React’s learn once, write anywhere philosophy, React has a bright future.

Continue reading %Quick Tip: Installing React Native%


by Jon Shaffer via SitePoint

20 Useful iOS Icon & App Template Resources