 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Using Phing
by Chris Cornutt January 05, 2012 @ 10:41:40
On PHPMaster.com today there's a new tutorial posted about using the Phing build tool to automate a process, usually a build for a website launch. In his example, he shows a simple "Hello World" example and how to work with multiple targets in the same build file.
Phing is a PHP project build tool based on Apache Ant. A build system helps you to perform a group of actions using a single command. [...] Phing helps overcome [human error] issues by automating tasks like running unit tests, applying database changes, deploying application code, etc. In this article I'll show you some of the basics of working with Phing.
He includes the commands you'll need to install Phing (if it's not already) via the PEAR installer and a basic "build.xml" file. He explains the parts of the file - tags for "project", "target" "echo" and "property - and includes a more complex build example with multiple targets (and how to call one specifically from the command line).
voice your opinion now!
phing build tool tutorial multiple target helloworld
Dave Marshall's Blog: Traits in PHP 5.4 - HelloWorld with Logging Trait
by Chris Cornutt August 08, 2011 @ 10:24:36
Dave Marshall is already looking ahead to the next major release of PHP, version 5.4, and one of the features it will include - traits. In this new post to his blog, he introduces a "logging trait" he's come up with to make logging simpler in your (Zend Framework) application.
One of the 'traits' I find myself constantly adding to library files is optional logging of it's behaviour. The library class has it's own log method, that checks to see if the instance has had a logger injected and if so, logs the message. I see this as a perfect candidate for becoming a reusable trait, as I tend to have the same code copy/pasted throughout my library classes. The problem is, according to the rfc, traits aren't supposed to have state/properties, which makes it difficult to have a DI setter method in a trait.
He includes the code for his trait example (noting that it may or may not end up working correctly in the 5.4 final release) that sets a logger on a sample class and logs a few values out to the console. It's a simple example, but it shows you one of the most useful things about traits - the "drop in resuability" nature they allow in your libraries and classes.
voice your opinion now!
traits example logging zendframework helloworld
Josh Holmes' Blog: Hello World Azure in PHP
by Chris Cornutt February 11, 2010 @ 13:25:56
For anyone wanting to take those first steps into running PHP applications on an Azure platform, you should check out a new post from Josh Holmes. He describes the process of getting it working from a command-line approach.
I thought we could kick it up a notch [from his previous post] and get PHP running in Azure leveraging the command line tools. The primary thing that we need to do is to copy the PHP bits up with the rest of your deployment and configure the FastCGI handler to know where the PHP interpreter can be found.
Once you get PHP installed testing it out is just a matter of getting his test page in the right directory, updating one of the configuration files (web.roleconfig), creating the Config/Definition files and packaging it all up with cspack. All of the contents for the sample configuration files and a screenshot of the fnal output are included.
voice your opinion now!
helloworld azure microsoft tutorial
Zend Developer Zone: A PHP 'Hello World' Script Using Zend Core for i5
by Chris Cornutt September 24, 2009 @ 08:16:32
New on the Zend Developer Zone is a tutorial showing a "Hello World" setup, configuration and testing of the Zend Core for the IBM i5 series from start to finish.
You've successfully installed the Zend Core for i5. Now what? The process of developing PHP scripts may not be obvious to System i developers familiar with RPG and COBOL. Let's take a look at the basic steps needed to start writing PHP scripts on System i.
They look at where the parts of the application are located, the steps to take to ensure it's running correctly, setting up Zend Studio and a personal development space and creating two simple scripts - one "Hello World" and the other that makes a DB2 connection to the local instance.
voice your opinion now!
helloworld zendcore i5 ibm tutorial
Abhinav Singh's Blog: PHP Extensions - How and Why?
by Chris Cornutt December 12, 2008 @ 11:17:23
Abhinav Singh has posted a guide to PHP extensions - what they are and how to write a simple "hello world" one.
Assuming you have read the previous post, lets discuss on how to build our first PHP extension: every PHP extension is built out of minimum of 2 files, a configuration file (config.m4) which tells us what files to build and what external libraries are needed and source File(s) which will contain the actual functionality.
He builds up an example skeleton for an extension (the config.m4) and explains how the file will be phpized and configured. Next up is the php_sample.h header file where the needed modules are loaded and the sample.c file to define them. Last, but not least, comes the extension code itself that calls the printf function to output the "hello world" message.
voice your opinion now!
extension tutorial header file config phpize helloworld
Marc Gear's Blog: How to learn a new PHP framework
by Chris Cornutt December 11, 2008 @ 10:20:28
In this new blog entry Marc Gear suggests a few things that you can do to help learn a new framework quickly and easily:
There are dozens of PHP frameworks around now, some attracting more attention than others. I am no expert on these frameworks and have not used a single one extensively so I wouldn't dream of recommending one over the other, nor do I want to enter the debate about what is or is not a framework (I'll work on the assumption that anything calling itself a framework is a framework). Instead I'm going to concentrate on how you can get started with a new framework as quickly as possible.
He suggests four examples that can help you get more familiar with each framework and how they're structured - a "hello world" as a first step, creating a simple calculator, making a guestbook and making a simple script to parse and paginate a remote RSS feed.
voice your opinion now!
learn framework helloworld calculator guestbook rss parse page
Paul Jones' Blog: Labor Day Benchmarks
by Chris Cornutt September 02, 2008 @ 07:56:01
Since there was such a good response to his previous framework benchmarking post, Paul Jones has come up with a fresh batch of statistics for the latest versions of several frameworks including the Zend Framework, Solar and CakePHP.
By popular request, here is an update of my web framework benchmarks report. [...] In the interest of putting to rest any accusations of bias or favoritism, the entire project codebase is available for public review and criticism here.
Follows the same methods as before, creating "hello world" controllers in each and running the stats against them with the Apache ab tool. A baseline non-framework example is created and tests are run against different versions (including release candidates) of each framework.
I won't spoil the results - you'll just need to check out his post to see who ranked where.
voice your opinion now!
framework benchmark ab helloworld response
Avent Labs Blog: PHP framework comparison benchmarks
by Chris Cornutt July 02, 2008 @ 08:41:42
The Avent Labs blog has done some basic benchmarking on some of the more popular PHP frameworks out there today. The post includes the tools they used and the full results.
In response to Wil's comment regarding the PHP framework performance comparisons I made in my previous post, I have decided to post the results I got. My decision not post them initially was due to the benchmarks not being done in complete isolation (a separate client and server machine) but the scores relative to each should still be accurate and that's what I am testing for.
He used a machine with a 1.8Ghz sempron chip (running Ubuntu) to run the tests through httperf. His method involved creating the same sort of "hello world" sort of controller to gauge the framework's performance and a baseline procedural version of the same as a guide. His full results are available as a tar file and as a zip archive.
voice your opinion now!
aventlabs benchmark framework helloworld statistics download
|
Community Events
Don't see your event here? Let us know!
|