HomePHP Building A Quick-And-Dirty PHP/MySQL Publishing System
Building A Quick-And-Dirty PHP/MySQL Publishing System
Looking to quickly add a dynamic news page to your corporate orpersonal Web site? This article shows you how, combining PHP's rapidapplication development capabilities with a MySQL database to create aprimitive news publishing system and administration module in just underfour hours.
In the highly competitive world of Web development, there's a crying need for a toolkit that allows developers to rapidly and efficiently construct dynamic, robust and scalable Web sites. This toolkit needs to be feature-rich yet easy to use, cost-effective yet labour-efficient, simple yet scalable.
Now, I may be biased or a fool (or maybe even both), but I'm going to go out on a limb here and say that PHP is that toolkit.
Think about it. The language is fast, robust and scalable. It's easy to use, comes with a great manual, and is backed by an enthusiastic user community. It comes with a rich feature set, and includes support for almost every new technology you can think of. It is, in short, the best open-source scripting language available today.
This is not just advertising. I've been using the language for over three years now, and it still amazes me with its capabilities. Constructing a dynamic, database-driven Web site in Perl would take me a week; with PHP, I'm done in two days, and my code is cleaner, more readable and less convoluted than my best efforts in Perl.
Now, if you're a cynical software programmer, all the rhetoric in the world isn't going to convince you. You're not going to believe a word I say until you see the truth with your own eyes. And so, over the new few pages, I'm going to demonstrate PHP's RAD capabilities by using it to build - very rapidly - a simple content publishing system for a Web site.
Before we begin, a little context. The application you're about to see was an actual development effort I undertook a few weeks ago for an existing customer of my company. This customer already had a PHP-based Web site, which we'd developed a year ago; however, it now required an addition, in the form of a dynamic, database-driven page for corporate news and press releases. I was tagged as the person to implement this addition.
I was told that the requirement was an urgent one, and that the customer needed it "yesterday". Since time travel is a feat I have yet to master, I was forced to decline this deadline, and instead promised to have something up and running in two days. This, then, is the story of how I spent those two days.