PHP Classes

Amp Frame: MVC framework for developing Web applications

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 169 This week: 1All time: 8,861 This week: 42Up
Version License PHP version Categories
ampframe 1.1GNU General Publi...5.6PHP 5, Libraries, Design Patterns
Description 

Author

This package implements a MVC framework for developing Web applications. It provides:

- Routers allow you to use the front end controller to manage web pages, APIs, RSS feeds, etc.
- Protected objects use extended classes so that you can add your own functionality without the worry of upgrading.
- Support for traits to use as method toolboxes for all objects.
- Models for MySQLi object oriented and procedural methods included for database management.
- Views to deliver web pages through a template system included. Template system supports multiple routes, children and skins.

It also supports Bootstrap 4 so that you can deliver responsive content, as well clean, pretty, restful url's included through the front end controller without using mod-rewrite.

Picture of Dave Smith
  Performance   Level  
Innovation award
Innovation award
Nominee: 32x

Winner: 7x

 

Recommendations

Website structure
I need a basis structure to build my website

Example

<?php
/*
!!!THIS FILE IS NOT SAFE TO MODIFY!!!

AMP Frame ver 1.0.0
index.php
Front End Controller

Copyright (C) 2018 AMP Apps www.ampapps.com

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

//*allow files to be included*//
define('AFALLOW', true);

//*include pre process scripting*//
if( is_file('preproc.php') ){
    include_once(
'preproc.php');
}

//*define the standard script root*//
if( !defined('AFROOT') ){
   
define('AFROOT', str_replace("\\", '/', __DIR__.'/') );
}

//*handle configuration*//
include_once(AFROOT.'config/config.php');

//*start script initialization*//
$initFile = AFROOT.'config/init.php';
if(
is_file($initFile) ){
    include_once(
$initFile);
}else{
   
trigger_error('Initialization file <em>'.$initFile.'</em> not found<br>Check that the path is valid');
    die();
}

//*include post process scripting*//
if( is_file('postproc.php') ){
    include_once(
'postproc.php');
}

//*deliver the view*//
$afView->deliver();
?>


Details

ampframe

PHP based framework using the Model-View-Controller architecture.

What is it?

AMP Frame is a core framework built for developers and designers to quickly launch web pages and services. It seperates the developers coding task on the back end from the designers display task on the front end with a controller driven templating system.

How does it work?

It is built using the model-view-controller (MVC) pattern where a controller manipulates a model which provides data for a view to deliver. It also contains a router so that different routes can be triggered from different requests and multiple models can be loaded as needed.

What can it do?

AMP Frame can do anything a model can be developed for. It ships with a page model and view for displaying web pages, two mySQLi models (procedural and object methods) for handling database operations, an error model for error handling and a model to manage clean URL's. While those models cover common uses, they really only scratch the surface of what is possible.

Is it easy to use?

When developing anything, you have to weigh the ease of use against the performance cost. AMP Frame was developed with performance and flexibility at the top of the requirements so it is not a plug and play system where you have to work around what you get. Anyone with a working knowledge of PHP and HTML should find it easy to work with, especially to implement the capabilities of models and systems already developed.

Models are currently being developed and can be found at Amp Apps


  Files folder image Files (113)  
File Role Description
Files folder imageconfig (4 files)
Files folder imagecontrol (1 file, 3 directories)
Files folder imagedocs (4 files)
Files folder imagemodel (12 files)
Files folder imageresource (1 file)
Files folder imageroute (5 files)
Files folder imagetemplate (1 file, 3 directories)
Files folder imagetrait (2 files)
Files folder imageview (3 files)
Accessible without login Image file favicon.ico Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file postproc.php Example Example script
Accessible without login Plain text file preproc.php Aux. Auxiliary script
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:169
This week:1
All time:8,861
This week:42Up