News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Lorna Mitchell:
First Phing Plugin
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.

0 comments voice your opinion now!
phing plugin install build configuration xml helloworld task


Reddit.com:
Fastest MVC PHP Framework Benchmark
August 21, 2012 @ 12:12:48

Over on Reddit.com there's a flamewar...er discussion happening about this set of benchmarks (from 2011) showing things like response time, system load average and a function execution map for several popular frameworks.

In the Reddit comments most people share the similar ideas about the results:

  • "I don't put much stock in hello world bench marks for MVCs. If you just need "Hello world" then write it in html."
  • "Asking which framework is the fastest is almost irrelevant in most cases. I always dislike benchmarks like this because the actual situation is so much more complicated than a handful of benchmarks can show."
  • "Any decent framework can output a simple content page from cache, it should not even have to call any router or controller. That's why simple content benchmarks are useless."
  • "Who cares? The speed of a language or framework does not translate over to the speed of your website. What matters is your architecture."

If you're looking for benchmarks that are more useful than these, I'd suggest checking out (and maybe contributing to) the ones Paul Jones has created over on Github.

0 comments voice your opinion now!
mvc framework benchmark helloworld opinion


PHPMaster.com:
Using Phing
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).

0 comments voice your opinion now!
phing build tool tutorial multiple target helloworld


Dave Marshall's Blog:
Traits in PHP 5.4 - HelloWorld with Logging Trait
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.

0 comments voice your opinion now!
traits example logging zendframework helloworld


Josh Holmes' Blog:
Hello World Azure in PHP
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.

0 comments voice your opinion now!
helloworld azure microsoft tutorial


Zend Developer Zone:
A PHP 'Hello World' Script Using Zend Core for i5
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.

0 comments voice your opinion now!
helloworld zendcore i5 ibm tutorial


Adobe Developer Connection:
Integrated PHP and Flex Development with Zend Studio and Flex Builder
January 07, 2009 @ 08:41:57

On the Adobe Developer Connection site Richard Bates has recently posted a tutorial covering the integration of PHP and Flex as developed in Zend Studio/Flex Builder.

Tight integration between Flex and a server-side language means that your users will have an intuitive, engaging user experience with all the functionality they need. For developers, tight integration between PHP and the Flex development environments can provide big benefits by ensuring a smoother workflow for coding, debugging, and managing a project. You can make the most of such a unified environment by using Adobe Flex Builder and Zend Studio for Eclipse together.

He starts with the basics - installing everything and getting it all up and running, then making a sample "Hello World" application on both the PHP (backend) and the Flex (frontend) sides. Included in the tutorial is a look at sending XML out to the Flex application from PHP.

0 comments voice your opinion now!
flex adobe development zendstudio eclipse helloworld


Abhinav Singh's Blog:
PHP Extensions - How and Why?
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.

0 comments voice your opinion now!
extension tutorial header file config phpize helloworld


Marc Gear's Blog:
How to learn a new PHP framework
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.

0 comments voice your opinion now!
learn framework helloworld calculator guestbook rss parse page


Paul Jones' Blog:
Labor Day Benchmarks
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.

0 comments voice your opinion now!
framework benchmark ab helloworld response



Community Events











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


database package install podcast framework component symfony2 facebook overview opinion release application unittest language introduction security hhvm composer hack performance

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