 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
MaltBlue.com: Using ZFTool for Basic Project Management
by Chris Cornutt June 17, 2013 @ 11:18:42
Matthew Setter has posted a new tutorial about using the ZFTool functionality of Zend Framework v2 for managing your project's settings and configuration.
Welcome to another tutorial. Today, I will be giving you a walk through of zftool, which provides basic tooling support in Zend Framework 2. If you're new to Zend Framework, or have been reading the introductory series here, it can come in quite handy. But unlike other frameworks, such as Yii (through yiic) and Symfony (via the Command Line tool), the tooling support in Zend Framework 2 is rather light on. These respective tools provide rather robust support for automatically generating models from database connections, checking logs and a host of other much required functionality.
He shows you how to do a few things with the ZFTool - create a new project, make some modules inside it, build an autoloader classmap and check the installation with some basic diagnostics. Command examples and configuration samples are included in the post to help you along.
voice your opinion now!
zftool zendframework2 tutorial introduction project module diagnostic
Community News: The PHP Internals Book
by Chris Cornutt June 11, 2013 @ 10:44:33
For those that are interested in how PHP works "under the covers" and maybe want to get started writing your own extensions for it, you should check out the PHP Internals Book. It's a collaborative effort between Julien Pauli, Anthony Ferrara and Nikita Popov.
There are three primary goals of this book: Document and describe how PHP internals work, how to extend the language with extensions, how you can interact with the community to develop PHP itself. This book is primarily targeted at developers who have experience in the C programming language. However, where-ever possible we will attempt to distill the information and summarize it so that developers who don't know C will still be able to understand the content.
The book is a work in progress, but they're off to a good start. They already have sections covering some of the basics of working with classes and objects (including iterators and "magic interfaces").
voice your opinion now!
internals book online introduction language development
NetTuts.com: Whoops! PHP Errors for Cool Kids
by Chris Cornutt June 06, 2013 @ 10:46:12
On NetTuts.com there's a new post spotlighting an interesting tool you can use to help make debugging an easier (and prettier) experience in PHP, the Whoops library.
Whoops is a small library, available as a Composer package, that helps you handle errors and exceptions across your PHP projects. Out of the box, you get a sleek, intuitive and informative error page each time something goes pants-up in your application.
It provides you with detailed error messages, a "code view" of where the error was found, support for Ajax/JSON requests and providers for several popular frameworks. The system is made up of a set of handlers that execute in order to provide the resulting page of output. He goes through how to install the tool (via Composer) and what you'll need to know to put it to use. He shows how to change up some of the configuration options and add in some extra info to the output. There's also a section specifically about integrating it with the Laravel 4 framework.
voice your opinion now!
whoops error output composer tutorial introduction
PHPMaster.com: Understanding Recursion
by Chris Cornutt June 06, 2013 @ 09:32:41
On PHPMaster.com today there's a new tutorial posted that talks about something that can be a more difficult concept for budding developers to grasp - recursion.
In one of my previous articles I wrote about iterators and how you can use them. Today I'd like to look at the fraternal twin of iteration: recursion. A recursive function is one that calls itself, either directly or in a cycle of function calls. Recursion can also refer to a method of problem solving that first solves a smaller version of the problem and then uses that result plus some other computation to formulate an answer to the original problem.
He starts with an example - one function showing how to calculate a factorial using just looping and the other by having the function call itself. He talks some about the different types of recursion (direct/indirect) and gives a more practical example, a "find in array" function for one with nested subarrays. He also briefly mentions "head" and "tail" recursion, the difference being if it waits for a return value or not. He also offers some general advice when it comes to using recursion and how you have to watch for optimization issues.
voice your opinion now!
recursion tutorial introduction head tail direct indirect
PHPMaster.com: Aura.Web Aura's Page Controller for MVC
by Chris Cornutt June 05, 2013 @ 09:58:42
On PHPMaster.com today Hari K T has spotlighted one of the components from the Aura framework, the Aura.Web component.
MVC is an acronym that means Model-View-Controller. In this tutorial I would like to introduce you to Aura.Web, the controller component of the Aura Library. Here I'll show you how to use it to build your own controller, and also how to use a response transfer object to issue HTTP response headers, and integrate a templating engine like Mustache for rendering views.
He starts off with an overview of how the component is architected and how it is used to create controllers and what dependencies it needs injected. He talks about some of the objects and the methods they provide and includes some sample code for a basic "Index" controller. He shows how to integrate the Mustache templating engine for output and how to work directly with HTTP responses.
voice your opinion now!
auraweb aura framework page controller mvc tutorial introduction
MaltBlue.com: Zend Framework 2 - The New HTML5 Form Fields
by Chris Cornutt May 29, 2013 @ 09:33:59
Matthew Setter has posted another in his series looking at the Zend Framework v2 and some of its features. In this new post he focuses on the HTML5 form field support that comes bundled with recent versions.
In this tutorial, I'll be taking you through a few of the new HTML5-specific form elements available in the new Zend Framework 2. We'll see: how they work, how to use them, so you can also see what they're like. This will be coupled with a good set of screenshots - so you know what they look like. By the end of this tutorial, you should be well on your way to being able to have fully HTML5 interfaces in your applications.
He starts off by talking about HTML5 elements in general, pointing out a few reasons why to use them, complete with statistics to back them up (of mobile usage where HTML5 can be handy). He focuses specifically on four different elements - the telephone input field, email field, URL field and the date/time selector. He gives examples of each and screenshots of what they look like on a mobile device (iPhone in this case). Complete code is included to create the elements as well.
voice your opinion now!
tutorial html5 elements zendframework2 introduction screenshot
Michelangelo van Dam: UA Testing with Selenium and PHPUnit
by Chris Cornutt May 24, 2013 @ 10:18:40
In this new post to his site Michaelangelo van Dam looks at user acceptance testing with PHPUnit and Selenium.
Last week I spoke at php[tek] 2013 where I explained to people how to get started with Selenium IDE to record user interaction with the web interface, convert them to PHPUnit testcases and automatically execute them on multiple browsers on multiple platforms. The twitter I also received a bunch of questions regarding how to set up multiple platforms and why I used Windows in my presentation to deploy to. So today I deceided it was time to write a full article on this subject.
He introduces Selenium and what kinds of things it can be used to test. He also defines "user acceptance testing" and talks about why they're an important part of the testing ecosystem. He then walks you through the process of getting the testing environment set up, creating a few tests and how to convert them over to PHPUnit tests (using a built-in tool). Screencasts show you each step of the way. He includes a little tweaking you'll need to do to to the test code to get it working with your own Selenium server
voice your opinion now!
useracceptance testing phpunit selenium introduction
Lorna Mitchell: Simplest PHP Generator Example
by Chris Cornutt May 23, 2013 @ 10:31:02
On her blog Lorna Mitchell has posted an example of a basic generator written in PHP, a feature of the upcoming PHP version 5.5.
I really like the generators feature that's arriving in PHP 5.5, and since we're now into release candidate releases, it's actually not that far away. I've been speaking on this topic and I thought I'd share my trivially simple code example from my slides.
She includes an example of a very basic generator using the new "yield" keyword and how to implement it in a simple foreach loop. There's also a little talk about when is a good time to use generators in your applications (two examples: complex number calculation and working with large data sets a chunk at a time). For more information on how these generators will work, check out this page in the PHP manual.
voice your opinion now!
generator simple example introduction manual
NetTuts.com: How to Create a PyroCMS Theme
by Chris Cornutt May 21, 2013 @ 11:19:25
On NetTuts.com today there's a new tutorial posted showing you how to create a theme for PyroCMS, an open source, PHP-based content management system with a large user base and community.
Like most content management systems, PyroCMS uses front-end themes. Though PyroCMS themes are built a bit differently than what you might be used to from other systems, they're still quite easy to create. They're so easy, in fact, that very little PHP experience is required to assemble them!
He walks through things like the folder structure of the templates directory and how to get started on a custom "Foo" theme of your own. He covers how to lay out the HTML markup for the theme and how you can use partials for the sections of the site. He briefly touches on using multiple layout files and how to use different layouts shown only to mobile devices.
voice your opinion now!
pyrocms theme tutorial introduction mobile markup patrials
DZone.com: Cloning in PHP
by Chris Cornutt May 17, 2013 @ 11:09:42
In this recent post over on DZone.com Giorgio Sironi takes a look at the "clone" feature of PHP - what it is, how it can be used and things to watch out for in its use.
Cloning is an operation consisting in the duplication of a data structure, usually to avoid the aliasing problem of having different code modify the same instance in inconsistent ways. In PHP, cloning can be accomplished in multiple ways - and in some cases it can be avoided altogether.
He talks some about how objects are passed around internally during the PHP execution and how you can tell if a function works with data by reference (from the manual). He then looks at the "clone" keyword and what kinds of things are duplicated from an object when it is used. He briefly touches on the "__clone" magic method for solving the "shallow clone" problem and how, possibly, serializing the object might be a better alternative for reproducing the entire object.
voice your opinion now!
clone introduction object reference serialize shallow deep
|
Community Events
Don't see your event here? Let us know!
|