(c) Alem - Alemmedia.com
miniMVC is an MVC framework for PHP designed to provide a simple base for application developement, giving you the freedom to hack your way to the rest.
It features:
- Clean, documented, object-oriented code
- Simple URI-routing
- Search engine friendly URLs
- A parameterized query builder
- A template-based MVC scaffold generator
- Automated 'lazy-loading' of mvc components
- Multiple application hosting
- Templating support
- Extension by third-party modules/classes,
- Built-in bootstrap and jQuery integration for agile front-end development
- CSV Logging
- PHP 5.3.0 or >
- Apache mod_rewrite and .htaccess override enabled.
-
Create the database for your application.
-
Generate the application skeleton using gimiMVC. ( Make sure the logs/ and cache/ directories are writable )
./gimiMVC.php -a MYAPP --generate
-
Define the relevant information in the new application's config/ files.
Config files to modify at the bare minimum: config/database.php and config/application.php.
-
Use controller by visiting the application's index.php in your browser
http://localhost/miniMVC/applications/YOURAPP/public_html/controller/method/variable
-
Hack away.
To make best use of the automatic loading methods and pre-defined parameters, it is highly recommended to adhere to these conventions.
For the miniMVC units 'foo' and 'foo bar':
- Class Name: FooController FooBarController
- File Name: controllers/FooController.php controllers/FooBarController.php
- Class Name: Foo FooBar
- File Name: models/Foo.php models/FooBar.php
- File Name: views/foo/index.php view/foobar/index.php
- Table: foos foobars
- Column: foo foobar
applications/ - Contains your applications.
default/
config/ - Contains configuration files for application.
controllers/ - Contains controllers
data/ - Contains schemas, xmls, and other relevant data files.
docs/ - Contains documentation, textfiles and notes.
models/ - Contains models
modules/ - Contains modules for extending the application
libraries/ - Contains library classes defining reusable methods.
public_html/ - Contains index.php and other publicly-viewable files.
media/ - Holds css, js, and imgs.
index.php - The "boot strapping" script
require/ - Contains required classes, scripts or files.
views/ - Contains views of various types
content/ - Contains views used to present content
error/ - Contains views used for errors
template/ - Contains views used for layouts and templates
shared/ - Contains views shared among multiple views
temp/ - Contains temporary files
system/ - Contains essential system classes.
tests/ - Contains tests for system classes.
gimiMVC - Generates MVC scaffolds
README.md - You're reading it.
.htaccess - Rewrites the url.