This article explores all the purposes of the integrated development environment (IDE) and compares the costs and advantages of seven popular 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 Notepad, Emacs, or Vim on Microsoft Windows. This article explores all the uses of the integrated development environment (IDE) and compares the costs and advantages of seven popular 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 Notepad, Emacs, or Vim on Microsoft Windows.
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-maintains additional information, such as source code control configuration, database settings for debugging, and the 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. You can use the echo statement in the code 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 class named MyClass is defined in the project, when you type the keyword new, IDE immediately provides a pop-up window that includes MyClass as an option. 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 intelligence engine in IDE is that IDE can generate the class view of projects. 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. Fragments are a small part of code that completes 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.
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. 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?
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.
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.
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 stores the debugging toolbar in 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.
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.
Zend Studio
Finally, let's talk about Zend Studio, which is listed at the end only because it starts with Z. 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.
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 consider using echo to debug code and compare the time spent using the integrated debugger, the purchase price of IDE is definitely worth the money.