Designing a Magento custom module – a technical overview

The purpose of summary is to deliver a good reference guide to keep with you when developing custom modules with eCommerce solution Magento. It details some of the key sections of how to build a custom Magento module, some of the concepts, assumptions and key points that that you are likely to encounter on a regular basis when building eCommerce installations with this software. While Magento does not currently have a great reputation for documentation, there are some good resources available, including the Magento Wiki and php|architect’s Guide to Programming Magento...

Web services for PHP developers

In this world of sharing data, increasing numbers of sites and applications are making information available over web services. Whether we are building a service as a feature of our own development, or pulling in the information published by others, we will need to understand the different service types and how to work with them in PHP. This article aims to give you the tools to do just that.

Tips for working with datetime in PHP

Recently we published a post about tips for dates and times in PHP, today I thought I'd follow on from Michael and add some more tips. In PHP 5.2 there is an object oriented approach to working with dates and times - the DateTime class! In the newer PHP 5.3 versions even more excellent functionality was added. This is a short post to introduce this functionality with a focus on the methods available in PHP 5.2 showing some simple examples of how we can more easily manipulate and display dates without needing to work with timestamps.

Scaling web applications with HMVC

The last decade has been witness to the second iteration of web design and development. Web sites have transformed into web applications and rarely are new projects commissioned that do not involve some element of interactivity. The increasing complexity of the software being developed for the internet fuelled a requirement for structured and considered application design.

PHPLOC: PHP lines of code

With the growing use of continuous integration and static analysis tools hooked into those processes, there is a particular analysis tool that is very useful but rarely mentioned: phploc, the PHP Lines of Code tool. This has been a feature of PHPUnit for some time but has been released as a separate project in the phpunit pear channel. The nature of PHPUnit means that many of these statistics can be collected while the tests are running, which is why it was added to that tool in the first instance.

Transforming XML with PHP and XSL

If you want to transform XML from one format to another, and especially if either the input or output XML is complicated or the transformation itself is difficult or awkward to express, then XSL may be a good choice. XSL is the eXtensible Stylesheet Language; a family of three W3C recommendations to do with the transformation and presentation of XML documents. This article will walk through some examples of how XSL and PHP can be used to achieve these types of XML tranformations.

Profiling with XHPROF

If there's something we developers are really bad at, it's guessing. We think we know which parts of our application are slow, and spend a lot of time optimising those, but in reality the bottlenecks are often somewhere else. The only sane thing to do is measuring, with the help of some profiling tools.

Using PHP_code_sniffer

PHP Code Sniffer (PHPCS) is a package for syntax checking, available from PEAR. It can check code against defined rules covering anything from whitespace through doc comments to variable naming conventions and beyond. In this article we'll look at getting started with PHPCS, using it to syntax check our files, and go further to look at how the rules are create and the standards defined.

Pages