You'll find no shortage of heavyweight PHP IDEs, but few are uncluttered, focused, and smooth
The news is now old that investors will be given a chance to trade big piles of cash for a piece of the pile of code known as Facebook.com. Just a short time ago, few of us would have predicted that a pile of PHP would be worth billions of dollars, but clearly we underestimated the power of the platform.
To get a flavor for the latest in PHP programming, I spent some time unpacking the current set of development tools for PHP -- eight in all. I built some projects, modified some plug-ins for popular content management systems, and experimented with building another pile of PHP that will be worth many billions of dollars if I keep my fingers crossed.
There has been much progress over the years. In the past, I've generally relied upon emacs to create the code. When I needed to watch a variable, I would just print it into a Web page and trace the flow through there. That technique is generally adequate for basic debugging because the traditional job of PHP is to do a bit of basic data manipulation and get out of the way when the database shows up to do the real work.
That's changing. The integrated development environments are proliferating, and more development is moving into the cloud. The integrated tools manage the stacks of code, juggle deployments, catch debugging information, store the code in source repositories, and in some cases even automate deployment to the cloud.
But while the tools are more capable than ever, they often felt overly complex and sometimes even rough around the edges. Some of them seem to be bopping along in a state of neglect. Given the prevalence and maturity of PHP, I was surprised by some of the difficulties I ran into. The good news is, whether you lean toward a heavyweight tool packed with features or a lighter-weight tool that brings some polish, there is an option here for you. Two IDEs, Zend Studio and PhpStorm, stand out from the crowd.
Zend Studio is one of the two major commercial packages built around plug-ins for the Eclipse platform. In theory, you can get many of Zend Studio's features for free with the open source PHP Development Toolkit (PDT), Eclipse plug-ins that are built in part with help from Zend. But I had no success with them. My version of Eclipse (3.7) wouldn't install the current PDT plug-ins because of a long list of conflicts. These could probably be eliminated with some judicious pruning of the code -- something that open source makes possible -- but I lost patience.
Zend's website offers a long checklist of the differences between the PDT plug-ins and Zend Studio, but many of the differences have little to do with PHP development directly. For instance, Zend Studio offers GIT and SVN support, but PDT doesn't. However, anyone using Eclipse can install other plug-ins with these features that work with all languages.
Two of the main features you get for $299 are stability and testing. I had little luck getting the PDT plug-ins to work with my current version of Eclipse or even with a clean version of Eclipse I tried from scratch. Zend Studio, on the other hand, started right up. Zend integrates the plug-ins and removes the roadblocks before distributing everything as one big ball of code. You can use the various tools in Zend Studio separately as plug-ins, but installing the bundle made more sense. In theory, these plug-ins should play nicely together. In practice, it's easier to pay someone to make sure it's true.
Despite all of this, there were still moments when I struggled. While Zend Studio said it could detect the Zend Server, I had to fiddle with several buttons until the application would deploy. There are a number of features for controlling the deployment, and configuration is not as simple as a push of one button. Deployment options include using the local server, deploying to a distant version of Zend Server, or connecting to phpcloud.com, and this flexibility comes with a price.
PhpStorm is the product of a company that also makes Java IDEs, in this case JetBrains, which may be better known for the highly regarded IntelliJ. JetBrains' PHP tool, however, doesn't come integrated with its Java tool, unlike many of the other IDEs described here. I suppose there might be some developers who are creating hybrid PHP/Java applications and might be disappointed by this, but I don't think there will be many. It's still possible to run both IntelliJ and PhpStorm on the same machine.
PhpStorm exhibits much of the same attention to detail that made IntelliJ popular. I still find IDEs like Eclipse to be a bit arcane, with their complex trees that often hide important jobs in some deep corner of the hierarchy. The folks at JetBrains have done a better job of cleaning up the UI and putting the buttons in places that are simpler to find and understand. All of the coloring and completion are here, but in a simpler form. Not that PhpStorm is simplistic -- for instance, there are six different preintegrated source control options, more than you'll find in the other tools.
Configuration benefits from a number of wizards to assist you in getting everything connected. While the other IDEs offer some fields that either work or don't, PhpStorm takes things a bit further.
NuSphere's PhpED is one of the older IDEs around, but it's one of the few that's avoided going astray and diluting itself by supporting every possible language. It's a PHP tool, and this is obvious from the moment you install it.
The tool comes with a sophisticated wizard for checking installation to make sure the debugger and the internal server were correctly configured. I found the simple wizard a welcome break from spending time trying to get the other IDEs to work with the server software installed. It's still possible to use PhpED with a separate version of PHP, but it's not necessary.
Not everything was perfect. The tools generally worked, offering all of the more sophisticated code manipulation features like code folding. But I had some trouble getting the IDE to connect to either MySQL 5.1 or 5.5 because it said I was using an old version of the client software. The forum would let me search, but then it would accuse me of generating automated searches for some reason.
Despite these issues, I found PhpED to be one of the easier tools to use. The user interface was snappy, and the integrated server made it simpler to start projects. PhpED is one of the most pleasant tools in the game.
To the file system, a PHP project is just a bunch of text. To the programmer, it's a complex stack of abstractions and logistical constructions. While some IDEs treat the code like text files, phpDesigner takes the programmer's view. It offers an elaborate set of templates and editorial menus that help you work with the logistical structure.
This structure is used in a variety of ways. The code completion learns your libraries, the search tool highlights any word you select with a double click, and the code explorer displays your code in a big tree. Poking around your code this way is quite useful, especially if it's not code that you wrote. The logical structure is often a bit easier to understand than raw text. There are separate lists for the constants, functions, and variables. If you want to find one, you click on that tree and the declaration appears.
The IDE also offers a fairly large collection of templates that can be useful if you can't remember the exact way to construct some method or line. You hit the Class button and
class appears in your code with the curly brackets. If you work the buttons correctly, you can write quite a bit of parsable code simply by clicking.
PhpDesigner is one of the few IDEs that carry its own version of PHP with it. If you create a PHP file, you can execute it and get the results in a number of different forms that range from the raw input to the display in your browser. I had mixed results with this feature. My version of Drupal, for instance, wouldn't execute correctly at first because the debugger wasn't connected properly.
It's natural to assume that NetBeans is an IDE focused on Java since it was built by Sun. But the NetBeans creators are also distributing a version focused on PHP. It still has plenty of Java-centric tools -- including a profiler that wants to know whether I want to instrument the basic Java classes too -- but there are plenty of other features for the PHP developer, including the standard coloring and code completion.
PHP editing works right out of the box, but testing takes a bit of configuration. I was able to get the IDE working with the classic WAMP distribution only after several trips to the php.ini file. NetBeans includes several hints for editing php.ini that appear when the debugger fails to connect after a few seconds.
PHP debugging is fully integrated with the IDE. If you drag your mouse over a variable name, it will post a balloon with the type of the variable and the value in it if it's a short one like an integer. A right-click will take you to the definition of a function. If you're a developer looking for a full IDE, it's pretty much what you want to see.
ActiveState's Komodo IDE is another editing powerhouse aimed at helping people build and debug not just PHP but Node.js, Python, Perl, TCL, and Ruby. The newest version, 7.0, adds more collaborative editing so that several people can work on the same document at the same time, presumably without doubling the number of bugs being created. There's also a mechanism that uses ActiveState's Stackato platform to deploy your code to the cloud or a local machine.
The editor offers many features for working with the marked-up files, including code highlighting, code suggestions, and code folding. The editors work with all of the HTML and CSS, helping build the final Web view. There's a visual editor that works well.
The debugger includes a number of options for doing more than just stopping. It can count how many times the breakpoints are hit and even execute a bit of code at the breakpoint. This may be the biggest help for tricky problems buried deep in the call stack.
The documentation talks about the "breadth" of the IDE, and PHP sometimes feels a bit lost in the shuffle. PHP seems to be just another language, while Python and Ruby seem to get more attention. There were several places where the documentation was out of sync with the machine, prompting me to scramble to the Web for answers. Komodo also wants to integrate with the local PHP server to handle debugging. I couldn't use just any local version of PHP that might be more helpful.
The PHP world is dominated by several major projects, and the folks who built CodeLobster know this. They created a collection of plug-ins that tune the IDE for work on leading platforms, including WordPress, Drupal, and Joomla. The plug-ins come with the professional version of the tool, which sells for $120.
The free version of the tool is a classic IDE with a file browsing panel, an editor, and a good debugging relationship with Apache and PHP. You create your project in the Web server's directory, then CodeLobster lets you edit and debug it. When you want to save your code, CodeLobster provides connections to the four major version control systems: SVN, Git, Mercurial, and Tortoise.
The most distinctive features of CodeLobster are the plug-ins that simplify working with the major PHP projects. The Drupal plug-in, for instance, bakes in knowledge of Drupal's code, so the IDE can complete method or variable names as you start typing them. The help section includes some basic documentation about Drupal's structure as well. There's also a wizard that will import Drupal and create new templates for modules.
CodeLobster does similar things for nine other leading projects. This is a smart focus because much of PHP coding is focused on extending these ecosystems through new plug-ins and modules. Many of the PHP coders aren't building their own projects from scratch, but creating something that will interact with the standard code base.
Andi Mann from CA Technologies explains how devops is being adopted more by the enterprise
Stanza's on-stage presentation at Demo Traction 2015
Expect Labs' on-stage demonstration at Demo Traction on April 22, 2015
Sponsored by Nuage Networks
Sponsored by Fibre Channel Industry Association
Java synthesized sound ideas, repackaging them in a practical format that turned on a generation of...
Here’s what to expect from the newly released build 10122
Clear Linux, Intel's new container-based distribution, bristles with ideas for how to run containers...
Oh no! Big data is failing because we can't find enough people who know the technology! Relax, they're...