 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Dayle Rees: Composer primer
by Chris Cornutt April 15, 2013 @ 12:55:09
For those that might have heard about the Composer package management system for PHP but haven't had the time to get into it, you should definitely check out this great primer from Dayle Rees.
Composer is something special in the world of PHP. It has changed the way we handle application dependencies, and quelled the tears of many PHP developers. You see, in the olden days, when you wanted to build an application that relied on third party dependencies you would have to install them with PEAR or PECL. These two dependency managers both have a very limited set of outdated dependencies and have been a thorn in the side of PHP developers for a long time. [...] Enter composer, king of the package managers.
He jumps right in and gets into the configuration (the composer.json file) and using it to describe the package. He shows how to set up "required" resources complete with version number information. There's a bit about setting up autoloading and classmaps too. He then moves on to getting the tool installed and using the composer.json definition to load in needed packages (and development ones if needed).
voice your opinion now!
composer package manager primer configuration usage
Michael Nitschinger's Blog: A primer on PHP exceptions
by Chris Cornutt May 23, 2012 @ 09:17:41
Michael Nitschinger has a new post focusing on one of the more commonly used, but maybe just as commonly misunderstood, part of PHP - exceptions and their handling. His latest post looks at what Exceptions in PHP have to offer and provides some "best practices" in their use.
Exceptions are and should be an integral part of any general purpose programming language. PHP introduced them long ago (with the release of PHP 5 or 5.1), but it still seems that many of the concepts are not fully understood or ignored by the community. This post aims to be a solid introduction to exception architecture, handling and testing. At the end of the post you should be able to know when to raise an exception and how it should look like.
He talks about situations when (and when not) to use exceptions, normalizing them for easier try/catch-ing and includes the exception class hierarchy, including the types pulled from the SPL. He shows examples (based on the Lithium framework's namespacing) how to create "namespaced exceptions" and how to use these in a bit of sample code. He also mentions the use of the custom error handling with the ErrorException as well as a quick look at testing these basic and custom exceptions correctly (PHPUnit-based tests).
voice your opinion now!
exception custom namespace tutorial primer unittest lithium
PHPBuilder.com: Using XML - A PHP Developer's Primer, Part 4 (Subpart 2)
by Chris Cornutt April 26, 2006 @ 16:41:13
PHPBuilder.com has continued their "PHP Developer's Primer" series covering the various uses of XML in PHP with this new tutorial, part two of their "XML-RPC, PHP, and Javascript" coverage.
Continuing with the code developed in part one, they work on creating the PHP server side of things, showing the code to respond to the connections, validate the email address sent, and how to use Javascript to make a connection and call the server.
By the end, you'll have a set of scripts that can ship off an email address to be validated on the server-side with the help of some handy Javascript and a simple backend connection.
voice your opinion now!
xml developer primer xml-rpc javascript xml developer primer xml-rpc javascript
PHPBuilder.com: Using XML - A PHP Developer's Primer (Part 3)
by Chris Cornutt March 24, 2006 @ 07:04:06
For those of you that have been following along, PHPBuilder.com has posted the third and final part of their "Using XML: A PHP Developer's Primer" series. Even if you haven't been keeping up, it's worth a look.
In this edition, they look at more advanced topics - a deeper look at Ajax and how to style the data you get back with XSL, both on the client and sever.
To start, they look at XSL - what it is, how it's used, and some code examples of both the XML and XSL structures to style XML data into a valid HTML page. Of course, you'll need the PHP extension to get this all working, so they step you through the installation/enabling of that as well.
They touch on other topics (like passing variables to a stylehseet and XSLT in Javascript) before getting to a simple XSLT and Ajax example - pulling book data and formating it with examples of both the PHP and Javascript sides.
voice your opinion now!
xml xslt primer part three style javascript server-side client-side xml xslt primer part three style javascript server-side client-side
PHPBuilder.com: Using XML - A PHP Developer's Primer, Part 2
by Chris Cornutt February 27, 2006 @ 09:22:50
On PHPBuilder.com today, there's the second part in their "Using XML: A PHP Developer's Primer" series.
In the first part of this series, we took a look at how PHP 5 can be used to manipulate and parse XML files. In this installment, we are going to focus on Ajax, one of the most useful and topical applications of XML.
Initially, we are going to introduce Ajax and learn how to use the XMLHTTP object provided by most modern web browsers to create a live email validation form. Then we will pick up where we left off with the theme of XML and introduce XSLT, which we will use to transform our library XML from the previous article into valid XHTML code.
They jump immediately in, starting with the "what is Ajax?" question to provide a good base. The sample application that they help you build to work up your Ajax skills is an email validation app that checks the user's entry as they're putting it in. Of course, all of the PHP and Javascript code that you'll need is provided.
voice your opinion now!
phpbuilder using xml part two primer ajax email validation phpbuilder using xml part two primer ajax email validation
PHPBuilder.com: Using XML - A PHP Developer's Primer
by Chris Cornutt February 07, 2006 @ 07:10:24
PHPBuilder.com has posted a new tutorial targeted at those developers out there wokring to get into the XML functionality that PHP offers. They look to help (in a very general way) introduce you to the fundamentals on what XML is and how to manipulate it with what PHP has to offer.
This series of articles will focus on XML, its applications in modern day web development and how PHP fits into this niche. In this article, we will focus specifically on the tools provided to us by PHP which enable us to manipulate XML data sources.
They cover what XML is, what it looks like, and talk about some of the simple applications that it can bse used for (in PHP or otherwise). They focus on the newer XML features of PHP - DOM, SimpleXML, and XPath. They show some of the PHP code to parse out bits from their sample XML and show how easy it is to port the DOM code over to another language (this time, Javascript). They finish things off with code examples for grabbing the same data in the other technologies - SimpleXML and XPath...
voice your opinion now!
xml developer primer dom simplexml xpath xml developer primer dom simplexml xpath
|
Community Events
Don't see your event here? Let us know!
|