panoye-f


Panoye-f - lightewieght php framework

Panoye-f

Panoye-f is a lighweight php framework used for the panoye (panoramic) photosharing site

HOWTO

You must have php5 and command line php5 installed (php5-cli) on your computer before starting with panoye-f. You would probably need mysql database also.

After unpackig the archive - go to the place where you want to create your panoye-f application. Type the following command in shell:

php -q app_tools/create_app.php

This will create the basic php scripts and directories for your web application:

  • app/
    • app/lib/ -> the place for all your classes
    • app/objects/ -> ORM classes generated by the framework (you can edit them later)
    • app/pages/ -> Page classes (one class for page)
    • app/templates/ -> HTML/PHP templates used in the application
    • app/test/ -> unit tests (you can delete existing and create your own, of course)
    • app/Application.class.php -> configuration
  • cache/ -> temporary cache data (you must empty it when you add new classes)
  • index.php -> ...
  • .htaccess -> ...

When you create new pages and/or classes in your application, you must clear your application's cache:

php -q app_tools/clear_cache.php

If you need to change any configuration settings - edit the app/Application.class.php. Every class must be saved in a ClassName.class.php file somewhere in app/lib or app/objects (but app/objects should contain only ORM classes).

DATABASE

Tables used with panoye-f ORM system must have these three columns:

  • ID - auto increment indeger
  • CREATED - timestamp (updated once on insert)
  • UPDATED - timestamp (updated on every $object->update() or $object->save())

If you want your pages to have "search engine friendly" links you must add also SEF_LINK column (VARCHAR). SEF links will bi created automatically on $object->insert().

CRUD pages

After installed - go to http://localhost/your_app/application. You can create ORM objects and CRUD pages there. Of course - do look at their source and change what you need.

DEPLOYMENT

When you deploy your application be sure to delete the app_tools directory, and set const DEBUG = false; in your app/Application.class.php!

QUESTIONS

If you have any questions - please ask them on the blog.

Project Information

Labels:
php framework panoye php5