2014年10月31日星期五

Laravel News: Setting up Laravel Elixr with Bootstrap


On the Laravel News site today there's a tutorial posted showing you how to set up an application that uses Elixir and Bootstrap for the layout of an application. Elixir is a wrapper for gulp, a build tool for node.js apps.



One exciting feature coming in Laravel 5 is the new Elixir package. At its core it is a wrapper around gulp to make dealing with assets easier. For my first look at this new tool I decided a good use case would be to setup Bootstrap and get everything working just like you would in a real world scenario. If you are not familiar, bootstrap includes three main components. CSS, JavaScript, and custom fonts. So we need to account for all those in our setup.


They walk you through the Elixir installation process (via node) of Gulp and setting up dependencies via Laravel's included "package.json" definition. He then shows how to install bower (another package manager) and use that to install the Bootstrap files (SASS version). Finally they show how to bootstrap these into your application's workflow - the SASS imported from bower, the fonts/javascript pulled in by gulp and finally the Elixir setup to merge them all together.


Link: http://laravel-news.com/2014/10/setting-laravel-elixr-bootstrap/

NetTuts.com: Programming with Yii2: Getting Started


On the NetTuts.com site today Jeff Reifman has kicked off a new series of posts introducing you to the Yii2 framework and what it has to offer. In this first post he starts with the basics - installation, setup and configuration of a Yii2 application.



This tutorial will walk you through installing Yii 2.0, setting up your local development environment, building a simple Hello World application, setting up your remote production environment for hosting and deploying your code from a GitHub repository.


He walks you through the install process, via Composer, and creating a new project, the "Hello World". The tutorial also helps you set up a local development environment with MAMP and what the resulting page should look like when loaded. He then gets into some of the architecture of a Yii-based application and starts in on the "Hello World" controllers and views. He finishes the post with a look at setting up a remote server (not localhost) and pushing the application out, complete with commands for server setup and software configuration (like Apache).


Link: http://code.tutsplus.com/tutorials/programming-with-yii2-getting-started--cms-22440

Sound of Symfony Podcast: Episode 5 - The no-theme all-content episode


The Sound of Symfony podcast has released their latest episode - Episode #5: The no-theme all-content episode with hosts Magnus Nordlander and Tobias Nyholm



In this episode we don't have a specific theme. We do however have a lot of fun content for you. We discuss Magnus' trip to Symfony Live New York, the Best Practices document, Blackfire.io (née SensioLabs Profiler) and much more. We also have a long interview with Jordi Boggiano of Composer fame, and two short interviews with Jeremy Mikola and Anne-Sophie Bachelard respectively.


They also talk about the PHPStorm plugin for interaction with SensioLabs Insight, WurstCon and Jordi's Toran Proxy work. You can listen to this latest episode either through the in-page player or by downloading the mp3. If you enjoy the episode, be sure to subscribe to their feed to get the latest episodes as they're released.


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

That Podcast: Episode 9: The one that wasn't invented here


The latest episode of That Podcast, hosted by PHP community members Beau Simensen and Dave Marshall, has been posted - Episode 9: The one that wasn't invented here.



Beau and Dave give updates on their recent shenanigans, conferences, health, talk about the NIH and cloning discussions that have been had recently in the community, side projects, games, and two factor auth.

Topics mentioned in this episode (it's a long list, but here's a few) include:




You can listen to this latest episode either through the in-page player or by downloading the mp3 itself. If you enjoy the episode and want to hear more, be sure to subscribe to their feed to get the latest.


Link: http://thatpodcast.io/episodes/episode-9-the-one-that-wasn-t-invented-here/

2014年10月30日星期四

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

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

Community News: Packagist Latest Releases for 10.30.2014

Recent releases from the Packagist:

Anthony Ferrara: Foundations Of OO Design


In his newest post Anthony Ferrara looks at some of the things he calls the foundations of object-oriented design, as set of three things (and principles) to keep in mind when working on OOP applications.



It's quite easy to mix up terminology and talk about making "easy" systems and "simple" ones. But in reality, they are completely different measures, and how we design and architect systems will depend strongly on our goals. By differentiating Simple from Easy, Complex from Hard, we can start to talk about the tradeoffs that designs can give us. And we can then start making better designs.


He starts with the "simple vs easy" concept and how sometimes making the two meet can be difficult. He includes an example of interdependent interfaces and how they add complexity (and, in turn, make them less easy to use). He also talks about accidental versus essential complexity and how, sometimes, "accidental" isn't always a bad thing. Finally, he wraps it up with a few principles to remember in your development including recommendations to reduce (accidental) complexity and keeping the target developers in mind, making it easiest for them to use.


Link: http://blog.ircmaxell.com/2014/10/foundations-of-oo-design.html

SitePoint PHP Blog: 5 Easy Ways to Get Started with PHP on Vagrant


On the SitePoint PHP blog there's a new tutorial showing you how to get started with Vagrant and PHP to create easier, more flexible development environments via virtual machines.



Vagrant is a tool for creating and managing virtual environments that help many developers not have to care about the "works on my machine…" problem. Vagrant creates reusable development systems that can be used again and again, helping you keep your system clean of too many installations.

They offer "five easy ways" to get started including various tools and services:




You can find summaries about each of the items on the list as well as links to more information in the full post.


Link: http://www.sitepoint.com/5-easy-ways-getting-started-php-vagrant/

2014年10月29日星期三

Community News: Recent posts from PHP Quickfix

Recent posts from the PHP Quickfix site:

Community News: Packagist Latest Releases for 10.29.2014

Recent releases from the Packagist:

Beth Tucker Long: How to Submit a Talk to a Conference


If you've ever considered taking the leap and trying your hand at speaking at (technology) conferences but weren't sure where to start Beth Tucker Long, well known PHP community member and speaker, has posted a guide to help you submit a talk to your conference of choice.



I've been on both sides of the proverbial conference table. I have been the one submitting proposals, hoping against hope that they will pick mine, and I have been on the selection committee, struggling to choose between hundreds of awesome proposals when you only have a few talk slots available. Through these varied experiences, I've learned a few things about what works and what doesn't when submitting a conference proposal.


She provides a "checklist" of sixteen things that she's learned over the years about submitting ideas to events and what to do/not do when giving the actual presentation including:



  • First and foremost, remember to hit spell-check
  • Don't talk about yourself in your talk description
  • Explain the practical applications of your topic
  • Share past feedback in the comments or notes section
  • Submit a lot of proposals
  • Don't submit multiple topic ideas or variable time lengths in one submission


The final three on her list have more to do with the presentation itself than the proposal and, in my opinion, are almost more important: don't talk down to your audience, be brief and be interesting.


Link: http://www.alittleofboth.com/2014/01/how-to-submit-a-talk-to-a-conference/

Anna Filina: Reduce number of queries


In her most recent post Anna FIlina makes a recommendation to those looking to increase the performance of an application, especially one that's already in place: simply reduce the number of queries. It sounds simple enough, but can sometimes prove to be difficult depending on the application.




Customers often call me because their site is slow. One of the most common problems I found was a high number of queries that get executed for every single page hit. When I say a lot, I mean sometimes more than 1000 queries for a single page. This is often the case with a CMS which has been customized for the client's specific needs.



In this article, aimed at beginner to intermediate developers, I will explain how to figure out whether the number of queries might be a problem, how to count them, how to find spots to optimize and how to eliminate most of these queries. I will focus specifically on number of queries, otherwise I could write a whole tome. I'll provide code examples in PHP, but the advice applies to every language.




She suggests starting from "the top", looking at the browser's own information on which pieces of data are taking the longest to return back to the client (the latency). This gives a starting direction and tells you where to look for the worst offenders. She talks about a technique to locate and count the queries being made and some common issues found in multiple kinds of software (hint: loops). Then she gets down to the optimization - combining similar queries and better queries through joins.


Link: http://afilina.com/reduce-number-of-queries/

PHP.net: New Supported Versions Timeline Page


The PHP.net website has introduced a new feature to help make it a bit clearer which versions of PHP are supported and which have reached their end-of-life mark. This new Supported versions page off the main site provides listings of currently supported versions and graphical timelines of past (and future) support milestones.



Each release branch of PHP is fully supported for two years from its initial stable release. During this period, bugs and security issues that have been reported are fixed and are released in regular point releases. After this two year period of active support, each branch is then supported for an additional year for critical security issues only. Releases during this period are made on an as-needed basis: there may be multiple point releases, or none, depending on the number of reports.


The page includes information on when the initial release in a series was made (like the 5.4.x or 5.5.x series), when active support did/will end and how long the timeline is for security fixes and support. As of the time of this post, PHP 5.3.x is the only series that has reached end-of-life, but the 5.4.x series is coming close being in security fix only mode now and EOL-ing completely in ten months.


Link: http://php.net/supported-versions.php

2014年10月28日星期二

Community News: Latest PECL Releases for 10.28.2014

Latest PECL Releases:
  • timezonedb 2014.9
    Updated to version 2014.9 (2014i)


  • pq 0.5.5
    - Re-add the default configureoption for the PEAR/PECL installer
    - Let JSON be decoded to arrays unless the fetch type is FETCH_OBJECT
    * Fix remaining build issues


  • pq 0.5.4
    * Fix build on MacOSX


  • pq 0.5.3
    + Add PostgreSQL-9.4beta3 type OIDs
    * Fix JSON dep (Remi)
    * Fix build on MacOSX


  • yar 1.2.4
    - Fixed bug "can not get fd from curl instance" on MacOS and Windows
    - Add Yar_Concurrent_Client::reset to meet #26
    - Fixed build with libcurl-7.12
    - Enable msgpack prompt in package.xml


  • yac 0.9.2
    - Add --with-system-fastlz option


  • yaf 2.3.3
    - Fixed build with PHP-5.6


Community News: Packagist Latest Releases for 10.28.2014

Recent releases from the Packagist: