 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
MaltBlue.com: Zend Form Mastery with Zend_Config - Part 2, Core Form Configuration
by Chris Cornutt May 15, 2012 @ 11:04:01
In his previous post to the MaltBlue.com blog Matt introduced the concept of configuration-driven Zend_Form instances. He's back with a second part to the series, enhancing his original examples by covering some of the base-level form configuration settings.
Ok, this should have been part one, but irrespective, here's the second installment in zend form mastery with zend config - core form configuration. As the W3c Form spec says, there are 8 attributes applicable to forms.
These attributes, including "action", "name" and "onsubmit", can all be set easily in the XML-based configuration file. He includes an example of the full XML file to show how they all fit together (updated from part 1). You can see an example of the output here and can grab the source for the example from github.
voice your opinion now!
zendframework zendconfig zendform generation xml tutorial
Danne Lundqvist's Blog: Getting to grips with an existing XML structure
by Chris Cornutt April 25, 2012 @ 10:44:43
Danne Lundqvist has a new post where he shares a bit of code he's written to "come to grips" with an existing XML structure.
Very often I find myself writing input filters for large XML files using PHP. Common enough task; and PHP offer a great variety of tools to do this effectively depending on the situation. Unfortunately, almost as common is the lack of documentation for the aforementioned XML files. [...] I have looked around for a simple tool but I didn't really find a tool that gave me the quick and dirty overview I wanted. A year or so ago I finally wrote a small PHP class to analyze large XML files.
He includes an example XML file, the HTML output of the parsing and a sample of how to use the class to parse and output the XML structure, complete with some CSS.
voice your opinion now!
xml structure schema parse output html csss
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: Bulletproofing Database Interactions with PHPUnit's Database Extension
by Chris Cornutt April 10, 2012 @ 08:50:10
On PHPMaster.com today there's a new tutorial showing you how to test your application's interface with the database using "bulletproof" PHPUnit testing.
There's already a great article here that discusses Test Driven Development, but did you know that you can also test the code that interacts with your database? Especially if your application is data intensive, subjecting your CRUD code to a battery of tests is good practice that helps ensure that your application is working correctly. In this article you will be learning how to write database tests in PHP using PHPUnit and its database extension.
Included in the post is an example schema and an example of the seed data (defined as XML) for the testing to use as predictable data in its execution. His test class extends PHPUnit_Extensions_Database_TestCase (instead of the usual PHPUnit_Framework_TestCase) and a test for a basic "getArticles" method in his "IArticleDAO" class. By calling the "createXMLDataSet" method, the test loads in the pre-defined XML records and allows the correct evaluation of the assertions,
voice your opinion now!
phpunit unittest database load xml dataset tutorial
Konr Ness' Blog: Zend_Config Benchmark - JSON, Array, INI, XML, YAML
by Chris Cornutt March 08, 2012 @ 11:51:32
In this recent post to his blog, Konr Ness has benchmarked the components that the Zend Framework uses to read in different types of configuration files - JSON, native PHP arrays, INI, XML and YAML files.
If you application relies on parsing one or several config files each time it is bootstrapped it is important that you select a file format that is fast to parse. But you also want to select a config file format that is easy for a human to read and edit. In a recent application I am building I also had the need to write modifications to config files, so I also benchmarked the Zend_Config_Writer components.
He includes both the sample configuration INI file and the benchmarking script he used to measure the results (all configurations were read from external files, even the native PHP option). His results were pretty predictable (with the exception of YAML reading) with the standard INI file coming in second to the native PHP arrays, but having the advantage of being more readable.
voice your opinion now!
zendconfig zendframework benchmark json array ini xml yaml
PHPMaster.com: Bending XML to Your Will
by Chris Cornutt January 26, 2012 @ 11:04:44
PHPMaster.com has a new tutorial posted today about "bending XML to your will" - working with XML data using the XML Parser and SimpleXML functionality already included with PHP.
If you've ever worked with the Twitter or Facebook APIs, looked at RSS feeds from a website, or made use of some type of RPC calls, you've undoubtedly experienced working with XML. [...] Knowing how to process XML data is a crucial programming skill today, and thankfully, PHP offers multiple ways to read, filter, and even generate XML. In this article I'll explain what exactly XML is, in case you haven't had any experience with it yet, and then dive into a few ways you can use PHP to bend XML to your will.
He introduces the concepts and syntax behind XML first for those not accustomed and quickly moves into the tools to parse it. First he looks at the XML Parser, an event-based parser, and SimpleXML, an easy way to access the contents of a well-formed XML document. Snippets of code are provided for each to show you how to put them into practice.
voice your opinion now!
xml tutorial parse eventbased simplexml introduction
Community News: Packing more PHP News in your day with PHP Quick Fix
by Chris Cornutt December 07, 2011 @ 11:35:53
If you're a regular reader of PHPDeveloper.org, you know that there's a few articles posted here (almost) daily about what's happening in the PHP world. Unfortunately, this only scratches the surface of the quality content that's out there. In an effort to provide more PHP goodness to the community as a whole, PHP Quick Fix has been launched - a service linking to stories that don't make it on PHPDeveloper.org.
All of the stories on PHP Quick Fix (you can also follow it on twitter) are still hand-selected out of the mounds of PHP content that shows every day to ensure the best quality. There's no automatic syndication here - just more good, useful PHP (and related topics) to add to your day.
Additionally, if you're interested to see how it all works (thanks to a GimmeBar backend) check out this post on blog.phpdeveloper.org.
voice your opinion now!
phpquickfix news community twitter rss feed
Philip Norton's Blog: Simple PHP Code To Get last.fm Last Played Tracks
by Chris Cornutt December 01, 2011 @ 13:41:00
If you're a last.fm user and have been curious about how to get the latest list of your "last played" selections, Philip Norton has just the code you'll need.
The other day I was approached by a friend (Julie Cheung) and asked if I could create some code that would display a list of last played tracks from last.fm. Julie isn't a PHP developer and so the code I gave her had to be easily understandable so that she could edit it herself if needed. The following code is what I came up with.
The code pulls from the defined user's "recenttracks" feed and parses it (via a simplexml_load_string call) into an object that's looped through and outputted. Data that comes back from the feed includes artist anme, name of the track, a URL to more information about it and an image of the album cover. He also includes an updated version that caches the data for three minutes so it's not always relying on the last.fm servers to be there.
voice your opinion now!
lastfm recent played tracks tutorial xml feed
|
Community Events
Don't see your event here? Let us know!
|