 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Bob Majdak: On SQL in PHP
by Chris Cornutt May 16, 2013 @ 10:11:29
In a new post to his site Bob Majdak looks at using SQL in PHP and some of the challenges he's come across (some of them with his own tools). He talks about things line inline SQL, loading SQL by unique key or creating a "build object".
There is no right or wrong way, but no matter what there is no *pretty* way to do SQL inside of a PHP application. I have been having a personal debate with myself all week about how to make SQL statements nicer in an application without going to a huge DBAL package like Doctrine.
He looks at each idea and provides some of the pros and cons about each of them, noting that he hasn't quite decided on which is the best method. Some sample code is included to help clarify the points, showing the "find by unique key" version and how a more complex query might be created with the "builder object."
voice your opinion now!
sql load unique key build object pros cons method inline
PHPMaster.com: Maven and PHP
by Chris Cornutt May 09, 2013 @ 12:42:37
PHPMaster.com has a new tutorial posted that introduces you to a build tool that's more common in the Java world but can easily support PHP projects, Apache's Maven.
Apache Maven is a build automation tool with the purpose of building, reporting, and creating documentation of projects. It builds projects using a Project Object Model (POM) and a set of plugins shared by all projects using Maven, thus providing a uniform build system. Once you familiarize yourself with how one Maven project builds, you automatically know how all Maven projects build. [...] Through this article you will gain familiarity with Maven for PHP, and how to install and use the PHP-Maven plugin from the command line and in Eclipse.
The tutorial walks you first through the basic install of Maven and get you started with an example "settings.xml" file helping to set up the PHP-Maven plugin. They help you create your first project using the Archetype plugin and its related "pom.xml" file. The project already has a defined structure (similar to what you might see in a Composer-loadable PHP repo on Github) for the source of your app and the tests. They show you how to hook in PHPUnit and phpDocumentor for testing/dcumentation builds and, finally, how to integrate it all into Eclipse to allow for easier, in-IDE interactions.
voice your opinion now!
maven build tool eclipse tutorial install configure phpmaven
Luis Atencio: Notes on Continuous Delivery - Continuous Integration
by Chris Cornutt March 26, 2013 @ 12:20:31
Luis Atencio has posted the third part of his continuous delivery series (parts one and two), this time with a focus on continuous integration as a part of the process.
This is a continuation from my previous post and overall the series on Continuous Delivery. If you haven't been following, that's okay, every topic is self-contained, so read along. The contents of these posts are taken from the book titled "Continuous Delivery" by Humble and Farley (resources below) overlaid with my own professional experience. In this article, we talk a bit more about Continuous Integration (CI) and some practices developers should follow to ensure a smooth environment.
He talks some about what "continuous integration" is and how much it relies on an automation of the process around your delivery of software. He mentions integration of testing (unit/acceptance/integration) and how it can help discover issues early. He includes a list of essential practices that come along with the idea of CI integration including:
- Don't check in on a broken build
- Keep a stable build at all times
- Anticipate being able to revert your changes
- Using TDD
- Distributed Version Control
He also recommends using any downtime (like waiting on a build to "go green" again) to take a few minutes away from the code - it can benefit you and your code.
voice your opinion now!
continuous delivery overview integration build deploy
Lorna Mitchell: First Phing Plugin
by Chris Cornutt March 25, 2013 @ 10:49:23
In the latest post to her site, Lorna Mitchell walks you through the creation of a first Phing plugin, an extension to the popular PHP-based build tool.
I'm a huge fan of Phing and use it regularly for build and deployment tasks. Often, I'll ask about a plugin that I wish existed, and get a very courteous "patches welcome" from the nice people in the #phing channel on freenode. This has happened a few times, so I thought I should probably look at how to make a new phing plugin, this article shows you how to make the simplest thing I could think of: a simple "hello world" plugin.
She points you to the location to grab the latest version of the tool (the github repository) and how to define a configuration file for your test runs. Then she includes the sample code showing how to create the "HelloTask" plugin. It takes an input value of "name" and displays a greeting when executed. She shows the syntax for defining this in the XML build file and the sample result when executed.
voice your opinion now!
phing plugin install build configuration xml helloworld task
Andrew Podner: Managing PHP Application Builds with Phing
by Chris Cornutt February 04, 2013 @ 09:08:16
Andrew Podner has a new post to his site today introducing you to Phing, a PHP-based build tool (designed after on Apache Ant) that makes automating builds of your applications easy.
One of the things I have been focusing on lately is trying to to a better job of mechanizing and automating the process of building and deploying an application. The reason for this is pretty simple: applications just seem to keep getting more and more complicated and intricate as time goes on. [...] Phing is a "project build system" that helps developers manage repetitive tasks associated with preparation and deployment of applications. Phing uses XML based files to allow you the ability to customize the build process to the individual application.
He walks you through the Phing installation (from PEAR, note that you can install it via Composer now too) and how to set up your first project XML definition. He shows you how to add a "target" or step to the build with the basic example of running your app's PHPUnit tests. He also includes a list of other things Phing can do and work with including CodeSniffer checks, FTP handling, version control interfaces and automated documentation.
voice your opinion now!
application build phing tool introduction phpunit targer xml
Project: Box - Making Creating PHARs Easier
by Chris Cornutt August 24, 2012 @ 10:33:52
There's a new project on Github that wants to help making your phar archives for your PHP applications. The process is a little obtuse right now and Box wants to simplify it.
Box is a library and command line application for simplifying the PHAR creation process. [Features include] creating new PHARs with a simple configuration file, add and replace files in existing PHARs, extract existing PHARs, with option to cherry pick files and verify PHAR signatures.
The project is still relatively young but it looks like it's off to a good start. Phar files are a powerful tool to have in a PHP developer's arsenal but developing them can be a pain. Hopefully something like this can make life easier.
voice your opinion now!
project phar build manage creation github
Anthony Ferrara's Blog: Building A Multi-Version Build System
by Chris Cornutt July 09, 2012 @ 15:42:32
In this recent post Anthony Ferrara has a new post showing how he created a multi-version build system to make working with multiple PHP installs (different versions) simpler....with the help of Jenkins.
I've been using Jenkins to manage builds of my projects for a while now. This was fine for a while, but now that my projects need to support multiple versions of PHP, it left something to be desired. I wanted a system that could build against multiple versions of PHP. And more so, I wanted to be able to build against multiple compiles of the same version (different options, etc). This is how I built just such a system...
He gives an overview of the Jenkins system, the hardware and operating system that runs the server as well as examples of his "php-build" command to generate the different environments. He uses a modified version of the PHP template for Jenkins as a base.
voice your opinion now!
multiversion deployment jenkins build system
PHPMaster.com: Deploy and Release your Applications with Phing
by Chris Cornutt April 12, 2012 @ 08:24:05
In this new post to the PHPMaster.com site today Vito Tardia introduces you to Phing, a tool for making builds and deploying your applications (and it's PHP based!)
Suppose you have a web application that is installed on many hosts. Each installation may have a custom configuration, and the application is still in active development. You need an easy way to deploy new features and bug fixes to all of hosts. [...] In this article I show you how to use this knowledge [from this previous article] to write a boilerplate build file, one that can be customized and reused in your real-world applications. We'll use Phing's Subversion tasks to manage the repository and the FileSync extension to synchronize your local installation with a remote server.
He helps you to get the environment set up correctly (installing the needed PEAR packages), create a basic build file with the FTP settings in it and creating a "deploy" target to do the work. He also shows the settings/configuration involved in a "prepare" target that does the SVN work to do some of the pre-push work. Finally, he shows a "release" target that bundles up the files into a package and pushes it up to the server (via FTP).
voice your opinion now!
deploy application phing build xml tutorial
PHPMaster.com: Continuous Integration (with Jenkins), Part 2
by Chris Cornutt April 02, 2012 @ 08:18:49
Following up from his previous post about setting up PHP with Jenkins, J Armando Jeronymo is back with part two of the series - setting up an example project to show how the pieces fit together.
In the first part of this article I presented the case for Continuous Integration. Now we'll install and set Jenkins up to monitor the automatic building of a simple demonstration PHP application. We'll begin with the demo project, then address Jenkins' installation, and finally set it up and watch it running.
He includes a sample project structure, complete with a PHP class and its tests. He shows how to manually run things first (so you'll know what the commands do), the contents of the class/tests and the example Ant configuration file. He's also included screenshots of the Jenkins interface, showing how to create a build, add a new step and let the build run to evaluate the results.
voice your opinion now!
tutorial jenkins continuous integration phpunit unittest ant build
|
Community Events
Don't see your event here? Let us know!
|