Re: Designing PHP applications
- From: Klaus <klaus.brune@xxxxxxxxx>
- Date: Wed, 11 Feb 2009 07:16:42 -0800 (PST)
On Feb 10, 6:18 am, Sweetiecakes <x...@xxxxx> wrote:
I'm planning on writing a PHP application (more specifically, an image
gallery application). How should I *design* this application? How would
installation be handled? Plugins?
How would the core be structured? I'd imagine that at least the frontend
would use some kind of MVC system.
The type of advice would depend much on your programming background.
For example, if you're new to PHP, but have been a C++ and C# software
engineer for years and years, then the advice would be PHP-specific.
Since that's the least likely scenario, let me start at the other end
of the spectrum.
Start by FORGETTING about PHP and learn about software development in
general. Two areas for immediate study...
1) Unit testing. This will save the life of your project, and once
you've learned how to do it, you won't want to program without it. One
of the best unit testing tools for PHP is NOT the one built into the
PEAR library, but this one (it's free)...
http://www.lastcraft.com/simple_test.php
2) Learn to document your code... HEAVILY, with clear reference to
what each function and each variable is supposed to do. As things get
more complex, you'll be grateful for the notes when you're trying to
figure out what your own code was supposed to do in a certain section
(not to mention trying to understand the code of others). As an added
bonus, when your documentation is structured and organized, the better
editing tools can read your descriptions and use them as pop-up "code
helper" when writing new code using that function, object, etc. Have a
look at...
http://www.phpdoc.org/tutorial.php
http://en.wikipedia.org/wiki/PHPDoc
And an IDE that makes good use of PHPDoc-style code syntax (also
free)...
http://www.activestate.com/komodo_edit/
Use a version control system. If you're on a Windows box, then
Microsoft Visual Sourcesafe is probably the easiest to learn to use...
it's also the priciest solution, though. Again, open-source comes to
the rescue. Have a look at CVS. CVS is a two-fold procedure, client/
server, which may or may not be on the same machine. For personal
development you'll want both. For Windows, you'll want a CVS
interface. These links are a good start...
http://www.nongnu.org/cvs/
http://www.tortoisecvs.org/
With all of the above tools at your disposal, it's time to look at a
framework. Not only to investigate the basic needs of a web
application, but you may very well decide to actually USE a framework
rather than re-inventing the wheel. For instance, at the very least,
it sounds like you're going to need a system that allows people to log
in. For that alone you'll need to consider all sorts of things like
(1) how to determine if a visitor is logged in, (2) how to keep the
log-in information relatively secure and difficult to hijack, (3) a
sign-up/registration prodecure for new users, (4) a password-recovery
method, (5) an email system for sending out the notifications (at a
minimum), with some type of throttle and queuing in place so that you
don't exceed the maximum email sends per your web hosting contract and
end up getting on all the anti-spam lists as well as possibly having
your account blocked by your server. Not likely until you get LOTS of
traffic, it's true, but better to plan for success than plan for
failure, right?
Here are some frameworks...
http://codeigniter.com/ (my favorite, mainly because it's lightweight
and has great documentation)
http://cakephp.org/
You might even want to have a look at the code of an open-source
content management system, expecially one that has a gallery module...
http://drupal.org
http://drupal.org/project/image
Once you've got all of THAT down, you might want to have a look at
programming methodologies (the word alone is scary) that make a use of
theme. Something like Agile Development or Extreme Programming (the
latter is most useful when working with a team).
Just my 3 cents (inflation, you know)
Klaus
.
- Follow-Ups:
- Re: Designing PHP applications
- From: bgulian@xxxxxxxxx
- Re: Designing PHP applications
- References:
- Designing PHP applications
- From: Sweetiecakes
- Designing PHP applications
- Prev by Date: Re: Designing PHP applications
- Next by Date: Re: At my wits end - php on AIX
- Previous by thread: Re: Designing PHP applications
- Next by thread: Re: Designing PHP applications
- Index(es):
Relevant Pages
|
Loading