Feeds

NetBeans extension makes simple work of PHP

Preview in review

Secure remote control for conventional and virtual desktops

Arriving with the NetBeans 6.1 release last week was the NetBeans IDE Early Access for PHP. This provides a complete PHP integrated development environment hosted in NetBeans, re-using the infrastructure NetBeans has already employed for Java and Ruby.

Having walked through the main NetBeans IDE, I thought it worth looking inside the PHP update to see what it offers one of today's most popular languages.

Available as a separate download via the NetBeans site, the early access installs separately from any existing installation of the IDE, making it safe to play with without risking any productive development environment.

Installation is straightforward on the main supported platforms - Windows, Linux, Solaris and Mac OS X - but there are some entry level requirements to make it useful as a PHP environment. You'll need a working installation of PHP 5.x, a PHP debugger (XDebug is strongly recommended), a web server (Apache) and a database server (MySQL gets the most support out of the box).

If you already do some PHP development you'll have all of this in place, if not then you'll need to get it all up and running before you can do anything useful. For those who like things easy, the best bet is to download a single package to get the works, such as XAMPP for Windows or Linux.

Click and create

Once everything is in place, creating a PHP project is as simple as selecting File > New Project or clicking on the New Project button on the toolbar. The New Project dialog box gives you the chance to enter the directory for your source files (such as PHP, XHTML and CSS), the directory on the web server where you'll deploy these files, and the URL for the application. Along with these, you also get the option to create an index.php file as the entry point of your application.

As you'd expect from an IDE all of the editor functionality is in place with PHP syntax highlighting, code completion, integrated help, error flagging and so on.

The code completion is context sensitive, so entering $ inside the PHP directive gives you access to the run-time variables (such as $_SERVER). Anywhere else on the page, the $ symbol is just that. You also get drag and drop from a palette of HTML elements such as tables and forms. Code folding, formatting and ease of navigation - the kinds of features you'd expect from a PHP editor - are also present and correct.

There's more to building an application than cutting code, though. On the database and server side of things there are some nice NetBeans features. While NetBeans includes support for a number of different servers and databases, it's MySQL that gets pride of place - no big surprise given Sun Microsystems now owns MySQL. This makes it easy to hook up to a MySQL database server so that you can interact directly with the database for your PHP app.

You can also create a file with a .sql extension (though for some reason there's no menu option to create a SQL file) and use that to run queries that define and/or change your database. For those used to the Rails set-up/tear down way of working you can pretty much achieve the same using these text files to define your database during development. When you're debugging, meanwhile, you can even craft ad-hoc queries and look at the grids of data that you get back.

Other supported file types include CSS, XHTML, XML and JavaScript. Again you get the usual range of editor support functions such as color coding and so on. In the case of CSS support there is also a style builder with preview, making it straightforward to put together the styles for your application. The JavaScript side of things is also very well handled - support for dynamic languages and scripting in general is, after all, a key component of NetBeans.

One of the other benefits that comes for free is version control - with support for CVS, Subversion and now Mercurial version control systems.

Missing pieces

Having said all this, it pays to remember we're dealing with an early access release, so there are still some rough edges while some nice-to-have features are still missing. An example of the former is control of the browser, which could be better. Running your application fires up whatever browser you've defined as your default, but for those who want to test with different browsers from within their IDE a degree of choice would be nice. On the latter, for the moment, there's little in the way of refactoring support. This would be something to look for in a finished product.

Overall, though, this is another big step forward for NetBeans in the march towards being the IDE of choice for dynamic languages and scripting. While there is competition out there, solid support for Ruby, JavaScript and - now - PHP, combined with the fact improved support for Jython is on the horizon, means NetBeans is showing the most pace.®

Secure remote control for conventional and virtual desktops

More from The Register

next story
PEAK APPLE: iOS 8 is least popular Cupertino mobile OS in all of HUMAN HISTORY
'Nerd release' finally staggers past 50 per cent adoption
Microsoft to bake Skype into IE, without plugins
Redmond thinks the Object Real-Time Communications API for WebRTC is ready to roll
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
Moz man claims the win on rivals' own benchmarks
Yes, Virginia, there IS a W3C HTML5 standard – as of now, that is
You asked for it! You begged for it! Then you gave up! And now it's HERE!
FTDI yanks chip-bricking driver from Windows Update, vows to fight on
Next driver to battle fake chips with 'non-invasive' methods
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Ubuntu 14.10 tries pulling a Steve Ballmer on cloudy offerings
Oi, Windows, centOS and openSUSE – behave, we're all friends here
prev story

Whitepapers

Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
New hybrid storage solutions
Tackling data challenges through emerging hybrid storage solutions that enable optimum database performance whilst managing costs and increasingly large data stores.
The Heartbleed Bug: how to protect your business with Symantec
What happens when the next Heartbleed (or worse) comes along, and what can you do to weather another chapter in an all-too-familiar string of debilitating attacks?