I think it's quite amazing how far the PHP and MySQL combination of apps have come in the past 2-3 years. They both started from humble beginnings, yet today they are arguably the most popular scripting and database combination for new programmers to learn. In this article, John takes a look at PHPEd and talks about its interface, installer, and his overall opinion of it as an IDE for developing PHP scripts.
Review: NuSphere PHPEd - PHPEd in review (Page 2 of 4 )
My initial impression of PHPEd was "wow". The installer came complete with all of the applications needed to create, test, debug, secure and deploy PHP + MySQL web sites: Apache, PHP, MySQL, Perl, NuSphereMail, MyODBC, MySQL JDBC, CVS, NuSphere security console and the actual PHPEd IDE itself.
The installation program existed completely inside of a web browser window, and took around 10 minutes to install and configure everything mentioned above. I already had MySQL installed, so the installation program cleverly detected this and skipped it. Once everything was installed, I fired up PHPEd via the start menu. I was greeted with the PHPEd IDE, which looks like this:
I went about creating a new PHP document to connect to my locally installed copy of MySQL. As with many other IDE's, my code was colored according to syntax, comments, etc. One great thing I noticed was the built-in syntax suggestion tool. To use it, you simply type the start of a PHP function name, such as "mysql_con" and PHPEd displays its syntax suggestions for the way that you should call the function:
Also, when you're typing the name of a function to call in your PHP script, but aren’t too sure what its name is, PHPEd will display a list of functions whose first letters are similar to those you’ve typed in so far. They are displayed in a floating list box that resembles the way Microsoft has implemented its intellisense feature in both Visual Basic and C++:
As you can see in the example above, I have created four variables. Each time I pressed the "$" key at the start of the variable name, PHPEd displayed a list of variables currently declared throughout the PHP script I was writing. This is a handy feature and helps minimize incorrect name referencing of variables.
PHPEd also includes a built-in copy of the PHP manual. To see a definition and example for any function, simply type that functions name into your script and then press the F1 function key:
When I create ASP pages, I use Visual Interdev. My favorite feature of Visual Interdev is its unlimited undo command. Much to my surprise, PHPEd also supports unlimited undo commands from the edit menu. This is great when you decide to change some critical aspect of your code, save it, and then decide to revert back to the older code at the last minute.
Another feature that caught my attention was PHPEd’s very intuitive settings dialog. By simply clicking on the Tools -> Settings menu option, I was greeted by a huge number of tabs containing all of the options that PHPEd uses to format code, complete words, connect to Apache, etc. The settings dialog window looks like this:
The "Code templates" tab provides code samples for some of PHP’s most popular keywords and functions including "switch", "for", "mysql_connect" and "list". If you find a new function that you know you’ll almost always use, then you can click on the "Add" button to add it to the list of functions with your own code example:
Because I normally create my PHP code with notepad, I wasn't used to PHPEd automatically closing brackets and braces for me. Actually, I found it quite annoying. Luckily, though, there were "Auto-close quotes" and "Auto-close brackets" options in the settings menu which I simply unchecked.
PHPEd has built-in support for connecting to, viewing and querying MySQL databases. The MySQL tab provides one click login access to databases. Once connected, you use a tree view structure to navigate through databases, tables and users:
To display the schema for a database or table, you simply click on it and it appears in the main window. There are five buttons that give us information about the currently selected MySQL table: Summary, structure, data, privileges and SQL, which allows you to query the database and view that queries results right there in PHPEd's main window:
This is a great timesaving feature and works in the same way as Microsoft SQL Server's Query Analyzer tool. It saves you from having to use the MySQL console application or phpMyAdmin to manipulate your databases all the time.
Although the built-in MySQL support is great, PHPEd does lack support for the several other popular databases that PHP supports including MS SQL Server, Oracle and PostgreSQL. This is a shame really, seeing as though PHPEd supports MySQL so well.