All Projects → LaCodon → Famework

LaCodon / Famework

Famework is a simple to use PHP Framwork to easily create splendid but lightweight web applications.

Projects that are alternatives of or similar to Famework

puremvc-swift-multicore-framework
PureMVC MultiCore Framework for Swift
Stars: ✭ 17 (+112.5%)
Mutual labels:  mvc, mvc-framework
Actframework
An easy to use Java MVC server stack
Stars: ✭ 690 (+8525%)
Mutual labels:  mvc-framework, mvc
databind-js
A powerful and flexible MVC data binding library
Stars: ✭ 16 (+100%)
Mutual labels:  mvc, mvc-framework
simple-mvc
Simple push & pull MVC framework to realize a test-driven experience.
Stars: ✭ 24 (+200%)
Mutual labels:  mvc, mvc-framework
blockbase
Lightweight MVC Framework for Node.js
Stars: ✭ 32 (+300%)
Mutual labels:  mvc, mvc-framework
puremvc-delphi-standard-framework
A Delphi implementation of PureMVC (http://puremvc.org/)
Stars: ✭ 44 (+450%)
Mutual labels:  mvc, mvc-framework
W
Framework pédagogique de la WebForce3
Stars: ✭ 10 (+25%)
Mutual labels:  mvc, mvc-framework
libgitlmvc
C++ MVC framework for Qt
Stars: ✭ 73 (+812.5%)
Mutual labels:  mvc, mvc-framework
laminas-mvc
Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins
Stars: ✭ 90 (+1025%)
Mutual labels:  mvc, mvc-framework
Bingo-Framework
MVC framework for PHP
Stars: ✭ 15 (+87.5%)
Mutual labels:  mvc, mvc-framework
SmartMvc
深入解析SpringMVC核心原理:从手写简易版MVC框架开始(SmartMvc)
Stars: ✭ 66 (+725%)
Mutual labels:  mvc, mvc-framework
Koseven
Koseven a Kohana fork compatible with PHP7
Stars: ✭ 332 (+4050%)
Mutual labels:  mvc-framework, mvc
UMVC
UMVC - Model-View-Controller Generator built for Unity
Stars: ✭ 36 (+350%)
Mutual labels:  mvc, mvc-framework
auction-website
🏷️ An e-commerce marketplace template. An online auction and shopping website for buying and selling a wide variety of goods and services worldwide.
Stars: ✭ 44 (+450%)
Mutual labels:  mvc, mvc-framework
djburger
Framework for safe and maintainable web-projects.
Stars: ✭ 75 (+837.5%)
Mutual labels:  mvc, mvc-framework
aquiver
🚀 The aquifer is a java web framework based on Java8 and netty
Stars: ✭ 38 (+375%)
Mutual labels:  mvc, mvc-framework
Slim Born
Slim Framework 3 and 4 skeleton application has authentication MVC construction.
Stars: ✭ 179 (+2137.5%)
Mutual labels:  mvc-framework, mvc
velox
The minimal PHP micro-framework.
Stars: ✭ 55 (+587.5%)
Mutual labels:  mvc, mvc-framework
leafMVC
MVC "Framework" created from Leaf PHP Framework
Stars: ✭ 25 (+212.5%)
Mutual labels:  mvc, mvc-framework
miniPHP
A small, simple PHP MVC framework skeleton that encapsulates a lot of features surrounded with powerful security layers.
Stars: ✭ 147 (+1737.5%)
Mutual labels:  mvc, mvc-framework

Build Status CC0

Famework

Famework is a simple to use PHP Framwork to easily create splendid but lightweight web applications, based on a MVC pattern. See Wiki for further information and documentation!

Minimal setup

In order to make Famework ready to use, you have to do the following easy steps:

  1. Download the latest version of Famework from https://github.com/LaCodon/Famework/releases and unzip the folder in any folder on your webserver.

  2. Create your own project in a seperate folder an make sure it has at least the following folder structure:

    |- index.php
    |- .htaccess
    |- config/
        |- config.ini
        |- routes.ini
    |- controller/
        |- IndexController.php
    |- view/
        |- index/
            |- index.php
    
  3. Paste the following in your /.htaccess file ("/" is the root of your project folder)

    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
  4. Paste the following in your /index.php

    <?php
    
    use Famework\Famework;
    use Famework\Config\Famework_Config;
    use Famework\Registry\Famework_Registry;
    
    // the root folder of the application
    define('APPLICATION_PATH', __DIR__ . DIRECTORY_SEPARATOR);
    // the root folder to use in URLS; usually you can keep this as it is
    define('HTTP_ROOT', str_replace(basename(__FILE__), '', $_SERVER['PHP_SELF']) . '/');
    // the path to your /view folder
    define('VIEW_PATH', APPLICATION_PATH . 'view');
    // require Famework; yes, that's it!
    require '../Famework/Famework.php';
    
    // activate error_reporting and define default error and exception handlers
    // you can replace this with your own handlers
    // DEACTIVATE error_reporing on production
    error_reporting(E_ALL | E_STRICT);
    Famework::registerDeafaultHandler();
    // Famework::ENV_PROD for producation
    // this is just a nice constant
    Famework_Registry::setEnv(Famework::ENV_DEV);
    
    // initialize Famework
    $famwork = new Famework(new Famework_Config(APPLICATION_PATH . 'config/config.ini'), new Famework_Config(APPLICATION_PATH . 'config/routes.ini'));
    // this require statement is the simplest autoloader on earth, replace it with your own
    require './controller/IndexController.php';
    
    // handle request and load controller, because this is MVC pattern!
    $famwork->handleRequest();
    $famwork->loadController();
    
  5. Paste the following in your /config/config.ini file

    [famework]
    ; make sure you use the correct PHP const names
    public_root = HTTP_ROOT
    view_path = VIEW_PATH
    ; true means, that Famework_Session::start() gets called (session_start())
    use_session = false
    
    [database]
    ; db connection information
    ;db_dsn = "mysql:dbname=test;127.0.0.1"
    ;db_user = dbUser
    ;db_pass = userPassword
    
  6. Paste the following in your /config/routes.ini file

    [default]
    ; "{root}" means HTTP_ROOT
    ; e.g.: http://www.example.com/index/index calls IndexController::indexAction() and /view/index/index.php
    famework_route = {root}/:controller/:action
    famework_controller = :controller
    famework_action = :action
    
  7. Paste the following in /controller/IndexController.php

    <?php
    
    use Famework\Controller\Famework_Controller;
    
    class IndexController extends Famework_Controller {
    
        /**
         * this function is required
         */
        public function init() {
            // do some init for all actions
        }
    
        public function indexAction() {
            // sets the <title> tag to "Hello World"
            $this->_view->title('Hello World');
        }
        
    }
    
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].