The Well-Tempered PHP Developer
Almost 300 years ago, in 1722, Johann Sebastian Bach wrote a book (actually, two volumes) of preludes and fugues in all major and minor keys, “for the profit and use of musical youth desirous of learning, and especially for the pastime of those already skilled in this study”. This work, The Well-Tempered Clavier, was intended to demonstrate the ability of a single instrument to play in all keys. In the same vein, in this article, we explore a set of tools, widely available on Linux systems, for a well-rounded PHP developer.
Since its inception in 1995, PHP has grown a lot. The current stable version (as of May 2008) is 5.2.6, and version 6 is in the works. You confidently can say that PHP is currently used for millions of Web sites, on millions of servers, and it's probably the most popular Apache module, outdistancing all other Web scripting languages. Apart from being used to generate dynamic Web pages, it also can be used for command-line work (I have used PHP for text file processing, in order to upload data to a database) or for server-side scripting, providing Web services and other functions. So, it's a safe bet that you can use PHP for practically anything you might need.
However, most PHP developers use only a few tools for development. In true code-hacking style, they employ a text editor, usually vi or emacs, and the barest programming and debugging aids. It should be no surprise that there are several (plenty) available tools that can help produce better tested and debugged code, whether you're working on your own or as a part of a team. In this article, we examine such a setup, based on Eclipse and several interesting plugins. Of course, this shouldn't be taken as the only way of doing things, and if you look around, you'll easily find other IDEs (Integrated Development Environments) and tools. This article is intended to be a nudge in one direction, rather than a mandated road to follow.
Eclipse is an integrated, extensible, development platform or environment. Originally, it was called VisualAge and was created for Java development (mostly written in Java itself), but it was renamed and then extended with additional plugins, so it can be used with many more programming languages and development tools—UML diagram creation and DB management are just two examples.
Although originally an IBM project, since 2003, Eclipse has been governed by the Eclipse Foundation, which adds several well-known technology companies as strategic members. The future of Eclipse doesn't depend on a single company. Eclipse is available under an open-source software license (not the GPL, but similar), and it eventually might use GPL version 3. The current version of Eclipse (3.4, also known as Ganymede) reportedly includes more than 18 million lines of code.
Thanks to its Java origins, Eclipse runs not only on Linux, but also on other operating systems, which is good for developers who target more than a single machine. Internationalization aspects are taken care of, and there are translations for several languages. Finally, the integration aspect of Eclipse is very important. You can do all your development (including not only code writing, but also testing, debugging, documentation writing, version control management and more) from within a single program, with a common interface and style.
Starting in 2006, there has been a Simultaneous Release each year, covering not only the base Eclipse package, but also many other Eclipse-related projects. This is provided as a convenience, and it certainly helps avoid compatibility problems. The packages are named after the moons of Jupiter. In 2006, it was called Callisto. The 2007 version was Europa. And, in June 2008, as I'm writing this article, Ganymede has just been released. In this article, we use both Europa (Figure 1) and Ganymede (Figure 2) with an emphasis on the former.
I won't cover how to install PHP, Apache or related tools, but I do cover how to install Eclipse. Because of Eclipse's Java origins, first you need to get the Java Runtime Environment (JRE), although it's quite likely you already have it. I used the Sun 1.6.0 version, which already was installed. You could try using the IcedTea 1.7.0 version, but I cannot attest to its Eclipse (or other plugins) suitability. According to the Eclipse documentation, Java 1.5 should be good enough.
Getting Eclipse isn't difficult. Most distributions already include it, and you don't even need to visit the Eclipse Web site to download it, but it's likely you won't have the latest release. Go the Eclipse download site, choose the Eclipse Classic Project (version 3.4), and because the whole package weighs in at more than 150MB, select a close mirror. After the process is done, go to the directory where you downloaded the file, and do a tar zxf eclipse-SDK-3.4-linux-gtk.tar.gz. An eclipse directory will be created, and if you move to it and type ./eclipse, Eclipse will be up and running.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Server Hardening
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- New Container Image Standard Promises More Portable Apps
- The Humble Hacker?
- BitTorrent Inc.'s Sync
- The Death of RoboVM
- The US Government and Open-Source Software
- Open-Source Project Secretly Funded by CIA
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- Why Python?
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide