2015年5月25日星期一

NetTuts.com: E-mail List Alternatives With PHP: Using Mailgun's List API


In a new tutorial posted to the NetTuts.com site they show you an alternative method for sending emails from your PHP application: using the Mailgun API. This API provides an interface into the Mailgun service, specifically made for sending emails without the hassles of hosting your own email server.



Over the past couple years I've run into various frustrations with both open source email list applications and paid cloud-based providers. In this tutorial, I'll guide you through my adoption of Mailgun.com, an economical solution I've been using successfully now for two years. [...] Mailgun is a cloud-based SaaS email cannon, like SendGrid. It's actually free for up to 10,000 emails per month. Mailgun is incredibly powerful and offers a well-documented API in a variety of popular languages. It provides for both send and receive capabilities, the latter of which can be quite difficult to develop from scratch. While Mailgun doesn't provide templates for rich HTML newsletters, it provides a platform upon which you can build anything.


He shows you how to use the service using a simple "ListApp" application (found on GitHub here) that provides some of the most common email list management functionality. He shows you how to set up a free Mailgun account and where to find their PHP SDK for the PHP integration. He then gets into the code examples, showing how to connect to the API via the SDK and doing tasks such as:



  • Creating and update a mailing list
  • Importing members to a list
  • Showing a list of current list subscribers
  • Send a new message
  • Synchronizing lists and members


He ends the post with a quick section about extending the ListApp application (or the PHP SDK) with a suggestion to add better error reporting or a queue system to manage the remote API requests more efficiently.


Link: http://code.tutsplus.com/tutorials/e-mail-list-alternatives-with-php-using-mailguns-list-api--cms-22824

SitePoint PHP Blog: CRUD (Create Read Update Delete) in a Laravel App


The SitePoint PHP blog continues their series around the creation of a basic CRUD (create, read, update and delete) application with PHP. In this second part of the series they build on the simple application in the first part and enhance it with the remainder of the CRUD handling.



In the previous part, we've bootstrapped our Laravel CRUD application by creating the database, some controllers, basic routes and simple views. In this part, we'll wrap things up and implement proper CRUD.


He jumps right in and creates the controller action and view to take in new "Task" information. This includes the installation of the Illuminate HTML package and setup of the needed provider and facades. He shows how to create the Task model and hook the results of the request into it and make the new record. This includes some basic "required" validation too. He then shows how to read and display the list of current tasks as well as setting up the edit and delete actions for each task.


Link: http://www.sitepoint.com/crud-create-read-update-delete-laravel-app/

Mikkel Høgh: Drupal is still a gated community


In a recent post to his site Mikkel Høgh makes the suggestion that Drupal is still a gated community, mostly as it relates to the process around the "Project Applications" process.



One of the things the Drupal community prides itself on, is how open the community is. And that is generally true, but there's one exception. And that is the Kafkaesque horror-show we subject any newcomers that would like to publish their code on Drupal.org to. It goes by the name of "Project Applications". I know several people who've hit this wall when trying to contribute code. It's not uncommon to wait several months to get someone to review your code. And when it does happen, people are often rejected for tiny code style issues, like not ending their comments with a period or similar.


He talks about other factors involving reviews and delays that can also cause authors to abandon their work and feel "unwelcome and unappreciated". He mentions the "review bonus" system and how it's used to encourage participation (or "more hoops" as he puts it) from other authors. He notes that this situation mostly relates to those new to the tool and community and suggests that it just doesn't work (and really is unnecessary). He ends the post with a call to "end the madness" and move to a standardized role that would allow developers to publish without pushing people away and making them feel unwelcome.


Link: http://mikkel.hoegh.org/2015/05/14/drupal-is-still-a-gated-community/

NoCapes Podcast: Interview with Luke Stokes


The NoCapes podcast has posted their latest episode, hosted by PHP community member Kayla Daniels. In this new episode she talks with Luke Stokes of FoxyCart.



In this episode of NoCapes, Luke Stokes discusses the journey towards hypermedia APIs, what is it and why hypermedia APIs are important.


You can watch this latest episode either on the NoCapes site or over on YouTube directly. If you enjoy the show you should subscribe to their mailing list and get more information as it's sent.


Link: https://www.youtube.com/watch?t=39&v=j43ZYS_wc8g

Marc Aube: Design Pattern: Specification


Marc Aube has a new post to his site that introduces you to the specification design pattern, a technique that's useful for ensuing the current state of an object is valid.



The specification pattern is a software design pattern used to codify business rules that state something about an object. These simple predicates determine if an object's state satisfies a certain business criteria. They can then be combined to form composite specifications using logical operators. Use a specification to encapsulate a business rule which does not belong inside entities or value objects, but is applied to them.


He suggests a few things the pattern could be useful for like validating the current state or define how an object should be created. He gives a few more "real world" examples and then gets into the code to create a custom specification. In his "CustomerIsPremium" spec he defines a single method on an interface to determine if the Customer given is correct. He then creates a class instance and encapsulates the logic inside its "isSatisfiedBy" method. He also includes a bit more complex example, showing how to create a composite specification for handling grouping like "and", "or" and "not" assertions. Finally he looks at how to build specifications that can be passed in and used as selection criteria. He does point out that this can leak database handling into the specification layer, however, and should really be avoided without a inversion of control method in place.


Link: http://marcaube.ca/2015/05/specifications/

Treatment Update

Hi Everyone,


I know it’s been a little while since I’ve sent an update, but happily that is because there hasn’t been much to report. I am still on the same clinical trial, and had a scan a month back that showed some tumor growth and some tumor shrinkage – this is what they refer to as “stable disease”. I’m still tolerating the treatment pretty well.


That said, my doctor is a little concerned about some growth we’re seeing in one of my lymph nodes and we’re starting to take steps towards a different treatment so that we’re prepared in the event that my next scan shows more tumor growth than we’re comfortable with.


So that’s pretty much where things are.


I’m having good days and bad days. It’s harder for me to do physical things – probably no golf for me in the foreseeable future, and even long walks can be a challenge. However, I’ve been able to focus enough on my good days to tinker a bit on the computer and make some progress building a web app I’ve wanted to create for a while.


I’m also enjoying spending time with the family, and am looking forward to some trips to visit family in Seattle and Minnesota this summer. Caitlin and I are reading quite a bit together, and she’s getting better and better at reading things for herself.


I’ll let you all know if/when things change with my treatment.


This post is part of the thread: Cancer – an ongoing story on this site. View the thread timeline for more context on this post.

2015年5月22日星期五

Site News: Popular Posts for the Week of 05.22.2015

Popular posts from PHPDeveloper.org for the past week:

Bigcommerce Engineering Blog: PHP Memory Optimization


On the Bigcommerce Engineering blog there's a new post sharing a few tips for memory optimization in your PHP applications. This includes tips you can implement at a code level without too many changes to the server or the need for external services.



Lately, I've been working on optimizing the memory of some of our backend PHP applications and wanted to share some of the tricks that I have come across, especially dealing with large set of data using PHP.

Each of their tips includes code to illustrate the technique:



  • Always cap your internal in-memory caching
  • Use layered caching
  • (Freeing) DB Resources
  • Free large blocks of memory


Some of the examples include output from the scripts showing the reduction (or non-growth) of the peak memory usage of the script.


Link: http://bigeng.io/post/119546277718/php-memory-optimization

NetTuts.com: Programming With Yii2: Timestamp Behavior


NetTuts.com has posted the next part of their "Programming with Yii2" tutorial series today. This new tutorial in the series focuses on the use of the timestamp behavior to assign the current date to an object (like for create or update dates).



In this tutorial, we'll explore Timestamp Behaviors, which reduce the amount of code you need to write with each new model for the common operation of creating timestamps for inserts and updates. We'll also dive into the Yii2 source code, examining how a behavior is implemented.


He starts with a brief look at what behaviors are (a reminder for those that may have already read about the sluggable and blameable behaviors). He then gets into the Timestamp behavior specifically and how to apply it to the sample project's "Status" instances. He shows the updates needed for the behavior configuration and rules. He also looks inside the component at the code that makes it up and the "touch" method it provides.


Link: http://code.tutsplus.com/tutorials/programming-with-yii2-timestamp-behavior--cms-23329

Nate Krantz: How I'm Writing Unit / Functional Tests


In a recent post Nate Krantz has shared some of his own methods around writing functional and unit tests.



So...testing. That thing that everyone says is so important but you don't really learn about it in school. I've had some trials and tribulations with testing so I'm going to just dump out some thoughts here.


He starts with a bit of background on his own experiences in development and how he finally decided that testing would "solve everything". He started with unit tests (for a CodeIgniter application) and how he got them up and running. He talks about issues he found around dependencies (and static methods) and how he made use of mocks to reduce some of the issues with dynamic loading, at least how CodeIgniter does it. Unfortunately, this didn't work out as planned so he fell back to a test database and create more effective and simpler functional tests. Code examples are sprinkled through out the post to show how he was trying to solve the problem at different points in the process.


Link: http://www.natekrantz.com/why-test-driven-development-rocks-sucks/

Disable Website Notification Prompts in Safari

safari-allow-notifications


Oh thank goodness.

2015年5月21日星期四

Site News: Blast from the Past - One Year Ago in PHP

Here's what was popular in the PHP community one year ago today:

PMG Blog: Symfony from Scratch


In the latest post to the PMG blog Chris Davis shows us how to create a Symfony application from scratch, that is without using the Symfony Standard repository/skeleton application.



The end goal here is to have an application that will send a simple Hello World message. So we're going to cover the core framework stuff, but save things like templating, database access, ORMs, and forms for later. The goal here to see how to scaffold a Symfony app to better understand why symfony standard does what it does and where to deviate. We'll end up with an app that uses the Symfony 3 directory structure.


Starting with the smallest "composer.json" he can (just symfony/symfony) he walks through the creation of the application one step at a time:



  • The Application Kernel
  • Handling Web Requests
  • What's in a Bundle?
  • Stepping into Configuration
  • AppBundle
  • Hello, World


The end result is a simple page outputting a "Hello, World" message, but it gives you a good foundation to work from and understanding of the simplest pieces needed to make a Symfony application.


Link: https://www.pmg.com/blog/symfony-from-scratch/

Frank de Jonge: Rendering ReactJS templates server-side


Frank de Jonge has posted a tutorial to his site showing how you can render React.js templates server-side in PHP. He makes use of the V8JS extension to execute Javascript inside of PHP and echo out the rendered result.



The last couple of months I've been working with ReactJS quite extensively. It's been a very rewarding and insightful journey. There is, however, one part that kept coming back to me: server-side rendering. How on earth am I going to use ReactJS when I want to render my templates on the server? So, I sat down and looked at the possibilities.


He suggests two options, running a small Node application or using the V8JS extension, and opts for trying the second option to meet his needs. He talks about the "why" of rendering server-side JS and gives a brief introduction to V8JS and the workflow he'll follow to use it. He helps you get this library via Composer to make working with it easier and provides an example of how to use it. After trying out this method, he then goes back to option #1, the small Node application (what he ended up choosing). He walks through the setup of this application, showing how to set it up inside a Lumen application and using Express to output the generated templates and data. He then hooks this into the PHP application via a simple HTTP client grabbing the results and pushing them back out to the page.


Link: http://blog.frankdejonge.nl/rendering-reactjs-templates-server-side/

Matthew Weier O'Phinney: Splitting the ZF2 Components


Matthew Weier O'Phinney has a recent post about recent work that's been done to split up the componenents in Zend Framework 2 into their own repositories and linked as dependencies.



Today we accomplished one of the major goals towards Zend Framework 3: splitting the various components into their own repositories. This proved to be a huge challenge, due to the amount of history in our repository (the git repository has history going back to 2009, around the time ZF 1.8 was released!), and the goals we had for what component repositories should look like. This is the story of how we made it happen.


Matthew talks about the methods that were used to split things apart, even more so than they already were. While the components could be installed separately before, the methods used to get there were "cringeworthy". He talks about the different methods they've tried and the version bump issue that came with them, even when no changes were present. He talks about the ultimate goal of the refactor and the techniques to get there - a combination of grafts, subtree, subdirectory-filter and tree-filter through git. He covers some of the "stumbling blocks" they hit along the way including empty merge commits. The end result was a one-line command that could be executed and split out the provided component (well, with a lot of help behind the scenes).



He ends the post talking about the speed of the extraction process (hint: parallel processing is a happy thing), the ultimate results of the entire framework being split and a few lessons they learned along the way.



Link: https://mwop.net/blog/2015-05-15-splitting-components-with-git.html

SitePoint PHP Blog: Bootstrapping a Laravel CRUD Project


The SitePoint PHP blog has kicked off a new series about using the Laravel framework to create a basic CRUD application relatively easily.



In this tutorial, we're going to build and run a simple CRUD application from scratch using Laravel 5.


The target audience for the tutorial are those completely new to the world of Laravel so they start at the beginning. He walks you through the creation of a new Laravel project and the database setup and configuration. He goes through the creation of "resourceful routing" and using the Laravel "artisan" command line tool to generate the matching controller. From there he talks about views and Blade templating followed by the creation and execution of the needed database migrations. The tutorial wraps up with a look at the model system included with Laravel and how they fit in with the Eloquent ORM.


Link: http://www.sitepoint.com/bootstrapping-laravel-crud-project/

iMessage feature request: show the recipient’s cur…


iMessage feature request: show the recipient’s current time. I’d like to avoid buzzing a friend’s phone in the middle of the night when they are (unbeknownst to me) traveling in Europe.


2015年5月20日星期三

Community News: Recent posts from PHP Quickfix

Recent posts from the PHP Quickfix site:

Fred Muya: Configuring Custom Logging in Laravel 5


Fred Muya has posted a guide to his site today showing you how to configure custom logging in your Laravel 5 application. He replaces the default logging methods with an injected Monolog instance.



I recently started working on a Laravel 5 project, and I'd like to share how I set up my custom file logging. I pooled the information below from several sources (acknowledged at the bottom of the article).

He walks through each step you'll need to configure the logging:



  • Overriding the bootstrap ConfigureLogging class (including the code needed)
  • Updating your composer.json to change up the PSR-4 autoloading
  • Modifying the Kernel.php file to update the constructor for the bootstrap (both HTTP and Console)


With these changes in place you can then use the normal "Log" handling Laravel provides and the magic will all happen behind the scenes. He includes two examples of this, one with a simple log string and another with something a bit more complex (and the resulting log output).


Link: https://blog.muya.co.ke/configure-custom-logging-in-laravel-5/

Matthew Weier O'Phinney: PSR-7 Accepted!


As Matthew Weier O'Phinney mentions in his latest post, the PSR-7 standard (HTTP) has passed and is officially accepted as a standard by the PHP-FIG group.



The road to PSR-7 was a long and winding one. It started in summer of 2012 as a draft proposal on HTTP clients by Benjamin Eberlei, during which others proposed that perhaps a smaller standard on the HTTP message interfaces themselves - which would also allow targeting server-side applications, as those rely on the messages.


He follows the proposal's flow through the PHP-FIG process, pointing out several others who contributed along the way and what changed along the way. He also includes a section of thanks for some of the other developers and PHP-FIG members that made contributions along the way.


Link: https://mwop.net/blog/2015-05-18-psr-7-accepted.html

NetTuts.com: Programming With Yii2: Blameable Behaviors


NetTuts.com has continued their series about programming with the Yii2 framework with this new tutorial talking about blamable behaviors. These behaviors can de defined similarly to a common concept in other languages/tools, mixins



In this tutorial, I'll guide you through another of Yii2's interesting behaviors: helping automate the common web development task of assigning created by and updated by user_ids across the models in your web app using DRY coding and Yii2 BlameableBehavior. We'll also create a log that records who updated the Status table for every change made.


In his example he shows the code needed to insert and update these two dates related to users of your system. He shows what kind of updates are needed to support it in your migrations and adding in the support for the BlameableBehavior in the models. He then modifies this example to not only log the latest person to modify a record but a history of IDs in a "status log" table.


Link: http://code.tutsplus.com/tutorials/programming-with-yii2-blameable-behaviors--cms-23287

SitePoint PHP Blog: Youtube Videos in PHP: Categories, Search and Suggestions


The SitePoint PHP blog continues their series showing how to integrate content from the YouTube API into your application with this new tutorial. It covers the use of categories, searching and suggestions.



In the first part, we introduced the Youtube API and built a small demo to list the most popular videos on Youtube. In this part, we will extend our application to have search functionality, and we'll also list the available categories on Youtube to let the user narrow down their area of interest.


He starts with with the updates you'll need to make to the routes and controllers for the "categories" functionality and the API call needed to popular the content. He updates the "videos" page to show the category information and integrate the category into the pagination. Next up is the search, allowing the users to find videos based on a search string. The search route/controller/view functionality is added as well. He ends the post talking about a way to extend the demo and advice to keep an eye on quotas and implementing cache.


Link: http://www.sitepoint.com/youtube-videos-php-categories-search-suggestions/

BeMyCTO.com: Why Doctrine ORM is not suited for PHP


The ByMyCTO.com blog has a recent post that makes the suggestion that the Doctrine ORM isn't suited for PHP...or to put it another way why they think it's not a good option for database integration.



I know, this title sounds like a troll. But it's not, it's a fact. I'm not saying Doctrine is a bad technology or shouldn't be used. I'm just saying it's not suited for PHP and this can lead to critical problems if misused.

He covers a few different topics including:



  • Differences between Java and PHP (and the fact that Doctrine's inspiration was Hibernate)
  • The "session problem" (entity serialization)
  • Identity Map, useless in a stateless environment
  • UnitOfWork, far too complex
  • EntityManager, too magical


Despite all of these points, he does remind the reader that Doctrine isn't useless or inherently bad, it's just that he sees it as reinforcing bad behaviors and suggests using something else.


Link: http://blog.bemycto.com/software-architecture/2015-05-17/doctrine-orm-not-suited-php/

The Secret, Custom Web Applications That Power Viget

At Viget, we specialize in solving business challenges with custom software.



Most of the time this means finding new opportunities and solving existing problems for clients. But between projects, we turn our problem-solving machinery to work for ourselves.



Viget has made some great public apps over the years (SpeakerRate, PowWow, Shorter Order, Baby Bookie, SocialPiq, etc.), but we've made even more that have never been known to the public... until today.


Why Custom?



We love well-made services. Services like Google Apps, Slack, GitHub, and Harvest power the very core of our business. But for more specialized applications, third-party services often fail to capture nuances that are important to our specific manners of working.



Building our own custom software tools allows us to work more time- and cost-efficiently than we ever could relying on third-party tools alone.



And concepting, creating, maintaining, and enhancing our own business-critical applications has been essential training in empathy for the product owners with whom we work everyday.



The Apps



Vigesafe



To keep projects moving seamlessly, we need to share information. But to keep projects safe, we need to cautious about who we share with, and how we share.



Vigesafe is our internal safe place. It lets us share what we want with who we want, whenever we want.



Vigesafe 1 Vigesafe 2



Pearl



Recruiting is a resource-intensive process. Managing hundreds of applicants all at different stages in the process, and organizing feedback for each one of them is a challenging affair.



Pearl is a beautiful JavaScript application and supporting API that helps organize this monumental effort.



Read more about how we built Pearl in just two days.



Pearl



Vigeviews



Basecamp and other project management applications work great for project communication, but what about organizing everything else that goes into building an app?



We needed a better solution for organizing information around in-development apps, so we built VigeViews. Now our wireframes, design comps, notes, and checklists live side-by-side, organized by where they live in the app.



VigeViews 1



VigeViews 2



Vroom



Working with team members across the country demands the ability to immediately find and book shared offices for spontaneous collaboration. We love Google Apps, but a calendar just wasn't cutting it.



Vroom is an interface over Google Calendar that allows you to grab the perfect room at a moment's notice.



Note: We're rebuilding Vroom and letting it out into the wild very soon as Graba. Grab a spot on our beta waitlist at graba.io.



old room index



old room show



Viget Spots You



We like our Vigets healthy. That's why we created Viget Spots You, the employee gym benefits system that actually gets you to the gym.



It works with Foursquare to keep tabs on how many times you've been to the gym. Hit your target, and get reimbursed for the membership.



Learn more at spotsyou.com.



Viget Spots You



Cropduster



Time is at the very heart of services companies like Viget. How are we spending our time now? How could we spend it better in the future?



Cropduster turns our time-tracking data into actionable insights. And it works seamlessly with our preferred time tracking system, Harvest.



bar chart



pie chart



Cerebro



Working together in-person with colleagues brings us joy each and every day. But on some days, life dictates where and when we work.



Cerebro is an application that listens in on our Slack messages to keep track of where everyone is at a given moment.



cerebro go



Reaper



Reaper is our self-service vacation time tracker. Like our other time-oriented tools, it works directly with Harvest. Easy peasy.



Reaper



Idea Jar



We like to share our ideas with the world on our four blogs. But it's easy to lose track of our thoughts in the heat of battle.



Idea Jar is a simple application we use with Slack to keep tabs on these ideas.



idea-jar-1



idea-jar-2



Oxcart



Peer feedback is the most meaningful and valuable element of our review process. But sometimes gathering this feedback from busy team members can feel like herding cats.



Oxcart is our automated tool for managing this feedback solicitation process.



Oxcart



Statwall



To produce the best content for our blogs, we have to know our audience.



Not all of us are Google Analytics data wizards, so we built Statwall, an at-a-glance blog metrics dashboard powered by our Google Analytics data.



statwall globe



Watchdog



We work with a lot of web applications and websites. It's critical that the right people are always in the know about the status of a particular application.



Watchdog is our custom overlord service that automatically watches over products of interest, and informs the appropriate people when there's an issue.



watchdog



Enhance



We often find ourselves needing to draw attention to a particular area of an image (for work and for fun). Not all of us have fancy graphics software or the time to build these images from scratch, so we built Enhance.



enhanced



Early Bird



One of nicest perks of employment at Viget is paid conference attendance. Organizationally, however, this perk can be rather complicated to support.



Early Bird is our system for cataloging worthwhile conferences, organizing the conference request process from start to finish, and tracking attendance and costs.



Early Bird



Motor Pool



(Coming Soon)



Viget employees are privileged to be able to participate in a number of awesome company events each year. One of the trickiest parts of planning these events is simply getting people to and from the grounds.



And while we have an organizational dream team, custom software allows them focus on what's most important.



Motor Pool





Building our own apps is an essential component of Viget's "find a problem, then go solve it" culture.



In addition to solving real business challenges, working on these softwares has given many of us the opportunity to be full-fledged product owners. Others have been able to dabble in areas of interest outside of their professional specialty. All of us have sharpened our product development chops. And we even had some fun along the way.



Do you think your company could benefit from custom software? Let us know here.

2015年5月19日星期二

Community News: Latest PECL Releases for 05.19.2015

Latest PECL Releases:
  • stomp 1.0.8
    - Fix perm on source files. (Remi)
    - Fixing PHP_STOMP_VERSION constant, per Remi's request. (Gennady)


  • yaml 1.2.0
    New Features:
    - #69617 Allow unserialize for !php/object to be disabled

    New yaml.decode_php ini setting to enable/disable serialized php object
    processing. Deployments relying on !php/object are encouraged to
    explicitly set yaml.decode_php=1 as default will change to disabled in
    a future release.

    Bugs Fixed:
    - Honour --with-libdir
    - Fix package.xml schema validation
    - Add const for pointers where possible
    - Explicitly cast emalloc returns
    - #69465 Resolve quoted and non-specific scalars as strings
    - #69616 Fix double free when unserialize fails


  • hprose 1.5.3
    Fixed a bug of instance method service.


  • rdkafka 0.0.2
    Fixed package


  • rdkafka 0.0.1
    First release


  • trace 0.3.0
    ### Added

    - Added support for special function calls: `main`, `include`, `require`, `Closure`, `Labmda`, `eval()`
    - Added support for PHP 5.1
    - Keep collecting and sending back trace information after PHP bailout
    - Added duplexing to communication module
    - Compatible with Trait Alias
    - Added checking for ZTS (Thread-safety support) during configuration

    ### Changed

    - Refactor the PHP extension
    - Unified the naming convention of Type, Function, Macro
    - Change License to Apache 2.0
    - Change Extension's name to "trace" (php is redundant for a PHP extension)
    - Improve representation of `zval` and support for Array, Object
    - Improve performance when trace if off
    - Limit the length of print arguments and retvalue

    ### Fixed

    - Fixed handling of large or small double value that needs scientific notation
    - Fixed memory leaks related with SDS


  • stomp 1.0.7
    - add LICENSE file as documentation (Remi)
    - Fixed Windows compilation regression due to new TCP_NODELAY code. (Gennady Feldman)
    - Fixed bug where error checking was missing after stomp_send(). (Gennady Feldman)


  • APM 2.0.3
    Fixed:
    - Double initialization of request data.
    This could lead to data being present twice in DBs (reproducible with both SQLite and MySQL enabled).
    Changed:
    - Default value of apm.dump_max_depth decreased to 1.
    With today's application complexity, the amount of data collected in stacktraces
    including arguments can lead to several thousands of MiB of memory consumed.
    We recommend increasing this value with care.
    - Weird things could happen when changing 'apm.enabled' during a request. It doesn't make much sense to support
    in request activation/deactivation. 'apm.enabled' is therefor now PHP_INI_SYSTEM.


Sound of Symfony: Episode 8 - Concerning command buses


The Sound of Symfony podcast has released their latest episode today, episode #8 - Concerning command buses with hosts Magnus Nordlander and Tobias Nyholm and special guest Matthias Noback.



In this episode we talk to Matthias Noback about command-query separation, command buses, hexagonal architecture, REST and his library SimpleBus.


You can listen to this latest episode either through the in-page player or by downloading the mp3 of the show. If you enjoy the topic or the show be sure to also subscribe to their feed to get this and future episodes as they're released.


Link: http://www.soundofsymfony.com/episode/episode-8/

Lorna Mitchell: PHP7: Easiest Upgrade Yet


In her most recent post Lorna Mitchell talks about her own experiences in getting a current application upgraded and ready to run on PHP7. It can best be summed up in a tweet from her: "Total lines of code change needed to make the @joindin API work on PHP7: zero"



With PHP7 looking increasingly stable (relatively speaking, it's still pre-alpha so it's VERY early days and anything could happen!), and work going well on the GoPHP7-ext project to get extensions converted, I have been thinking about the migration guides we'll need to help people upgrade their existing applications. To this end, I took the simplest project I currently have (http://api.joind.in) and gave it a whirl on PHP7, using Rasmus' PHP7 dev box. [...] All in all, it wasn't a great study of what kinds of things can go wrong when upgrading projects, because as far as I can tell with the test coverage that we have, it Just Works (TM).


She points out that a major contributing factor to it "just working" in PHP7 probably has to do with the few amount of dependencies. She also suggests looking at the tools you do use and see if they're already doing work to make it cooperate on PHP7 when the time comes. She describes some codebases that should "just work" with PHP7 including smaller codebases and things created with more modern tools/libraries/frameworks/etc.


Link: http://www.lornajane.net/posts/2015/php7-easiest-upgrade-yet

Anthony Ferrara: Prefix Trees and Parsers


Anthony Ferrara has a new post, following up from his previous look at tries and lexers, continuing along the path to apply what he learned to a HTTP routing system.



In my last post, Tries and Lexers, I talked about an experiment I was doing related to parsing of JavaScript code. By the end of the post I had shifted to wanting to build a HTTP router using the techniques that I learned. Let's continue where we left off...


He starts off with thinking that lexing and parsing the routes out into their respective tokens instead of breaking them up as many do (i.e. splitting on the slashes). He shows the results of this lexing and some parser code to handle these results and turn them into something useful. He did find that the current setup caused a lot of overhead (255 new states per character) so he optimizes the processing with a "default" trie but it was still pretty intensive.



He decided to go a different way at this point, opting for the radix tree structure instead. He includes the implementation of this tree for parsing the routes and his matching lexer updates. Finally he shows how to apply code generation to the results of these changes and how coming back to the "slash splitting" could help...


Link: http://blog.ircmaxell.com/2015/05/prefix-trees-and-parsers.html

NetTuts.com: Using Laravel 5's Authentication Facade


The NetTuts.com site has a new tutorial posted today sharing more information about the authentication facade in Laravel 5 and how to use it to implement simple, custom authentication handling.



Authentication is a part of almost all the web applications you work with. It's really boring to keep repeating all the boilerplate code in every project. Well, the good news is Laravel 5 rids you of this boredom by providing a ready-to-use authentication facade. All you need to do is configure and customize the authentication service provider to your project's needs. In this quick tip, I am going to show you exactly how to do that.


It's a seven step process to get things up and running (it sounds like a lot but all the code is provided):



  • Setting Up the Environment
  • Setting Up the Migrations
  • Configuring the Registrar Service
  • Updating the User Model
  • Updating the View
  • Securing Your Routes
  • Modifying the Default Authentication Routes


Each step includes the code needed and a brief summary of what's happening and how it effects the overall authentication setup. He also ends the post with a brief mention of the "password reset" email functionality and where the content for that email is located.


Link: http://code.tutsplus.com/tutorials/using-laravel-5s-authentication-facade--cms-23461

PHP Town Hall: Episode 41: Loosely Town Hall - Dallas Edition


The PHP Town Hall podcast has posted their latest episode recorded live at the Lone Star PHP conference this year (2015). In episode 41, Loosely Town Hall - Dallas Edition, they're joined by Loosely Coupled podcast hosts Jeff Carouth and Matt Frost.




This episode is brought to you from thunderstruck Dallas, as part of the awesome conference that is Lone Star PHP. We are joined once again by the dynamic duo Jeff Carouth and Matt Frost off of the Loosely Coupled podcast!



We mostly make a bunch of bad jokes then drag up the audience to talk about stuff. Lets be honest, this was a bit of a crapshoot, but Elizabeth Smith goes into some detail on PECL and the problems of ownership. PSR-7 is chatted about for the 19th time and Jordi talks a bit about pickles. Also, we debate "haytch" vs. "atch" as the correct pronunciation of the "H" in HTTP. Important stuff.




You can listen to this latest episode either via the in-page audio player or by downloading the mp3 of the show. If you enjoy it, be sure to subscribe to their feed to get the latest episodes as they're released in the future.


Link: http://phptownhall.com/blog/2015/04/18/episode-41-loosely-town-hall-dallas/

How to run a customer journey mapping workshop

To map the customer journey it is necessary to speak to a lot of people. Often the easiest approach is to run a workshop. But how exactly would that work?

I’m a fan of customer journey mapping. It is a great way of engaging companies with the user’s experience and identifying shortcomings in the way they operate. I’ve written before about why I believe it is such a useful tool and how to gather the data required to create a customer journey map.


What I did not write about in my previous article is how important it is to get input from people across the organisation. This is especially true for those who work with the customer on a daily basis.


Running a customer journey workshop is often a convenient way of engaging with many stakeholders. It is also great for getting key influencers to start thinking about the users experience. But how do you run a workshop like this?


The first thing is to know what you want from the workshop.


Ensure you have clear goals


The goal of the customer journey workshop is not just to map the customer journey. In fact it is unlikely you will be able to create a detailed customer journey map in a day. Instead expect to walk away with a draft of a single journey for one type of user. If you are lucky you might cover two, but don’t expect that.


The aim of customer journey mapping isn’t to map every nuance of the users experience. You are not trying to create a realistic representation of every users experience. Instead you are trying to tell a story. A story you can circulate around the company to engage people with the idea of customer service. Something to get them thinking.


The workshop helps in that regard. It will focus key influencers from across the organisation on the importance of user experience. It educates them so that they better understand how to serve their customers and carry out further research.


The process of creating a customer journey map also helps identify weak points in the customer journey. Places where the organisation is letting customers down and processes need to change.


It is important to keep these goals in mind. It is easy to get sucked into endless discussions over different paths the user might follow. Pick a path and tell that story.


With these goals clear in your mind the next decision is who to invite to the workshop.


Who to invite


There are two types of people that you should invite to a customer journey mapping workshop. There are those who understand the customer journey and those who do not but our key influencers in the organisation.


It is often senior management who fall into the latter category. The more senior you are the less you have to do with customers. Yet the more your decisions impact their experience.


That is why these people need to attend a customer journey workshop. It helps focus them on customer needs and shows them the consequences of some of their decisions.


That only works if you also have people who understand the customer journey in the meeting too. Most obvious source of these people are customer service staff. Those who engage with users on a daily basis. They will have invaluable anecdotes of failures in user experience. Stories you can incorporate into a customer journey map.


But there are other people with a contribution to make. Marketers often have insights into user behaviour based on market research they have carried out. Digital teams also have good contributions to offer. Contributions based on usability testing and analysis of web analytics.


Make sure that when these people attend the meeting they bring any research or data they have on users. The more material you have to work with, the easier the session will be and the less reliant it will be on personal opinion.


How to run the session


Running a customer journey workshop is not as hard as you might think. Different people run these workshops in different ways. But the approach I have settled on is straightforward and you could run it without trouble.


Identify the key stages of user interaction


Begin by identifying the key stages a customer passes through in their interaction with your company. This often involves stages such as:


  • Discovery.

  • Research.

  • Purchase.

  • Delivery.

  • After sales.

It is important to note this will vary depending on the nature of your product or service. There is no right or wrong way to organise your stages so feel free to decide on a model together in the workshop.


Identify the information you want to map


The second decision the group needs to make is what information you want to map about the user. What do you need to know at each of these key stages in their interaction. Again, this is up to you. But some typical areas are:


  • Tasks. What is the user trying to achieve at this stage?

  • Questions. What does the user want to know at this stage?

  • Touchpoints. How does the user interact with the organisation at this point?

  • Emotions. What is the user feeling at this stage in the process?

  • Weaknesses. How does the organisation let the user down at this stage?

Create your customer journey grid


With those two decisions made you can now create a grid with key stages on one axis and information to gather on the other.


Your basic customer journey map should look something like this.
Your basic customer journey map should look something like this.

It is important to stress that the final customer journey map doesn’t need to look like this. But this provides a framework you can work with.


I recommend getting a large roll of paper and covering an entire wall with this grid. As big as you can.


Start by working together


Now as a group work through the first column. For each row start writing information on post it notes and add it to the grid. For example what tasks is the user trying to complete in the discovery phase? Write each task on a separate post it note and add it to the appropriate cell on the grid.


The reason to write them on post it notes is that as the day goes by you may well restructure the grid. You may also decide that a task happens later in the process.


Where possible use the data and information people brought along to inform what goes on your post it notes. But if in doubt, guess. You can always confirm your guess after the workshop. It is better to maintain momentum than get stuck on part of the grid.


Work in small groups


By the time you reach the bottom of the first column people will have got the idea. At this point I tend to split attendees into pairs (or small groups depending on numbers). I then give each pair a column to work through by themselves. This speeds up the process and also stops the day getting too monotonous.


Once the pairs have finished their columns we come back together to discuss. This ensures everybody is in agreement even if they didn’t produce that column themselves.


That is it. But what happens after the workshop is just as important.


Would you like some help running your customer journey mapping workshop? If so, you know where to find me!


Post workshop


There are two dangers of a customer journey workshop.


The first is that the journey maybe inaccurate. It is never going to be perfect, but it should at least be representative of reality. That is why you should spend some time after the workshop validating the results. You don’t need to make this complicated. It just means passing it by some customers and getting their feedback.


The second danger is that the customer journey map just ends up in a draw somewhere, unused and forgotten. To prevent this it needs converting into some kind of engaging format that everybody in the company can see.


That might be a poster, a video or some kind of interactive application. Whatever the case you must present this in a way that engages people. That means getting a designer to work with it. They can produce something understandable and attractive.


A customer journey map needs to be easy to grasp and engaging.
A customer journey map needs to be easy to grasp and engaging.

A storytelling tool


At the end of the day a customer journey map is a storytelling tool, not an academic tool. It needs to end up as a simple representation of the customers experience. Something that people can easily take in and something that influences how they think about the role of the company.


A good customer journey map allows people to see problems with the way their business works in a glance and inspires them to fix things. That is something worth a days workshop.








2015年5月18日星期一

Marc Morera: Defeating Expression Language


Marc Morera has a new post to his site wanting to help you defeat Symfony's expression language and perform the same functionality, just more on the code side (another option).



How beautiful Expression Language definitions are, right? I mean, inserting that complex expressions in a Dependency Injection configuration file is so nice and fast if you need to inject the result of a method in a service (one of the multiple examples we can see). [...] This is not a bad idea, really, but because we are engineers and we should have as much information as possible in order to be able to choose between the best option, always, I will show you another way of defining this piece of code.


He shows how to write some code using the Factory design pattern structure to reproduce a bit more complex piece of expression language. He shows the setup of the services.yml file to define the "managers" and classes/services to be injected. He also notes that this removes the need for the "symfony/expression-language" dependency and makes things more portable in the future.


Link: http://mmoreram.com/blog/2015/05/18/defeating-expression-language/

Anthony Ferrara: Tries and Lexers


Anthony Ferrara has an interesting new post to his site talking about tries and lexers, two pieces of a puzzle that are used during script execution. In this case, he's tried his hand at writing a parser which, naturally, lead to needing a lexer.



Lately I have been playing around with a few experimental projects. The current one started when I tried to make a templating engine. Not just an ordinary one, but one that understood the context of a variable so it could encode/escape it properly. [...] So, while working on the templating engine, I needed to build a parser. Well, actually, I needed to build 4 parsers. [...] I decided to hand write this dual-mode parser. It went a lot easier than I expected. In a few hours, I had the prototype built which could fully parse Twig-style syntax (or a subset of it) including a more-or-less standards-compliant HTML parser. [...] But I ran into a problem. I didn't have a lexer...


He starts with a brief description of what a lexer is and provides a simple example of an expression and how it would be parsed into its tokens. He then talks about the trie, a method for "walking" the input and representing the results in a tree structure. He shows a simple implementation of it in PHP, iterating over a set of tokens and the array results it produces. He then takes this and expands it out a bit into a "lex" function that iterates over the string and compiles the found tokens.



From there he comes back to the subject of Javascript, pointing out that it's a lot looser than PHP in how it even just allows numbers to be defined. His testing showed a major issue though - memory consumption. He found that a regular expression method consumed too much and tried compiling out to classes instead (and found it much faster once the process was going).


Link: http://blog.ircmaxell.com/2015/05/tries-and-lexers.html

Peter Petermann: A few thoughts about composer and how people use it


In the latest post to Peter Petermann's site he shares a few thoughts about Composer and how people use it in the more modern PHP ecosystem.



Composer has changed the PHP ecosystem like now other tool introduced - almost everyone is using it today. Now, I have written about Composer before, and have always been a big proponent of using it. However, as i have spend some time with looking more closely on a few things, there is a few problems (some with Composer, some with how people (ab)use Composer) that I would like to write about.

He's broken the list up into six different point, each with a bit of explanation:



  • Composer gets slow and resource hungry
  • People are using composer as an installer
  • People use their own paths
  • People don't adhere semver
  • People don't tag their releases / don't release
  • People release packages with dependencies to unstable versions


He ends the post by looking at each of these points and offering a brief one-liner way to help solve the issue (or at least minimize the problem).


Link: https://devedge.wordpress.com/2015/05/16/a-few-thoughts-about-composer-and-how-people-use-it/

Simon Holywell: Memoization or function cache


Simon Holywell's latest post shares an interesting feature of PHP's static function handling that lets you cache the results of a function call to improve performance.



A little known feature of PHP's static keyword is that it allows for memoization or function caching. This is a process whereby a functions heavy lifting can be cached so that subsequent calls are faster. It is possible to store any value in a memoized way such as arrays or even objects. This is done without any external side effects - that is to say that the code calling the function will require no changes to support memoization.


He includes an example of this in action, showing the use of a "static" keyword on a variable over two function calls. He goes through and explains how it works and the flow of the simple function. He builds this up a bit and shows the same functionality in the handling (and parsing) of a JSON document. He then gets more into the "real world" usage of this kind of static handling, pointing out that it can be very useful for caching without the need for an external service (like memcache or redis). His final example shows the caching of a function call using the same method and dependent on the arguments provided.


Link: https://www.simonholywell.com/post/2015/05/memoization-or-function-cache/

Ross Tuck: How I Use Traits


Ross Tuck has posted a new article to his site today talking about how he uses traits in his applications and where he sees them having the most value.



Recently, a few folks asked about a trait in a new project I wrote. Right around the same time, Rafael Dohms showed me his new talk about complex cognitive processes we don't notice. Because my brain is a big mushy sack, the two blended together. The result was this post, which tries to capture how I use traits but also how I decide to use them in the first place.


He starts off with a bit of talk about leverage versus abstraction and how the concepts relate to code. He includes a brief example of each and points out that, while each is good, abstraction tends to be more useful. He then applies this back to the world of traits, how they compare to the use of normal static methods and how they have an advantage of encapsulation without oversharing. He suggests that assertions are more fit as static methods and that traits are a better fit in cases where multiple inheritance is needed. He also touches in interfaces in traits and his opinion on when is the best time to use them.


Link: http://rosstuck.com/how-i-use-traits/

Quick IoT Prototyping with Ruby/Rails and the Spark Core

The Internet of Things revolution is upon us. Our phones are getting smarter, internet is becoming more accessible, even dogs have connected accessories. Making these products isn’t limited to electrical engineers or obscurely funded start-ups; with a little bit of programming knowledge and the right tools, you can make your own connected ______ in no time.


A Brief Introduction



Arduino



An amazing player in the “making hardware easy” space. The company and project itself is open sourced, accompanied by a massive community, and is the go-to solution for many hobby hardware projects. Bringing these projects online has long been doable, but was expensive and challenging before Particle came along.



Particle (formerly Spark)



Another awesome company with a great community that entered the playing field in 2013. The Spark Core, Particle's flagship product, has significantly lowered the barrier for making connected devices. Programming them is as easy as programming an Arduino, but these guys connect to the internet out of the box (with wifi credentials) and allow for uploading code online.



Ruby and Rails



Ruby on Rails has been powering modern websites for nearly ten years, including many of the sites built here at Viget. Ruby remains one of my favorite languages to code in through the years and Rails makes it ridiculously easy to create a fully functioning website in minutes.



Establishing Communication



With a mild understanding of the above technologies, and a Spark Core in your possession (or better yet, the newer-better-half-as-expensive Photon), you’re ready to go.



The power that a Spark Core gives you is one of easy internet access. If you’re familiar with Arduino development, you know that the software you write follows a setup/loop pattern. You define the setup and loop functions in your code, and after booting up the chip runs setup once, and then loop infinitely. Defining your online endpoints on a Spark Core is a simple matter of defining available functions and variables in your setup:




void setup() { Spark.function("setColor", setColor); Spark.variable("buttonStatus", &buttonStatus, STRING); }


Then, with the use of the Ruby Spark gem, you can easily call your defined functions and retrieve accessible variables using Ruby like so:




# ruby require "ruby_spark" core = RubySpark::Core.new(spark_access_token, core_id) if core.variable("buttonStatus") == "pressed" core.function("setColor", "red") end


Pretty straight-forward Ruby code here, we’re checking to see if the buttonStatus variable is equal to “pressed”, and calling the setColor function on the Core if it is. OVER THE INTERNET!



Putting the Pieces Together



Since we have the power to control our Spark Core with Ruby, we can throw this code into a Rails application, push it up to a free Heroku instance and our device suddenly has it’s very own online interface. This means that as long as your Spark Core is on and connected to the internet, you can interact with your device from anywhere in the world.



I’ve put together a sample Rails application, currently live at particle-interfacer.herokuapp.com. The code is available on github. This app can make function and variable calls to your Spark Core like the ones mentioned above, and is meant to demonstrate just how easy it is to whip up a connected device.



screenshot



Using these concepts, we could similarly build a button that literally does anything online (oh hey Dash), a thermostat that’s controlled by your phone (Nest), or a refrigerator that does your shopping for you (this one might be harder… but doable!). The point is, we have the tools that lowers the barrier for creativity, which is a great thing. Join me in making the world a cooler, quicker, and likely much weirder place!

2015年5月15日星期五

Site News: Popular Posts for the Week of 05.15.2015

Popular posts from PHPDeveloper.org for the past week:

FogCreek.com: How to Find, Hire, and Retain Developers - Interview with Cal Evans


On FogCreek.com they've posted a new interview they recorded with PHP community member Cal Evans about how to find, hire and retain developers for your business.



We've interviewed Cal Evans, author of 'Culture of Respect', and we discuss how to find, hire, and retain Developers. He gives tips on where to find great developers, how to write job ads which appeal to them and how best to interview them. We also discuss ways to build a great team culture that can help startups and growing businesses compete with the big guys for talent.


You can catch the interview in a few different ways - either through the in-page video recording, audio-only over on SoundCloud or you can download it for listening offline.


Link: http://blog.fogcreek.com/how-to-find-hire-and-retain-developers-interview-with-cal-evans/

Product & Support: Interview with Taylor Otwell


The Product & Support site has posted an interview with Taylor Otwell, the creator of the Laravel framework. In it they talk about what Laravel is, how it treats users as "customers" and the community around it.



Taylor is the creator of Laravel, founder of Laravel Forge and founder of Envoyer . I spoke with him about open source software and making the transition to entrepreneurship.


Taylor also answers questions about the ecosystem around the framework (marketing, documentation, etc) and how its helped the popularity of the framework. He also shares a few things he might have changed if he could start over with Laravel, including features he feels are "overdone". They also talk about Taylor's move from a full-time job into being self-employed and how that works with two large open source projects to maintain. Check out the full interview for the answers to these and other questions.


Link: http://productandsupport.com/taylor-otwell/

Acquia Blog: Web Accessibility Tips for Developers - Part 2


The Acquia blog has posted the second part in their series sharing tips for developers around web accessibility. In this new post they focus on page content and making things accessible.



We're at the halfway point of what hopefully has been a helpful guide for developers to make a website accessible for all visitors. (If you missed the first part of this two-part series, please click here.) In this blog, we'll review how instructional text, navigation, and other parts of development can allow those with blindness and low vision, deafness, and other disabilities to make full use of a website.

In the post they share helpful tips on:



  • There's a Proper Place for Instructional Text
  • A Search that Searches When Instructed
  • Jump Directly to Main Content
  • An Easier Way to Zoom and Shrink
  • Know What to Show; What to Hide


Each item comes with a brief summary (and screenshots where it helps) to illustrate the point.


Link: https://www.acquia.com/blog/web-accessibility-developers-part-2

PHP.net: Release of PHP 5.4.41 & 5.5.25


The latest versions of the PHP language in the 5.4.x and 5.5.x series have been released - PHP 5.4.41 and PHP 5.5.25.



These releases both fix several bugs including seven security related issues around the

Run Geek Radio: Episode 003 - OpenWest Namebadges, Overtraining, Dev Salary & Freelance Rates, [...]


The Run Geek Radio podcast, with host and PHP community member Adam Culp, has released its latest episode - Episode 003 - OpenWest Namebadges, Overtraining, Developer Salary and Freelance Rates, Saving Money.



Adam Culp talks about the awesome namebadges at the OpenWest conference, and how assembly was required using a soldering iron. Then shares symptoms, causes, and treatment for over-training while running. (mentions Tension Tamer tea, but intended to speak about Sleepy Time tea instead) Following this the subject of developers and money was covered. What should developers charge per hour, what should a freelance developer pay themselves, and what should developers do to save money for a rainy day.


You can listen to this latest episode either through the in-page audio player or by downloading the mp3 of the show. If you enjoy it, be sure to subscribe to the feed too for more shows in the future.


Link: https://rungeekradio.com/episode003/

2015年5月14日星期四

Site News: Blast from the Past - One Year Ago in PHP

Here's what was popular in the PHP community one year ago today:

Zend: Turbocharging the Web with PHP 7 (Infographic)


In the /r/php subreddit on the Reddit.com site there's a new post that links over to this infographic from Zend sharing some of their own benchmark results for PHP 7 (and comparing it to other versions).



We ran performance benchmarks on popular PHP apps to compare PHP 5.6, PHP 7, and HHVM 3.7.

Their benchmarks includes results for:



  • Magento (1.9)
  • Drupal
  • WordPress
  • Laravel and Zend Framework
  • SugarCRM


They also compare PHP 7 against other languages, showing the execution in seconds when generating a Mandelbrot fractal.


Link: http://www.reddit.com/r/PHP/comments/35vf1y/get_performance_insight_into_the_upcoming_release/

Symfony Blog: Call for Papers for SymfonyLive London, Berlin and Paris Announced


On the Symfony blog today they've announced the opening of the Call for Papers for SymfonyLive London, SymfonyLive Berlin and SymfonyLive Paris (happening in September, October and December respectively).



The Call for Papers for SymfonyLive London, SymfonyLive Berlin and SymfonyCon Paris are currently all open! If you ever wanted to speak at a Symfony conference, you have now 3 chances to make your dream comes true.


The post includes details about each of the conferences including the dates, an overview of the event, the speaker package and - of course - a link to the respective Call for Papers. There's also a few helpful tips for speakers wanting to increase their chances of being selected (such as submitting more than one talk or submitting on unique subjects).


Link: http://symfony.com/blog/speak-at-a-symfony-conference

SitePoint PHP Blog: Displaying Youtube Videos in PHP


The SitePoint PHP blog has a new post today showing you how to display YouTube videos inside your application as a part of this series. The series is using Laravel as a framework to create the application.



In this two-part article, we're going to learn how to work with version 3 of the Youtube API and we'll build a demo along the way. [...] We're going to build a demo that lets the user browse popular videos on Youtube, search for a video, browse videos by categories, and select a video to watch. I will be using Laravel 5 as my framework of choice, and Vagrant for my development environment.


The end result will show a set of video thumbnails related to the selected category. He walks you through the steps to get the application set up and running including the configuration of your Google API connection. He creates a login controller to allow users to log in with their Google credentials and the callback to handle the API response. From there he makes the YouTube service provider, the "video list" endpoint (and view) and a single video page with an embedded player.


Link: http://www.sitepoint.com/displaying-youtube-videos-php/

Pádraic Brady: PHP's "Magic Hash" Vulnerability (Or Beware Of Type Juggling)


Pádraic Brady has a new post to his site talking about the recently announced (but actually relatively old) issue with PHP hash comparison, the "magic hash" issues.



A while back, I noticed a flurry of activity around a somewhat obvious outcome of PHP's type juggling antics. As the snowball gathered pace and grew, it's being more widely reported as a vulnerability dubbed "Magic Hashes". What is this mysterious potential vulnerability in PHP applications? The vulnerability is a straightforward outcome of PHP's type juggling antics.


He talks about the == (double equals) versus === (triple equals), how they differ and how the use of the triple equals basically negates this issue. The problem comes back around to PHP's type juggling and how it assumes equality based on the data given. He includes some specific examples showing places the issue can happen even when comparing two variables of the same type. He also makes a mention of another issue that can come in separate from this called timing attacks and how to prevent them as well.


Link: http://blog.astrumfutura.com/2015/05/phps-magic-hash-vulnerability-or-beware-of-type-juggling/

Laravel Podcast: Episode 27 - Jeffrey Way: Tau Ceti Murderer


The Laravel Podcast, with host Matt Stauffer and guests Taylor Otwell and Jeffrey Way, has posted their latest episode (#27): Jeffrey Way: Tau Ceti Murderer.



This week the crew discusses new Laravel 5.1 goodies, unit testing, Lifeline for iOS, and which album they would take to a desert island.


You can listen to this new episode using the in-page audio player or by downloading the mp3. If you enjoy the show, be sure to subscribe to their feed too and get more great episodes as they're released.


Link: http://www.laravelpodcast.com/episodes/11430-episode-27-jeffrey-way-tau-ceti-murderer

Should you work alone or with others?

In an upcoming episode of the podcast we are discussing the pros and cons of going into business with others.

As part of our season on running your own web design business we are going to tackle working with others. Should you setup a business with somebody else and if so how should that work?


As somebody who has worked with others and by myself I see pros and cons to each approach. I have had partners and employees. Both provide benefits and challenges.


Carl Smith will be joining us on the show as he has had similar experiences of working for himself and as part of a team at ngen. I am sure he will have a lot to add to the conversation.


But most importantly we want to hear your experiences. What challenges have you faced working alone? What do you miss about working with others? What questions do you have about going down the partnership route? What fears do you have? Do you have any stories to share. Put them in the comments.