PHP survival kit
This is a template for web applications in PHP. It is not a
set of libraries like CPAN and it is not a framework like Ruby On
Rails. It is a survival kit which allows you to write
professional-level software fairly quickly on any machine you
happen to land on.
You get:
-
Web UI widgets
Bookmark-friendly page titles.
A stateful menu bar.
A title element on every page that matches the browser-level title.
-
Good filesystem layout
A well-factored hierarchy where things are easy to find.
A secure design where most files are not accessible via URLS.
-
RESTful architecture
Pretty URLs right out of the box.
No association between extensions in URIs and extensions of the code that handles the request.
Library functions to parse request URIs.
Libraries for direct interaction with HTTP, URIs, and HTML.
-
PHP-driven URL rewriting
mod_rewrite is the most important part of Apache since,
uh, Apache, but the syntax is so crazy that any reasonably
advanced rewrite rule will be indistinguishable from cat puke.
You have to do it in a real language to have maintainable
code.
-
Error handling
Strict parsing by default.
Pretty error HTML to allow you to keep up appearances.
A pre-installed and customizable error catcher to keep ugly error messages from scaring users.
-
A hackable code base
Easy to read, fix, and improve.
CloneKit is not for newbies. An intermediate PHP developer
should be able to cook up a web app within about 30 minutes, but
that's at the cost of newbie-friendliness. The documentation is the
source, and you have more than enough power to shoot yourself in the
foot. This is not a toy.
A note on the style of the libraries: these exist to fill in
niches that I couldn't find high-quality existing code for. There
shouldn't be anything that you can get a better implementation of
elsewhere, so they will seem to be strangely skeletal. There's no
database library, for example, because you can easily get a good one
elsewhere.