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.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- Returning Values from Bash Functions
- My +1 Sword of Productivity
- Tech Tip: Really Simple HTTP Server with Python
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Doing for User Space What We Did for Kernel Space
- Rogue Wave Software's Zend Server
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide