Archive for January 24th, 2007

Builder.au: Dynamic XML document construction with the PHP DOM

On Builder.au, there’s a new tutorial talking about the dynamic construction of an XML document using the DOM functionality already built into most PHP installs out there.

They work through the different steps:

  • Creating the Doctype declaration
  • Adding elements and text nodes
  • Adding attributes
  • Adding CDATA blocks and processing instructions
  • Saving the results

For each on the list, there’s code and explanation to help you create the document. By the end, you’ll have a document that gives you all the information you’d want to know about someone’s pizza order.

Continue Reading · Add comment

DevShed: The Basics of Abstract Factory Classes in PHP 5

With a new addition to their ever-growing list of tutorials looking at design patterns, Devshed sets its sights on abstract factories in this new edition.

Fear not, because in this three-part series, I’m going to show you how to create an abstract factory class with copious friendly hands-on examples. Hopefully, by the end of this series, you should have a more intimate knowledge of how this useful pattern works.

They introduce the pattern - what it is and what it can do for you - before showing how to define a small example of it by creating DIVs on your page.

Continue Reading · Add comment

The Basics of Abstract Factory Classes in PHP 5

You have probably used the factory design pattern before. An abstract factory pattern helps you make sure you re creating the correct objects for your application according to the context. This article the first one in a three-part series gives you a taste of what you can do with the abstract factory pattern. As always it includes plenty of examples….

Refurbished and Used Networking Equipment Network Liquidators sells refurbished and used networking equipment for up to 95% off list, with a 1 year warranty. We buy and sell top brands like Cisco, Extreme, Foundry, and more. Call us for best pricing.

Continue Reading · Add comment

Community News: Komodo IDE 4.0 Released

As mentioned by both Sean Coates and the International PHP Magazine, ActiveState has release the latest version of their popular development environment - Komodo IDE 4.0.

Komodo IDE 4.0 is the first unified workspace for end-to-end development of dynamic web applications. A rich feature set for client-side Ajax languages such as CSS, HTML, JavaScript and XML, coupled with advanced support for dynamic languages such as Perl, PHP, Python, Ruby and Tcl, enables developers to quickly and easily create robust web apps.

Komodo is all about simplicity and helping you write your code. This includes features like a multi-language editor, integrating sharing abilities, the ability to create Firefox-like extensions to add to other applications, and full customization settings to make your worspace your own.

Find out more about the software on Komodo’s page or just head over and buy this latest version for a discounted rate of $245 USD. There’s also a trial copy you can download and check out before spending the cash.

Continue Reading · Add comment

Jacob Santos’ Blog: PHP Blackjack

In a new post to his blog today, Jacob Santos shares a look at converting an application from one language to another - from C++ to PHP (obviously).

The reason I’m revisiting blackjack is because I have a C++ version and I want to port it to PHP, for fun. If you want to have a simple project for learning a language, other than “Hello World,” then Blackjack is a good project.

Since Blackjack is a relatively simple game (as far as the rules go, that is) he chose a simple C++ version to port over. He sets up some guidelines first - break down the code into simple, reusable parts and keeping it as simple as possible. Most of the rest of the code is dedicated to the code:

  • Game start
  • Statistics handling
  • Randomization
  • Looping
  • Conditional statements

The transition is pretty simple, really, especially with how flexible PHP is and the large number of built in functions it comes with.

Continue Reading · Add comment