When we often have to deal with such tedious repetitive tasks as manual code testing and deployment, we tend to feel frustrated. However, we have been trying to be efficient, as the DRY principle says (the translator lives: Dry=dont Repeat yourself, the principle of non-repetition, see: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself). So why not apply this principle to the rest of the software development lifecycle so that it can be streamlined and automated to do this? This article will introduce you to 10 PHP development tools that can help you meet that requirement, giving you more time to focus on building better Web pages.
1. PHPUnit
Testing is a very important part of software development, but many developers just give little time to test it because it is really time-consuming, tedious and error-prone. To solve these problems, the automated test tool allows developers to write a series of test scripts that can be executed easily and can be executed according to scheduled tasks. These automated test tools typically provide a test report that describes the results of each test in detail. PHP developers have a pretty good test framework phpunit for automated testing. Based on a very popular test-driven development approach, such as xunit,phpunit allows developers to write test cases using PHP's syntax, and then perform tests with a very simple command-line tool. You can even integrate phpunit with some continuous integration tools such as Phpundercontrol (http://phpundercontrol.org/), which is discussed later in this article. If you are unfamiliar with PHPUnit, you can view the previous article use PHPUnit to Implement Unit testing in Your PHP development (http://www.phpbuilder.com/columns/ JASON_GILMORE052510.PHP3), detailing how to use the PHPUnit.
2. phing
As Web development projects become more complex, developers face a whole bunch of deployed tasks that are not just as simple as uploading files to a production server from a developer's machine. For example, to avoid uploading the development environment of the file, the template, processing the server to specify the file permissions and parameter configuration, such as user name password, and how to recover as soon as possible when a change error occurs, these problems are frequently encountered by developers. To solve these problems, the developer uses a dedicated build tool that makes the file transfer process more efficient because it only transfers changed files synchronously. Build tools can also be easily tailored to the deployed environment. If you are not currently using the build tool, you can look at Phing, (http://phing.info/) This is an Apache Ant-based build tool. It supports all operating systems, can easily be configured with XML syntax, integrates with versioning tools like CVS,SVN, and even creates pear packages from your custom libraries.
3. GitHub
I have mentioned the benefits of using version control tools many times. Versioning can bring many benefits to a project, including an experimental branch that can build code, rollback of unwanted changes, the ability to see which team members have recently been changed by a file, and monitor progress through the logs. Although there are a lot of open source version control tools Now, Git is my favorite at the moment. The rise of Git has largely benefited from a GitHub (http://github.com/) Web site offering third-party hosting services, which provides a host of managed services for developers. GitHub meets the needs of developers and even provides host-hosted services for open source projects. Now more than 1 million of the hosted apps are on the table, and GitHub provides a valuable service to developers without having to spend a lot of money and time looking for third-party hosting services.
4. firephp
Many developers are familiar with Firefox plugin firebug, which allows you to easily check the HTML,CSS and JavaScript syntax of a Web page. Using firephp (http://www.firephp.org/), you can also use the interface like Firebug to check PHP syntax errors and selected analysis data. To learn more about the features of Firebug and firephp, you can view "Firebug:add browser-based debugging to Your Ajax development". (http://www.developer.com/lang/jscript/article.php/10939_3879711_2/ firebug-add-browser-based-debugging-to-your-ajax-development.htm).
5. XDebug
With a test tool like PHPUnit, you can help catch errors after you've written your code, and sometimes you need to use some help tools to help you understand the causes of these problems. Many PHP developers use a good debugging tool, Xdebug (http://xdebug.org/), which helps you check the status of your code and provides tools to track and dissect code performance, view object content, and other features. If you want to familiarize yourself with xdebug, you can view the previous article
A sanity-saving Debugging Solution for Your PHP Development (HTTP://WWW.PHPBUILDER.COM/COLUMNS/JASON_GILMORE051410.PHP3).
6. PHP Extensions and Applications Library
While you may think your ideas are unique and special, there is a great chance that you are trying to write code that has been written by a number of other programmers. To help developers overcome these hurdles, PHP developers regularly contribute PHP extensions and application libraries, such as the famous pear. The pear contains 560 packages that provide fast solutions such as caching, encryption, user authentication, and payment processing. You can always find the right solution for you in pear.
To help manage the Pear package application, you can install the Pear Package Management tool (http://pear.php.net/manual/en/installation.getting.php), which provides a command-line interface to install, upgrade, and delete packages.
7. Php_codesniffer
As with the editorial debate, the debate over coding style is more ironic. Nonetheless, the coding standards advocated by pear seem to have a place in the PHP community, however, you or your team may still not adopt such standard conventions, which will lead to inconsistent styles of code.
To avoid code-style inconsistencies, consider installing Php_codesniffer (http://pear.php.net/package/PHP_CodeSniffer), a nice pear package that analyzes PHP programs, Javascrip and CSS files and check out which ones are incompatible with the defined code style. While you can define your own coding style, Php_codesniffer's coding style is very handy.
8. Phpdocumentor
Understanding the code from obscure code annotations is a frustrating task, even if the code was written yourself before. Like testing, writing documents is still one of several tasks that developers want to avoid. In order to alleviate such suffering, it may be considered to use the elephant
Automated documentation tools such as Phpdocumentor. Phpdocumentor supports simple document rule syntax, can parse your code and generate friendly documents. To learn more about Phpdocumentor You can view the guide articles I wrote documenting PHP Code with Phpdocumentor
(http://www.developer.com/lang/php/article.php/3440261/Documenting-PHP-Code-with-PHPDocumentor.htm), And can be used to download the latest version of the Phpdocumentor website.
9. Php_beautifier
Another factor that hinders reading code is the bad code format, because in scripting languages such as PHP, it is easy to make inappropriate indentation and form a bad code format. You can use the package in Pear Php_beautifier
(Http://pear.php.net/package/PHP_Beautifier) to automate the formatting of the code.
Ten. Phpundercontrol
If you are considering the above mentioned tool, then you can download Phpundercontrol this tool, which is built based on CruiseControl. Phpundercontrol includes a number of PHP tools, such as Phpunit,phpdocumentor, and provides a unified interface management.
http://www.bkjia.com/PHPjc/486259.html www.bkjia.com true http://www.bkjia.com/PHPjc/486259.html techarticle when we often have to deal with such tedious repetitive tasks as manual code testing and deployment, we tend to feel frustrated. However, we have been trying to become more efficient, just as the dry principle ...