News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Till Klampaeckel:
Speeding up composer on AWS OpsWorks
October 09, 2013 @ 12:10:25

Till Klampaeckel has a new post today showing how to get your Composer installation (and package install) to work a bit faster on the Amazon AWS OpsWorks management system.

At EasyBib, we're heavy users of composer and AWS OpsWorks. Since we recently moved a lot of our applications to a continuous deployment model, the benefits of speeding up the deployment process (~4-5 minutes) became more obvious.

He talks some about the current needs of their deployment process and how one option - symlinking the "vendors" directory just wouldn't work. Instead, they make use of Ruby and Chef to work with the OpsWorks hook system that fire on deployment. He includes the example Ruby scripts they put in place to handle "before migrate", "before symlink", "before restart" and "after restart" events. This new setup saved them about two to three minutes on their total deployment time and resulted in a much more stable environment.

0 comments voice your opinion now!
amazon aws opsworks composer install ruby chef hooks deployment

Link: http://till.klampaeckel.de/blog/archives/202-Speeding-up-composer-on-AWS-OpsWorks.html

SitePoint PHP Blog:
Git Hooks for Fun and Profit
September 25, 2013 @ 12:45:21

If you're a git user (you do use git, right?), there's a powerful feature that can help perform some automatic actions in your repositories - git hooks. In this new post to the SitePoint PHP blog, Timothy Boronczyk introduces you to them and how to set them up.

When certain commands are run, Git searches the .git/hooks directory for suitable hook scripts which are then executed if found. You'll find a small set of example scripts there (you can activate them by renaming them to remove the .sample prefix and setting their executable bit), and a complete list of hooks can be found in the githooks(5) man page. This article suggests a handful of hooks which can streamline development and help improve your efficiency.

He gives four different examples of checks based on the state of the commit (like pre-commit or post-commit):

  • Lint Checks
  • Spell-Check Commit Messages
  • Checking Standards
  • Automatically Run Composer

Each comes with the example code needed to implement them and some description about what they're doing.

0 comments voice your opinion now!
git hooks introduction example lint spelling standards composer

Link: http://www.sitepoint.com/git-hooks-fun-profit

NetTuts.com:
Setting Up A Staging Environment
February 15, 2013 @ 10:49:39

On NetTuts.com today Gabriel Manricks walks you through setting up a staging environment using Vagrant to install and setup a virtual machine running Apache 2 and PHP 5.4.

Creating a staging environment is specific to your production environment. There is no magic solution that works in every situation. But most cases follow a similar pattern, and I'll cover all the key points as we go along. It's fair to assume that most people deploy their apps with some kind of versioning tool (like GIT). [...] Besides GIT, you have to think about the languages, software, and "special" features your production servers offer.

All of the commands and configuration files you'll need to make the automatic setup work are included in the article. It's based on a Debian (Squeeze) base image and uses packages to install the needed software. They also install other PHP extensions like mycrypt, GD, curl, APC and database support (MySQL, SQLite and Postgres). They help you get Apache set up to serve the application and work with git and its hooks to push the code and run Composer.

0 comments voice your opinion now!
staging environment tutorial vagrant git apache deployment hooks


Diniki.net:
PHP Design Patterns
July 25, 2006 @ 06:08:07

Patterns in PHP are becoming more and more popular, and sites like this one are doing well to provide summaries of each with code examples to help clarify.

Following my petty wingeing about the design patterns in php on the web I have to bite the bullet and do something about it. So here it comes a collection of design pattern examples, some from the GOF book, some collected from around the net, some (maybe) I have discovered.

The intent of these pages is to show the shapes of the patterns not a fully fledged implementation. In real life probably a combination of patterns will be employed. Everyone has their own favourites following their political, religious and style differences.

He admits that the pages are a work in progress and aren't complete, but they're a start to share his studies with the world. His list of patterns so far includes:

with more to come. All of his examples under each pattern are written in PHP.

1 comment voice your opinion now!
design patterns listing control abstraction hooks facade observer design patterns listing control abstraction hooks facade observer



Community Events





Don't see your event here?
Let us know!


community unittest list threedevsandamaybe code library configure series interview install bugfix language application developer release laravel wordpress api introduction podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework