News Feed
Sections




News Archive
feed this:

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

Dayle Rees:
Composer primer
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).

0 comments voice your opinion now!
composer package manager primer configuration usage

Link: http://daylerees.com/composer-primer

Michael Nitschinger's Blog:
A primer on PHP exceptions
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).

0 comments voice your opinion now!
exception custom namespace tutorial primer unittest lithium


PHPBuilder.com:
A Primer On Postgres Exception Handling For The PHP Developer, Part 2
November 16, 2007 @ 09:35:00

PHPBuilder.com has posted part two of a series they're working through introducing PHP developers to the world of exception handling in the Postgres database.

Last week we left off with an example where notice, exception and log levels are sent to the client. This week we present more POSTGRES exception examples, and continue with our article on Postgres exception handling.

They create a few examples:

  • handling other error conditions with OTHERS
  • using f_ex2
  • returning NO_DATA_FOUND and TOO_MANY_ROWS
  • handling exceptions like table constraints
  • nested exceptions
  • using f_ex5
  • a RAISE EXCEPTION dilemma
  • using f_ext1
0 comments voice your opinion now!
postgres exception handling developer primer postgres exception handling developer primer


Zend Developer Zone:
L10N==Localization (See there are ten letters...Oh, you get it...OK)
June 09, 2006 @ 06:57:37

Internationalization and Localization are concepts that all web sites and applications will have to deal with at some point. Why not design it form the start? Most people just don't think about it but in an increasingly global society, you need to. The earlier you design for it, the easier it is to do.

They continue on in this post on the Zend Developer Zone with a resource to get you thinking - an Internationalization Primer from Johnathan Snook (as printed in Digital Web Magazine). He looks at the basics you'll need to know when putting in multi-language support, including database designs and precompiling.

1 comment voice your opinion now!
localization article digital web magazine primer localization article digital web magazine primer


PHPBuilder.com:
Using XML - A PHP Developer's Primer, Part 4 (Subpart 2)
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.

0 comments 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)
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.

0 comments 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


SitePoint PHP Blog:
PHP ZH Round One
March 16, 2006 @ 07:11:33

With a round-up of the first PHP Zurich meeting, Harry Fuecks has posted this new item on the SitePoint PHP Blog with all of the details.

Yesterday's first meeting worked out pretty well, to the point where I needed a quiet morning. Good turnout for the kick off thanks to everyone that made it and especially to Christian for providing space.

Security Primer talk now online here (PDF). Also a couple of snaps from Christian.

There's some talk of the "rebranding" they might be doing for the group as well as some discussion on the location for the next meeting.

0 comments voice your opinion now!
zurich user group meeting results security primer talk zurich user group meeting results security primer talk


PHPBuilder.com:
Using XML - A PHP Developer's Primer, Part 2
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.

0 comments voice your opinion now!
phpbuilder using xml part two primer ajax email validation phpbuilder using xml part two primer ajax email validation


PHP Zurich:
Meeting Details - March 14th, 2006 @ 630pm
February 21, 2006 @ 07:14:30

The PHP Zurich group has posted the official announcment for their first meeting happening March 14th.

They'll be starting at the BitFlux offices and moving to Rossi's following.

The agenda includes a talk from Maarten on "containers, database abstraction and applied PHP magic" and a talk from Harry in the form of a basic PHP security primer.

If you'd like to attend, you can get this information and more from their site.

0 comments voice your opinion now!
user group zurich bitflux office containers security primer user group zurich bitflux office containers security primer


PHPBuilder.com:
Using XML - A PHP Developer's Primer
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...

0 comments 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!


list community framework configure language laravel api application interview project code release podcast library wordpress threedevsandamaybe series introduction developer bugfix

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