In this article we take a look at some of the most common features for enhancing your coding efficiency. Initially these productivity boosters may fall into the “Glad I Have It” category but they more often than not tend to move into the “Can’t Live With Out” category rather quickly.

The more you write code the more you will find repeatable routines to handle common programming tasks using code blocks called “Snippets”. Snippets can handle tasks like redirect a page, store a file, or auto commenting. Not having to write them time and time again, of course, is far more efficient. Snippets can easily be inserted and customised. Basic definition of a snippet is a static block of code, given a name like, “Comments Intro”, which can be inserted into the page by selecting it in a list. A good editor will allow you to convert any code selection into a snippet. However, let’s go beyond the basics with some more advanced features.

Many editors permit wrapping snippets that insert code above, and below, the current selection. Another advanced feature is the ability to attach keyboard shortcuts to your snippets, allowing you to recall a common snippet with just a keystroke or two. This can accelerate your coding. So can interpolation shortcuts, which are typically short code for things like the “Root File Name”, and other system variables. A few editors include ways to incorporate conditional code, like something that is dependent on the time of day or month.

Every editor will include standard keyboard shortcuts for code navigation and common operations. But, a really good editor also allows for custom shortcuts, or even editing the standard shortcuts. Many PHP coding tasks involve database connectivity. And, one of the many reasons PHP is so popular is because of its close affiliation with MySQL, a relational database.

If your PHP editor makes it possible to browse the data, or test statements on a specific database then “Code folding”, will become important to you. When your PHP page grows complex Code Folding will allow you to temporarily hide portions of the code to help you focus. The best editors make it easy to fold and unfold your code.

Built-in debuggers are great productivity boosters. Whether configuring an internal server, or an external one, with them, you can execute your code line-by-line, setting break points as needed, often conditionally. Monitoring variable values is essential in debugging.

Some editors even allow you to profile your code to isolate and remove bottlenecks speeding up code execution and improving performance overall.

Framework enhancements

The widespread popularity and availability of PHP has created a growth market, not only for general applications, but also for specialised frameworks. These frameworks include commonly used JavaScript functionality, like AJAX, PHP template engines from RainTPL to PHP Smarty, among others, have a solid base of editorial support. Moreover, numerous editors are designed to work with MVC or Model-View-Controller frameworks, including the popular CakePHP. There are also a good number of more specialised frameworks supported in editors.

Typically the features for these supported frameworks include code hinting and code completion, a syntax checker, pinpointing the framework, internal documentation of functions, methods, and properties, and the ability to execute the code from within the editor. If working with a particular framework is important to you pick an editor with a history of compatibility.

Share This

Share This

Share this page with your friends!