 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Lorna Mitchell's Blog: PHP REST Server (Part 3 of 3)
by Chris Cornutt September 05, 2008 @ 12:55:48
Lorna Mitchell has posted the last part of her development process towards creating a sample REST server in PHP:
This is part 3 of my article about writing a restful service server. If you haven't already, you might like to read part 1 (covering the core library and grabbing the information we need from the incoming request) and part 2 (covering the service handler itself) before reading this section. This part covers the Response object that I used to return the data to the user in the correct format.
She show how she created the object to push the response back out to the client with an output() method that displays the XML response in a manually generated format.
voice your opinion now!
rest server tutorial response xml object
Christian Weiske's Blog: Importing huge XML files using PHP5 - efficiently and conveniently
by Chris Cornutt August 25, 2008 @ 09:34:38
Christian Weiske has a quick tip on how to get larger XML files to pull into PHP5 and be usable:
At work I had the task to implement the synchronization between an online shop and a commodity management system. Data exchange format was XML - one big XML file for all of the products (some thousands with dozens of attributes). Big question: How do I import the file in a way that is most convenient for me as a programmer - and without exceeding the machine's RAM when loading a 1 GiB file?
The newer alternatives both use the same technology (DOM and SimpleXML - with DOM behind it) so he goes more "low tech" than that and opts for the XMLReader extension to pull in the large amounts of data. Available in PHP5, the XMLReader extension, which he combines with an Iterator from the SPL to makes for a simple, quick little parser.
voice your opinion now!
import xml file php5 efficient convenient xmlreader spl iterator
SitePoint PHP Blog: Mangling XML as Text with PHP DOM
by Chris Cornutt July 24, 2008 @ 09:35:16
In trying to convert over several HTML pages to the DITA XML format, James Edwards came up against a problem involving recursion:
But a problem I came across several times was the sheer complexity of recursive element conversion '" <code> becomes <jsvalue> (or one of a dozen similar elements), <a> becomes <xref> '¦ and that's all simple enough; but each of these elements might contain the other, or further child elements like <em>, and as we walk through the DOM so the incidence of potential recursion increases, until it gets to the point where my brain explodes.
His solution involves working with both regular expressions and document fragments. He loads the node he wants to work with, its parsed to prepare it and is passed off to do the "text-based mangling" to update it. The result is them pushed back into an XML object (fragment) and this is pushed back into the main document with a replaceChild call.
voice your opinion now!
dom xml convert dita replacechild fragment node tutorial
Lukas Smith's Blog: KISS my...
by Chris Cornutt June 10, 2008 @ 12:53:58
Lukas Smith recently posted about issues he's been coming across with the "KISS" mentality (and code) that the Zend Framework implements, specifically for the Zend_Feed component.
Now that I am actually using the Zend Framework on my first project, hitting bugs/limitations in Zend_Feed and therefore looking at the code, I must say I am seeing feature duplication with internal PHP features that does not quite fit in with the KISS principle.
He points out a few things that illustrate his point - the use of Zend_Http_Client instead of a strea context, passing XML contents into loadXML instead of just load. As a replacement, he's considered a Feed component from the eZ components system, but it hasn't been released (officially) yet. So, as an alternative, he's come up with a patch to fix a few things in the Zend_Feed component to make it a bit more KISS-friendly.
voice your opinion now!
kiss simple zendframework ezcomponents feed parse xml patch
ThinkPHP Blog: Accessing Nike+ data with PHP
by Chris Cornutt May 15, 2008 @ 10:26:40
On the ThinkPHP blog today, Stephanie Ehrling has posted about a method for PHP to take in the output of the Nike+ equipment and put it into a usable form.
There is no official API that allows you to use the raw data. Nevertheless the data are sent to the Flash via XML so there is a chance to use them. For PHP Rasmus Lerdorf himself has implemented a class to access these data. The class allows to authenticate a user and fetch the running data of a user in a XML-Format
She gives an example of it in action - simple creation of an object then a call with the username and password. Behind the scenes, the data is pulled in and dropped into a SimpleXML object that includes total distance, total calories burned and data on the most recent run.
voice your opinion now!
nikeplus data xml simplexml class resmuslerdorf
IBM developerWorks: The future of PHP
by Chris Cornutt May 09, 2008 @ 07:55:54
In a new post on the IBM developerWorks page, Nathan Good takes a look at some of the features of the up and coming versions of the PHP language including things like namespaces, changes in the XML handling and a few things taken out.
PHP's next edition, V6, includes new features and syntax improvements that will make it easier to use from an object-oriented standpoint. Other important features, such as Unicode support in many of the core functions, mean that PHP V6 is positioned for better international support and robustness.
New features he mentions include namespace support, improvements to the native Unicode support as well as a few of the things that will be permanently retired like the php.ini settings for magic_quotes and register_globals.
voice your opinion now!
future namespace unicode language xml soap registerglobals magicquotes
Markus Wolff's Blog: Fulltext search as a webservice
by Chris Cornutt May 07, 2008 @ 12:57:47
In a recent blog entry about a fulltext searching solution, Markus Wolff hacked together in a few hours with Zend_Search_Lucene:
While working at some really old code that provided a fulltext search feature, I was at one point incredibly pissed rather unsatisfied due to the fact that said code resisted all attempts to debug it. This lead to the decision to sit down on a rainy weekend to try if I couldn't come up with something more useful, and most importantly, scalable.
His method allowed for separation between the indexing and the main app and how he changes some of his methods when he learned that Solr did something very similar. He also lays out some example XML content and how it's handled in his script (via a SimpleXML object).
voice your opinion now!
fulltext search xml document zendsearchlucene zendframework solr
Michael Girouard's Blog: Rolling Your Own MVC The View
by Chris Cornutt April 28, 2008 @ 09:39:45
Michael is back with part three of his series stepping you through the creation of your own MVC framework (Part 1 and Part 2) with a look at the part that interfaces with the user - the View.
Using the view as a starting point may seem odd at first considering the view-related actions are some of the last steps in the page load scenario, but since our views don't have any external dependencies, unit tests are very easy to write and so is the accompanying code.
He explains how views work along with the rest of the framework and some of the basic rules surrounding how they get their data. Code comes along with the explanations for different views like XML, HTML and JSON methods of output.
voice your opinion now!
modelviewcontroller mvc view tutorial output xml html json
|
Community Events
Don't see your event here? Let us know!
|