PHP IDEs II - Dreamweaver CS4
Home Tutorials Reviews Weblog

Review: PHP IDE-Integrated Development Environs II
Feature: Adobe Dreamweaver CS4 continues to slowly improve its PHP support
Dreamweaver CS4 continues to slowly but surely improve its support of PHP; but this is an advantage that clearly Macromedia and now Adobe have frittered away. As in the case of JavaScript support, Dreamweaver has had the IDE and basic Dreamweaver foundation in place for the past 8 years and just has not taken advantage. This means in the case of PHP, CodeGear and others have taken a lead in features and functionality. Ditto for JavaScript, where Aptana, MyEclipse and others now lead the JavaScript IDE parade.

Yet the payoffs of a good PHP IDE are there for all to see -

over 20 million domains use the software and its is being used in increasingly sophisticated and popular Web applications such as Drupal, Gallery, Joomla, OSCommerce, WordPress and dozens of others. Associated with all of these tools is a robust market of 3rd party tools and extensions. Also PHP fits well into new Web Services and AJAX systems designs. So there is a solid market for a PHP IDE.

And Dreamweaver CS4 adds to its editing capabilities and code snippets for database development with the new Live View now allowing users to see right in the IDE test server results including error messages. It is not yet line by line debugging but with breakpoints and watches;but it certainly does speed up the debugging process. Also the availability of Spry widgets allows developers to try new ways of laying out and controlling their PHP driven Web pages. The table below highlights in green where features are full supported and in yellow where there is at least partial support in Dreamweaver CS4.
   
Dreamweaver CS4 Support of key PHP IDE
IDE Feature
Payoff
Editor - code completion and syntax coloring faster development, fewer coding errors
Editor - auto line-numbering, code collapsing, comments ease of finding returned error codes in testing
Editor - class, function tree faster code navigation, and code checking
Editor - code snippets and templates faster, safer code development using tested code
Editor - built-in database explorer able to confirm and set database properties quickly
Debugger - display runtime results in IDE convenience and speed of debugging
Debugger - step through source code track down bugs more completely and quickly
Debugger - user breakpoints and watches see variables at the suspected "scene of the crime"
Debugger - assign a variable a new value prolong getting useful results from debug session
Debugger - server-side as well as client-side support prevent black-hole doubts where error is occurring
Visual Layout - use of drag and drop components better prototyping of apps look and feel
Visual Layout - alignment, spacing, sizing options faster fixes for many styling changes
Visual Layout - properties table for widget attributes
more precise control of customizations
Visual Layout - multiple layout and boundary conditions what happens on resizing of widget or whole window
Visual Layout - database, Web Service aware widgets dialog-based customization of tricky coding
Scripting - variables and if conditions simple replacement templates, customize rote tasks
Scripting - loops and file reads advanced template-driven code generation, testing
Team - check, in checkout basic safety net of concurrency control
Team - collaboration, shared task list, messaging crucial for dispersed development teams

Dreamweaver CS4: Features for PHP Development

Now this version of Dreamweaver CS4 is the beta available for download and trial at Adobe Labs. Because it is beta code the features are not completely set. But Dreamweaver users will find some major sculpting of the IDE to provide much easier to use workspaces including a number of presets. Here Adobe is taking a cue from the popular Perspectives and Workspaces used in Eclipse. In addition, Adobe has standardized not only the look but also the behavior of its various dialogs and panels in Dreamweaver, Contribute, Fireworks, Flash, Photoshop and other CS4 interfaces. This is welcome because there was a learning skew among the tools with slightly different dialogs and behaviors.

What one can see from this screen, is that Dreamweaver continues to support a fully featured PHP aware editor with two missing ingredients. First there is no PHP code completion as in PHP Eclipse and other PHP IDEs. Second the full PHP Manual is not available, but the O'Reilly Reference does provide sometimes faster references but to a slightly behind version of PHP. However, the editor did not get in the way and certainly helped in our PHP database exercise. But the most notable missing features are in Debugging and Visual Layout where Dreamweaver CS4 just begins to provide features like LiveView and Components but is still far from the capabilities of an full development IDE like NetBeans, JDeveloper, Eclipse or Visual Studio. A database test will demo how close Dreamweaver CS4 is.

PHP Database Test

One of the most common uses for PHP on the Web is to display some database data. This example is pretty straight forward - display vendor information from a Toolist database. The SQL requires only a WHERE clause to filter for MySQL tools. The important point is that Dreamweaver with its Database, Server-Behaviors, Components and Binding dialogs leads the user through a simple fill in the blanks exercise which, when completed, generates all the PHP code and MySQL connection scripts required for the App.

There is no drag and drop of GUI components, no property sheet to customize the components at will but rather a sequence of template building steps. Strangely, this is where Dreamweaver CS4 has some competitive advantage. Because the user is lead through most of the steps by a dialog 's checklist of operations - there is less chance of the user missing a step in setting up a component. And the code that is generated is straightforward and simple (45 lines in our case) . Compare this to the code produced by say PHPRunner or Delphi for PHP which each generated well past 250 lines of code spread over many files for roughly the same problem. So this made it very simple to understand the code produced by Dreamweaver CS4 for adding a couple of features to the program including the display of alternate shading for each row of output as seen in the screen shot above.

Also the availability of LiveView allowed us to see the output directly in Dreamweaver making the debugging faster and easier. Errors were unfortunately debugged line by line, one at a time. But these were errors not in the Dreamweaver generated code but from our additions. This debugging session was comparable to what PHP Designer 2007 delivers - faster and especially helpful when doing test-driven development; but clearly not yet the full powered debugging one is used to in say Eclipse or Visual Studio.

So, if we look at the complete PHP IDE feature set in the table above, Dreamweaver CS4 still leaves Visual Layout empty and most of debugging with little support. If you have an elaborate input screen or menuing +display app to do, Dreamweaver CS4 leaves you largely on your own. However, Dreamweaver CS4 does one thing very nicely - all include/requires files are opened when the main PHP file itself is opened (see mytools.php in the IDE screenshot above)- this makes editing and tracking down bugs a lot easier.

Summary

Dreamweaver CS4 reflects the very broad nature of Web development. Macromedia/Adobe have chosen to emphasize features and now LiveViews for HTML, CSS, and JavaScript. PHP, Cold Fusion, ASP, XML, JSP have been second tier. As you can see from the table on PHP IDE features, Dreamweaver CS4 is maybe 60-70% complete. But there is a famous Mozart opera about the fruitlessness of trying to be the Servant of Many Masters. Dreamweaver's success may be measured in how well it has juggled the task of serving its many web programming masters, including PHP.

Top of Page  Home  Tutorials  Developers Weblog  Graphics Reviews and Tips