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

NetTuts.com:
Easy Package Management for CodeIgniter with Sparks
November 25, 2011 @ 11:00:51

On NetTuts.com today there's a new tutorial showing off a package management system for the CodeIgniter framework, Sparks, that makes installing and using packages similar to Ruby's gems.

Sparks is a new package-management system for CodeIgniter that extends the core with support for gem-like sparks. This tutorial interweaves an entry-level overview of the architecture and usage of the sparks system with the creation of dovecote-a simple spark for managing RSS data.

The tutorial introduces you to the Sparks system and helps you get it installed and configured to work with a first basic package - a dovecote example. He helps organize and write the first spark as well as set up any dependencies and autoloading it might need. He follows this by adding some functionality to the package to make pushing output to the view simpler.

You can download the source for the complete tutorial's code.

0 comments voice your opinion now!
package management codeigniter sparks ruby gem


DZone.com:
Creating a virtual server with Vagrant a practical walkthrough
November 18, 2011 @ 08:18:45

On DZone.com there's a new post from Giorgio Sironi looking at how to automate a build of a virtual server with Vagrant, setting up a LAMP-based development instance.

Vagrant ia a tool for building virtual machines (in VirtualBox's format) that conforms to a specification. It's written in Ruby, but it makes really no assumptions over the environments that you're gonna build; in this article, we will setup a virtual server for PHP applications running inside Apache.

The end result is a virtual machine based on VirtualBox images and can be built in a few easy steps:

  • install the vagrant gems on the build system
  • add a new virtual box instance pointed to a .box file
  • create the Vagrant config (including the commands to run post-create)
  • set up a little port forawrding
  • creating a phpinfo file and starting up Apache

One suggested place for grabbing images (some with pre-defined software) is Bitnami's "Stacks" repository.

0 comments voice your opinion now!
vagrant ruby gem install tutorial virtualbox image build


Raphael Stolt's Blog:
Measuring & displaying Phing build times with buildhawk
November 22, 2010 @ 10:53:20

Raphael Stolt has a new blog post today looking at his method for measuing Phing build times with the help of a Ruby gem called buildhawk.

Recently I installed a Ruby gem called buildhawk which allows to measure and display the build times of Rake driven builds. As I like the idea behind this tool a lot but mostly use Phing for build orchestration, it was time to explore the possibility to interconnect them both. In this blog post I'll show an implementation of an apposite Phing Logger gathering the buildhawk compatible build times via git note(s) and how to put the interplay between those two tools to work.

He includes the script you'll need to get his example set up - a new logger for Phing that works directly with Buildhawk and stores the information directly into a git note. He includes an example of running the phing build with it enabled and some of the results as exported as an HTML document.

0 comments voice your opinion now!
phing build buildhawk ruby gem statistics


Olek Janiszewski's Blog:
Autotest-like PHPUnit runner for a Zend Framework application
August 30, 2010 @ 13:25:43

On the Continuous Development blog there's a new post showing how Olek Janiszewski came up with a solution to integrate PHPUnit and the Zend Framework via the watchr Ruby gem.

Whenever working on a Ruby project, I'd run autotest with test_notifier to get immediate feedback on my code. Unfortunately, I don't know a similar utility integrated with Zend Framework and PHPUnit. [...] My solution is not as well designed and portable as test_notifier, and it doesn't play as nicely with my Zend application as autotest does with RSpec and Rails. It's more of a quick hack to cover my needs 80% of the time.

The watchr gem changes to the correct directory and runs the usual PHPUnit command (to run all tests) and then captures the output to display back to the client. You end up with messages like these: success, warning and fatal errors.

0 comments voice your opinion now!
phpunit unittest zendframework testing ruby gem watchr


SitePoint PHP Blog:
Introducing pearhub
January 08, 2010 @ 09:11:20

In this new post to the SitePoint PHP blog Troels Knak-Nielsen looking at a new PHP-centric service for creating a resource like the Ruby on Rails "gems" but for PHP software - pearhub.org.

I think services like these are an important reason why gems are so popular amongst Ruby developers, and I figured that PHP really needs something similar. So over the Christmas, I have been brewing on a service, which is now stable enough that I'll make it available to the community at large. pearhub.org provides a place where you can register a project, that is hosted on Github, Google code or similar (Currently only git and subversion is supported). The service will generate a PEAR package and put it on a PEAR channel.

PEAR channels have been difficult to set up in the past but the pearhub.org service makes it simple and you get the added benefit of being able to use the PEAR installer application to do installations and upgrades. You can find out more about the service on their FAQ.

0 comments voice your opinion now!
pearhub pear channel gem


Stefan Koopmanschap's Blog:
PHP Hidden Gem similar_text()
July 13, 2009 @ 09:37:50

Stefan Koopmanschap has written about a hidden gem he discovered in PHP to help locate blocks of text that seem similar from one or more sources - similar_text.

I am working on a hobby project where I aggregate feeds from several different sources. With the blogs I work it right now, it often happens that an author posts the same post to a few different sites. However, because of site formats and sometimes also quick edits an author makes on one site but not on the author, the article contents are usually not identical strings. So I needed something that would help me figure out whether or not two strings are nearly identical.

After Googling around and finding things like the xdiff extension and soundex, he discovered the two functions he needed - levenshtein and similar_text.

I am still trying to figure out which percentage will catch the duplicates but not catch too many posts which are only similar but not actually duplicates, but with the above 75% I seem to catch quite a few duplicates so far.
0 comments voice your opinion now!
similartext gem hidden


Content with Style Blog:
Deploying PHP applications with Vlad and SVN
May 11, 2009 @ 12:50:26

Matthias Willerich has posted a very complete guide to deploying PHP applications from a subversion repository with Vlad the Deployer (a Ruby-based deployment engine).

In my current day job I have to deploy a number of web apps every few weeks. The person I took over from did the whole thing in a manual and terribly cumbersome way. [...] In the following article, I'm going to describe how I went from there to deploying my Zend Framework-driven PHP apps with Vlad. To save yourself some time, feel free to skip the back story, the pre-requisite of installing ruby, gem and rake, or go straight to the deployment recipes.

He wanted a setup that would allow a "one-liner" for deployment, the ability to roll back and to have shares resources between releases. He walks you through the setup of all needed components, the configuration options and some example runs of his build/deploy process.

0 comments voice your opinion now!
deploy application vlad vladthedeployer ruby gem rake tutorial


Johannes Schluter's Blog:
A hidden gem in PHP 5.3 fileinfo
December 17, 2008 @ 09:35:59

Johannes Schluter has pointed out a "hidden gem" for PHP 5.3 in his latest blog post - the fileinfo extension.

This series is not meant to be complete but some personal choice, these blog postings are also no replacement for documentation, but just pointers. My goal is that you try out 5.3 right now so we can fix bugs as soon as possible before releasing it The NEWS file has a quite short entry for my first subject: Added fileinfo extension as replacement for mime_magic extension. (Derick)

He looks at one situation where the extension could come in very handy - getting the content type of the file for a download push - as well as why its better than the older mime_content_type function.

0 comments voice your opinion now!
php5 gem fileinfo mimecontenttype function extension hidden


Zend Developer Zone:
Zend Framework Hidden Gems Zend_Db
December 18, 2006 @ 10:04:00

Aaron Wormus and the Zend Developer Zone have posted the latest edition of their "Hidden Gems" series looking at the lesser-known features of the Zend Framework. This time, it's a look at Zend_Db (database abstraction).

Zend_Db is a layer which sits above the native PDO database extension. Before PDO (pre-PHP5.1) all we had to connect to databases were libraries that were developed in individual cycles and development teams, with little regard to what other database extensions were doing.

Taking this speed benefit of using PDO to do a majority of the work, PDO wrapper libraries like Zend_Db can supplement PDO with their own wrapper code leaving you with a fairly lightweight yet feature-rich database abstraction layer.

Aaron looks at connecting to a database (using both the PDO and DSN connections) and some example code showing how to work with the database using them - including queries and using transactions.

0 comments voice your opinion now!
hidden gem zend framework zenddb database abstraction hidden gem zend framework zenddb database abstraction


Zend Developer Zone:
Zend Framework Hidden Gems Zend_Config
November 24, 2006 @ 11:43:00

The Zend Developer Zone has posted another in the "Hidden Gems" series by Aaron Wormus, this time looking at the Zend_Config component.

Managing configuration is a pretty simple thing to do in PHP, in fact, I'd bet that at some point in their programming career every php programmer has written code. But as soon as you get a bit bigger you realize that you're going to have trouble accessing your configuration variable.

There are many reasons to manage your configuration data indepenantly from your business logic. One common reason is that you don't want to enter your configuration data into the public versioning system that you use.

Aaron looks at how you can use the component in your application easily including an example using the built-in inheritance functionality to easily manage a move from development to production.

0 comments voice your opinion now!
zend framework hidden gem zendconfig inheritance zend framework hidden gem zendconfig inheritance



Community Events





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


release bugfix language community tips voicesoftheelephpant introduction laravel package series library install list interview opinion podcast api framework deployment symfony

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