BuBOL Development Frequently Asked Questions
Q: Why didn't you use PEAR::DB, PEAR::HTTP_Session,
PEAR::PurpleMonkeyDishwasher, etc. ?
A: First of all, I think PEAR is an excellent idea. By day, I'm a
mild-mannered Perl hacker, so I know how indispensable CPAN is to the Perl
community, and I think it's fantastic that the PHP community is doing something
similar. However, there are a few reasons why I chose not to use several PEAR
packages that seemed like they'd be a perfect fit for BuBOL:
- Dependency Hell: There have been a couple of PEAR reliant PHP apps
I've gotten in the past that had a dependency hell situation going on.
Example: Application Y requires PEAR Package A, B, and C (each with specific
minimum version requirements). Turns out I didn't have Package A at all, so
I installed it, but then I discovered in order to use Package A, I needed to
update my version of Package D. So after doing that I found myself in a
similar situation with Package B, and so on, and so on. I realize this can
be gotten around by simply distributing required PEAR packages with your
application, but one could argue that defeats the point of breaking software
into re-usable, distributable modules (and that's another discussion beyond
the scope of this FAQ ;-)). This leads into...
- Reliance on a single infrastructure package: From what I've seen,
all (most? some?) PEAR packages rely on the top level PEAR package. While
I'm no expert on PEAR, it seems that the PEAR package itself provides
several shared/infrastructure methods for the rest of PEAR. While this seems
like a good idea in theory, I personally don't really care for it in
practice (see the previous point on dependency hell). Of course you could
throw it back in my face by saying "But Russ all (most? some?) classes
in BuBOL rely on a single infrastructure class!". And you'd be right,
but in my defense: a.) BuBOL is basically a package in its own right, so who
cares how the internal class hierarchy is structured and b.) I consciously
chose to design BuBOL that way, that none of the pieces of BuBOL could be
incredibly useful without the others. It was my choice and I made it ;-P
- Purely academic/pathological reasons: I'm a geek, there's no
denying it. And like many geeks, I get impulses to take it upon myself to do
some totally round-about, reinvent-the-wheel, pain-in-the-ass project simply
for my own twisted sense of self satisfaction. Why didn't I use PEAR::DB? I
woke up one morning and told myself, "I'm gonna write my own abstracted
data persistence layer in PHP, and I'll have a damn good time doing
it!". And there you have it.
And (for the moment) I'm quite happy with my choice of packaging,
architecture, design, etc. So before you ask, no, there aren't any secret future
plans of using any parts of PEAR. I've made my choice, and isn't that what FOSS
is all about? :-) -rmt_4 (aka russ)
Q: What tools do you use/recommend for BuBOL development?
A: The following is a list of tools that I personally use and I think
are incredibly helpful for developing PHP/MySQL apps. While many of them are listed
for Win32 only, some of them are Java based (and therefore fairly cross-platform
:-)) there are probably versions of similar tools for other platforms as well.
- Eclipse :: The
Eclipse platform/IDE is an excellent, free open source development IDE.
While the base Eclipse download is geared towards Java development, there
are a plethora of plugins that make it incredibly useful for many other
languages, tools, and purposes (see below).
- xored TruStudio :: This
is a fantastic free plugin for Eclipse developed by xored software that provides
for PHP syntax highlighting, debugging, syntax checking, and PHP documentation
cross referencing, all in a nice single package.
- XMLBuddy :: XMLBuddy is
another great Eclipse plugin for working with XML and other markup language
files (XHTML, etc.).
- QuantumDB Eclipse
Plugin :: This is another excellent free plugin for Eclipse that provides
some very nice interfaces for connecting to and managing many popular RDBMSs. It
gives you the ability to manage schemas, tables, etc, review table column info
and row data, and send your own SQL queries to the DB.
-
MySQL Connector/J :: Connector/J is the official MySQL JDBC driver. This is
needed if you want to connect your QuantumDB Eclipse plugin to a MySQL
database.
-
DBDesigner 4 :: This is a very slick GPL'ed database schema design product.
- WinCVS :: WinCVS is an
excellent GUI front end to CVS (a popular open source version control system).
Aside from providing nice GUI functionality for just about every CVS operation,
WinCVS also provides some excellent diff'ing and version tree graphing functionality
as well. Obviously for Win32 only.
- WinMerge ::
WinMerge is a great GUI diff/merge utility for Win32 systems.
- W3C Markup Validator ::
An online markup validation tool (XHTML, HTML, etc.). No excuse for non-standards
compliant templates! ;-)
- Metapad ::
A fast, but featured text editor good for quick and dirty edits (or writing XHTML
;-))
-
sqlschema2html :: Shameless plug ;-) This is a perl script I wrote to munge
the BuBOL .sql files which contained the table definitions and produce a neat
little HTML page for easy documentation. If you're going to tinker with the table
schema, then this is a must to keep your docs up to date :-)
Q: Recommended Reading?
A: Here's a list of books I've found helpful for PHP and design/development
in general. All the links go to Bookpool.com,
which if you don't know, offers some very nice discounts on technical books. I'm not getting
paid by them in anyway, I just think they're a great store more people should know about :-)
- PHP Bible ::
Good book to get started in PHP, or to have a handy hard copy reference for many aspects of the
language (warning, it only covers up to PHP 4.2 but it's still pretty good IMO).
- Advanced PHP Programming ::
Fantastic book to take you to the next level with PHP (and some generalized programming/design
concepts as well). It focuses on what's new in PHP5, but assumes you already have a good working
knowledge of *how* to program in PHP. Now this shows you how to apply what you know. 10 thumbs up! ;-)
- Object-Oriented Design Heuristics ::
Pretty good book about general OO design concepts, not tied down to any particular language.
- Design Patterns ::
The famous Gang of Four (GoF, Go4, etc.) book. Every serious developer has at least *heard* of this
book. If you've never read or don't know what it's talking about, I think you'll find it very
informational. Even if you don't take anything directly from it, this book should at least
get you thinking about different ways of doing things in OO design.
$Id: development_faq.html,v 1.1.1.1 2005/01/01 19:48:07 russ Exp $