Wednesday 25 April 2007

Screen capture with PHP: Useful for documentation

Pierre-Alain Joye has posted about a couple of new functions he has added to GD (to be released in 5.2.2) that will allow a script running on Windows to capture the entire screen or a single window. He includes some sample code to capture an IE window after navigating to a specific URL.

These new functions got me thinking about documentation for MySource 4.0. We've made it a priority to be able to customise a large number of interfaces in the system, as well as removing entire pieces of functionality all together. This obviously makes documentation hard as every user may be looking at a different interface with different functionality.

While we haven't sat down and tackled this problem yet (it's a bit too early at the moment) we have thought about possible solutions in the past. One of the things discussed was generating documentation by putting together different parts of manuals depending on what functionality is present in a system. We could also read XML files that define the interfaces to determine, for example, the creation wizards that are in use and what functionality they implement.

Even if we can get the words together to describe a system, we still only have a generic set of screenshots to use in a manual. I'm hoping that this new functionality in GD will allow us to generate custom screenshots, leading to customised manuals for each system or each standard configuration of MySource 4.0.

Tuesday 17 April 2007

PHP_CodeSniffer 0.5.0 (beta) released

Version 0.5.0 of PHP_CodeSniffer was released today. The changelog is fairly long and a lot of bugs were fixed since 0.4.0, but the biggest change is the requirement of a coding standard class for all standards.

Due to the requirement of the coding standard class, version 0.5.0 breaks backwards compatibility for existing custom coding standards. All standards you have developed yourself now require the coding standard class. If this class is not found, PHP_CodeSniffer will not recognise your standard and will not allow you to test code using it.

Users with custom coding standards should view the end-user documentation about the new coding standards class and also check the coding standard tutorial for information about adding this class to your standard.