Re: Designing PHP applications



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
.



Relevant Pages

  • Re: I cant believe how complex this Format SDK is...
    ... technologies from low level interrupt programming to high-level user ... Sorry for any offence but I disagree. ... I find the documentation more than sufficient. ... -- In looking at profiles, am I even looking in the right place? ...
    (microsoft.public.windowsmedia.sdk)
  • Re: removing last chrs (with different browsers giving different last chrs )
    ... Documentation is just as important if you are going to be the only one to look at it. ... the best tool I've found for PHP programming is Crimson editor on Windows or vim on Linux. ... I don't have one function which tries to validate everything. ... This ensures the value is an integer and puts out a meaningful error message if it isn't. ...
    (comp.lang.php)
  • Re: I wonder if Windows REALLY support the C++ language
    ... Just to borrow from data structures and programming world ... so is the search time (and sometimes worse ... > So should have been with MS’ documentation – that is, ... The distinction is between GUI and console programming, ...
    (microsoft.public.vc.language)
  • Re: Beware wildcards in Kill
    ... as we "float" up into the sphere of advanced programming, the base constructs of what all is created from gets lost in the fog of ... > that documentation is often written by "technical writers" ... > who lack any real technical depth, ... > The only reason I happen to know the stuff I just told you ...
    (microsoft.public.vb.syntax)
  • Re: I wonder if Windows REALLY support the C++ language
    ... >> samples, any interface, etc., anything that pertains to programming ... > The MS documentation covers all supported languages. ... > excludes Windows CE and various other stuff): ... so is the search time (and sometimes worse than linear ...
    (microsoft.public.vc.language)

Loading