Friday, October 2, 2015

An Introduction to On-Demand Resources on iOS and tvOS

Building Custom cTools Plugins in Drupal 7

cTools is one of those critical Drupal 7 modules many others depend on. It provides a lot of APIs and functionality that makes life easier when developing modules. Views and Panels are just two examples of such powerhouses that depend on it.

cTools makes available different kinds of functionality. Object caching, configuration exportability, form wizards, dialogs and plugins are but a few. A lot of the credit you would normally attribute to Views or Panels is actually owed to cTools.

Drupal logo

In this article, we are going to take a look at cTools plugins, especially how we can create our very own. After a brief introduction, we will immediately go hands on with a custom module that will use the cTools plugins to make defining Drupal blocks nicer (more in tune to how we define them in Drupal 8).

Introduction

cTools plugins in Drupal 7 (conceptually not so dissimilar to the plugin system in Drupal 8) are meant for easily defining reusable bits of functionality. That is to say, for the ability to define isolated business logic that is used in some context. The goal is to set up that context and plugin type once, and allow other modules to then define plugins that can be used in that context automatically.

If you’ve been developing Drupal sites for more than a year you’ve probably encountered cTools plugins in one shape or form. I think the first plugin type we usually deal with is the content_type plugin which allows us to create our own custom panel panes that display dynamic content. And that is awesome. Some of the others you may have encountered in the same realm of Panels are probably context and access (visibility rules). Maybe even relationships and arguments. These are all provided by cTools. Panels adds to this list by introducing layouts and styles that we normally use for creating Panels layouts and individual pane styles. These are I think the more common ones.

However, all of the above are to a certain extent a black box to many. All we know is that we need to define a hook to specify a directory and then provide an include file with some definition and logic code and the rest happens by magic. Going forward, I would like us to look into how a plugin type is defined so that if the case arises, we can create our own plugins to represent some reusable bits of functionality. To demonstrate this, we will create a module that turns the pesky hook system of defining custom Drupal blocks into a plugin based approach similar to what Drupal 8 is using.

The final code (+ a bit more) can be found in this repository if you want to follow along. And I do expect you are familiar with the steps necessary for defining custom Drupal blocks.

Continue reading %Building Custom cTools Plugins in Drupal 7%


by Daniel Sipos via SitePoint

Coding for the Big Screen with the Apple TVOS SDK

The newly announced tvOS SDK is something for iOS developers to get excited about. For the first time we will be able to create apps for the new Apple TV and publish them to the App Store. This is a great opportunity to deliver content and great user experience through apps to the big screen in everyone’s living room.

Let’s dive right in and take a look at the tvOS SDK.

We’ll cover the basics of each new framework, identify their purpose and describe what the requirements to make an app. Armed with our newfound knowledge, we will create a simple custom tvOS app step by step.

Continue reading %Coding for the Big Screen with the Apple TVOS SDK%


by Patrick Haralabidis via SitePoint

McWhopper

opl-small

Brilliant One Page marketing campaign by Burger King pitching the collaborative concept of the "McWhopper" to McDonalds. The single page website features impressive parallax scrolling and colorful illustrations throughout. Interesting how they chose Tumblr as the platform to promote the campaign. FYI: here is McD's response.

by Rob Hope via One Page Love

Getting Started With Raygun: Insights and Crash Reporting for App Developers

This week's JavaScript news, issue 252

This week's JavaScript news
Read this e-mail on the Web
JavaScript Weekly
Issue 252 — October 2, 2015

Somehow we have over 500 new subscribers this week, so welcome to you all! And a long overdue thanks to all readers. We're just shy of 90,000 subscribers now, in no small part thanks to you sharing and mentioning the newsletter, and it's much appreciated :-)
- Peter Cooper, Editor

An attempt to make it easy to copy text to the clipboard via JavaScript. Works in all major browsers, though with a workaround for Safari. Just 2KB too.
Zeno Rocha

In ES6, you can tweak how objects are treated in numerous situations by using several so-called ‘well known symbols’. Some intriguing stuff here.
Dr. Axel Rauschmayer

First there was Crockford’s JSLint, then the more configurable JSHint, then.. ESLint which its creator explains and demonstrates in full here.
Nicholas C Zakas

Raygun offers full stack support & detailed diagnostics that enable you to resolve errors fast. You can even contact effected users to let them know it’s sorted. Setup takes minutes, why not make this your most productive coffee break ever? Try Raygun free for 30 days.
Raygun   Sponsored
Raygun

The creator of the popular Discourse forum software (which heavily uses Ember) finds Android isn’t keeping up with iOS’s JS performance leaps.
Jeff Atwood

A quick look at asynchronous code in JavaScript over time from ES5’s callbacks to ES6’s promises and on to ES7’s ‘async’ functions.
David Catuhe

Flux is a pattern for handling data in your application, initially focused on use with React. It can be tricky to understand though, so this guide explains it in a simple, visually-driven way.
Lin Clark

The latest in Nicolas’ dives into ES6’s features. This time promises get the full treatment. Well worth the read.
Nicolas Bevacqua

Jobs

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

Set Up Scheduled Tasks in Magento

This summary is not available. Please click here to view the post.