The comparison between the seven popular PHPIDE articles on PHP gave me a deeper understanding of the world of PHP developers. I have talked with many PHP programmers. The most surprising thing is that only a few people use IDE. Most programmers use text editors, such as Microsoft? Windows? On notepad, Emacs, or Vim. The text editors I mentioned (and I did not mention) are all very good-Comparison of 7 popular PHP Ides
Writing a series of articles on PHP gives me a deeper understanding of the world of PHP developers. I have talked with many PHP programmers. The most surprising thing is that only a few people use IDE. Most programmers use text editors, such as Microsoft? Windows? On notepad, Emacs, or Vim.
The text editors I mentioned (and I didn't mention) are all good-I don't want to discuss which editor is better. However, I want to emphasize that not using a text editor will give you a deeper insight into the PHP code. Almost everyone regards the PHP project as just a file directory (this is a one-sided view ). Now let me take you into the world of IDE, show you what IDE can -- or should -- bring to you, and introduce you to the seven most popular IDEs.
What is IDE?
In short, IDE provides an all-in-one service for coding. IDE includes an editor that allows you to edit code, debug code, view code in a browser (usually embedded), and check in and out source code control. To support these features, IDE has a set of features that are not found in basic editors (such as Notepad or Vim. Of course, you can use the extended editor to implement these functions, but IDE includes all of these functions in a streamlined package-all of which are pre-configured:
Project
A key feature of IDE is that it regards a PHP application as a project, not just a group of files. This concept --
Project-- Maintain additional information, such as source code control configuration, database settings for debugging, and location of a key Directory.
Debugging
Another convenient feature is integration debugging. With this function, you can set breakpoints in the editor. when the PHP interpreter executes this script, it will stop. From the breakpoint, you can check the value of the local variable and diagnose the problem in the code. Can be used in the code
echo
Statement to check the value or use the error log to obtain the value of the variable.
Code intelligence
PHP is a very regular programming language, which means it follows a simple pattern. These modes not only make the code easy to write, but also make it easy for the IDE to check the code in the project. In addition, they can help you write programs by displaying the check results. For example, if a project named
MyClass
Class.
new
IDE will immediately provide
MyClass
As an option dialog box. When you use an object of that type, IDE displays its available methods and instance variables. When you start typing a function command, IDE displays its available parameters. To be fair, this is the primary reason for using IDE rather than text editors. This code intelligence can effectively reduce the number of incorrect class names, method names, and parameters.
Class View
Another function of the code intelligent engine in IDE is that IDE can generate projects.
Class View. Instead of displaying files, the system displays different classes that have been defined, regardless of their files. When you click a class, the editor accesses the corresponding file and displays the corresponding class, method, or instance variable. This is a good navigation method in large projects.
Multi-language support
Each IDE mentioned here supports not only PHP but also related Language sets: JavaScript, Structured Query Language (SQL), Hypertext Markup Language (HTML), and Cascading Style Sheets (CSS ). Because HTML and CSS are relatively simple, IDE provides the best support for them. The support for JavaScript often highlights the syntax, but the support is better than not.
Source Code Control
All the Ides evaluated here support some connections to the source code control system, allowing you to maintain the file version in the project over time. You can mark the special version of the file as the release version, so that it can be restored when changes need to be revoked. It is critical to use the source code control system in a team environment, even for personal use. When the disk crashes or the customer suddenly wants the previous version instead of the current version, a good source code control system can play a role. Most IDEs support Concurrent Version System (CVS) and Subversion, which are both open-source control systems. One IDE supports Perforce, a commercial source code control system.
FTP/SFTP integration
One function related to source code control is to use FTP for the latest code on the server. This is much easier than using an FTP client or package a file and sending it to the server and then unpackage the package.
Database navigation
A non-basic but useful feature is database navigation. This feature allows you to browse databases accessed by applications, find tables and field names, and return query results. Some systems can even automatically write some database access code.
Integrated Web browser
Some IDEs support the integration of Web browsers. you can directly navigate to the page that is being edited using the specified additional parameters. This browser can be hosted in the IDE or called externally. Honestly, I don't like to integrate browsers very much, because I don't mind switching between two independent applications, namely editing code and viewing results. But I know it does have a certain effect, but you don't have to use it.
Fragment
The last feature I found in all these Ides is support for the entire section and custom code snippets.
FragmentIs a small part of the code to complete small tasks (such as running regular expressions in some input, connecting to the database, and querying the database.
The above summarizes the core features that can be expected from the purchased or open-source IDE. Next, we will introduce some popular IDEs, show some IDE images, and explain their supported functions and their costs.
Back to top
Eclipse
There are two plug-ins in the Eclipse development platform that support PHP. The first php ide project is the Eclipse Foundation project, which means it is released within the scope of Eclipse license and developed using Eclipse Foundation tools and methods.
Another is PHPEclipse, which is developed independently. Because Eclipse is used, these two plug-ins can run in three major operating systems: Windows, Linux? And Mac OS X. You can only download these two plug-ins (if Eclipse is already used), or download the pre-fab version that contains all the required content.
Both plug-ins support core IDE features. It is especially powerful in code intelligence. it can pop up and display all required classes, methods, and parameter information as needed.
Figure 1 shows PHPEclipse running on Mac OS X. On the left is the project view of the files in the project. The following is the class view, showing all the defined classes. Code is in the middle. You can open multiple files on multiple tabs at the same time. The right side is the debugging and browsing panel. This is a common PHPEclipse user interface.
Figure 1. PHPEclipse on OS X
Figure 2 shows the php ide project plug-in from the Eclipse Foundation.
Figure 2. php ide project on OS X
It does not matter if you cannot see the difference. These two plug-ins seem very similar, because they all rely on the Eclipse platform to present code browsing and smart features. It is good to ensure consistency of the Eclipse plug-in GUI.
I have not found any plug-in that can lock you in an Eclipse project. You can often replace one plug-in with another. In my limited testing, I prefer the php ide project plug-in because I feel that it is better integrated and the performance of the code intelligence feature seems faster. Try these two plug-ins to see which one you prefer.
The disadvantage of these two plug-ins is that the UI is not customized for PHP because Eclipse can be used in almost all programming languages. As a result, Eclipse's terminology was somewhat different at first. If you are learning Eclipse at the beginning, these plug-ins are more difficult to learn than other IDEs. However, if you already know Eclipse, you can quickly get familiar with PHPEclipse or php ide projects.
What are the biggest advantages of Eclipse and these plug-ins? They are free and stable and reliable. Oh, are they free of charge?
Back to top
Komodo
Next we will introduce the ActiveState Komodo IDE. This IDE runs on Windows, Mac OS X, and Linux and supports common open-source languages such as Perl, PHP, and Ruby. The code intelligent engine is very reliable. It scans all language installations to find custom extensions, such as the PEAR module. In terms of projects, it supports integration with CVS, Subversion, and Perforce, and also allows direct code transfer to the server FTP.
Figure 3 shows Komodo running on Windows. Class view on the left and project view on the right. The main part in the middle is the code view. Below are the breakpoint and command output for debugging. For all these systems, you can customize the UI as needed.
Figure 3. Komodo running on Windows
Komodo is a commercial product. When I write this article, this IDE has two editions available: Personal Edition (US $29.95) and Professional Edition (US $299.95. One of its unique features is the regular expression debugger. Whether you are a newbie to regular expressions or have already begun to get involved in advanced regular expression features, this purchase investment is worthwhile.
Its disadvantage is that it does not have Database integration (at least I did not find it), and I also encountered a small problem that the code intelligence does not always pop up when I want it. But in general, Komodo is also a robust, distinctive, and reliable php ide.
Back to top
PHP designer
The PHP designer is not the same as other IDEs. Of course, it supports limited code intelligence. However, it focuses more on the design of PHP Web applications. This is evident in its integrated browser, which uses a pixel ruler to help locate elements on the page.
Figure 4 shows the running PHP designer.
Figure 4. PHP designer on Windows
The PHP code intelligence and debugging features in the PHP designer are not very significant, but the code intelligence support for HTML, CSS, and JavaScript is relatively stronger. The PHP designer is between the programmer's IDE (mainly focused on code) and Adobe Dreamweaver (more focused on design. If you are looking for such intermediate products, the PHP designer is worth considering, because IDE is free for personal use, and its professional edition only requires US $55.
Back to top
PhpED
NuSphere is only used for Windows PhpED. all the IDE features described here are the most abundant. It has a good internal debugger and places the debugging toolbar to Microsoft Internet Explorer for easier access to page debugging? .
Figure 5 shows how to use PHPEd to develop PHP applications in Windows. On the far left is the project file view. The class View is next to the right, and the code View is on the right. Below is the output status. You may have noticed that all these Ides follow the same basic design style.
Figure 5. PhpED in Windows
Highlights of PhpED include a great debugger, excellent database access, good code intelligence, and Integrated PHP help. PhpED prices range from basic version US $119 to professional version US $495. The trial version is also available.
Back to top
PHPEdit
PHPEdit from WaterProof Software seems to be applied to the Microsoft msdev environment of PHP-this is a good thing. PHPEdit is only used for Windows IDE and is easy to set. It even has a PHP version. It does well in PHP, CSS, and HTML code intelligence, but does not provide support for JavaScript code intelligence. Figure 6 shows the running PHPEdit.
Figure 6. PHPEdit in Windows
To facilitate deployment, PHPEdit can be connected to CVS and Subversion, as well as FTP and its proprietary ezDeployment system. In addition to the code intelligence feature, this IDE provides an excellent sample code template library for accelerated development. you can also add content to the library. You can use the PHPEdit evaluation version for free. to get the official version, you need US $89.
Back to top
Zend Studio
Finally, let's talk about Zend Studio, which is listed at the end just because it usesZ. It may be your first thought. Why? Because it comes from the Zend-PHP team behind the scenes. And it is really good. It runs on three major systems: Windows, Mac OS X, and Linux. It also provides everything you need: PHP V4, PHP V5, and so on. It takes a long time to download, but it is very worthwhile.
Zend Studio is the best IDE. It provides all the code intelligence features that you want to have in the built-in library and custom code. It also has excellent debugging functions and is easy to set. To put the code in the repository (repository), Zend Studio connects to CVS and Subversion. To put the code on the server, you can use integrated FTP. Zend Studio is ideal for Macintosh, as shown in Figure 7.
Figure 7. Zend Studio on Mac
In other IDEs, code snippets are built in to make code compilation easier. This IDE also directly integrates databases to provide available tables and fields.
The standard version of Zend Studio requires US $99, and the professional version requires US $299. Some of the features I mentioned here are not included in the standard version. Zend Studio trial version is free of charge.
Back to top
Conclusion
There are a lot of excellent ides to choose from-some of them are even free-you can choose a trial, if you are a professional, it should be more like this. You may have to pay for your company or individual consultants, or you may have to pay for the necessary items. If you want to useecho
When debugging code is compared with the time spent using the integrated debugger, the purchase price of IDE is definitely worth the money.
?
References
Learning
- For more information, see the original article on the developerWorks global site.
- For PHP developers, PHP.net is a good resource.
- For a series of developerWorks tutorials on PHP programming, see "learning PHP.
- Visit the PHP project resources on IBM developerWorks to learn more about PHP.
- Stay tuned to developerWorks Technical events and network broadcasts.
- Check out recent conferences, exhibitions, network broadcasts and other activities for IBM open source code developers to be held globally.
- Visit the developerWorks Open source area to get a wide range of how-to information, tools, and project updates, help you develop with Open source technology, and integrate it with IBM products.
- To listen to interesting interviews and discussions with software developers, visit the developerWorks podcasts.
Obtain products and technologies
- Obtain Komodo from ActiveState.
- PHPDesigner is a product of MPSOFTWARE.
- PHPEclipse is a free PHP Eclipse plug-in that can be obtained from PHPEclipse.net.
- NuSphere is the creator of PhpED.
- PHPEdit can be obtained from WaterProof Software.
- The php ide Project is a free Eclipse plug-in for PHP and can be obtained from the Eclipse Foundation.
- Zend Studio and some other useful PHP products can be obtained from Zend.com.
- Please use IBM trial software to improve your next open source code development project, which can be downloaded or obtained through a DVD.
Discussion
- Join the developerWorks community by joining developerWorks blogs.