Strife Framework

A Fast and Lightweight PHP MVC Framework.

Smart, Handy & Neat URLs

<?php

// Using Controller
get('user-list -> /orders/:int/:any', 'OrderController@index');

// Using Closure
get('foo-bar -> /foo/bar/:str', function ($baz) {
    echo $baz;
});

// HTTP requests
post('foo-bar -> /foo/bar', function () {
    dump($_POST);
});

                    

Query Builder & ORM

<?php

use App\Models\Order;

class OrderController {

    public function($id, $date){
        $order = Order::where('id', $id)
            ->where(order_date, $date)
            ->order('order_date', 'desc')
            ->limit(10)
            ->get();

        render('list-order', compact('order'));
    }
}

Command Line Interface

strife@strife:/opt/lampp/htdocs/myapp $ php yamato
           ..      ..   ..     ..    -#      ..
 ,#   x#  - ,#=  ##;;##+,+#   -..x# ++#++ .#+,-#X
  ##  #    ,.##  #.  =#   #+   ,,-#  ,#   #+    #.
   #-#+  #X  +#  #   =#   #+ -#.  #. -#   #=    #.
    ##   #X.,##  #.  +#   #x =#..x#. .#-. .#+,-#x
   ;#     ,,.    .    .   .    ;,      ;,   ,;;
  +X    11/10/2015 - 02/07/2020

 Yamato is a Command Line Interface(CLI) tool that is
 made to interact with the Strife Framework.

Template Engine

@extend('layouts/app')

    <!--String Interpolation-->

    Hi, {{$user->first_name}}!


    <!--Loop-->

    {for($i = 1; $i < 10; $i++)}
        {{$i}}
    {endfor}

    <!--And many more!-->

@stop()

Strife: Blazingly Fast Framework

Speed Image

  • Template Caching: Achieve dramatic speed with efficient template caching mechanisms.
  • Compact Footprint: Strife maintains a small application size, weighing in at just ~500KB.
  • Independent: Built without reliance on 3rd-party APIs or libraries.
  • Optimized Performance: Features improved garbage collection for smoother execution.
  • Simple and Intuitive: Experience super straightforward coding, designed to keep development stress-free.


Database Management Made Easy

Migration
Build your database effortlessly using the migration manager.
Seeding
Populate your database using backups for quick setup.
Backup & Restore
Securely back up and restore your database using the CLI.
Multi-Database
Seamlessly switch between multiple databases as needed.

Form Builder / Interpolation / Auto-validation

The three essential functionalities in this framework work together to enhance security and streamline development:

Form Builder/Binding
Form Builder uses Auto-interpolation of values using form binding.
Form Security
Prevent CSRF, XSS, and Session Hijacking: Integrated mechanisms protect your application against common vulnerabilities.
Auto-validation
With the help of HTTP Request Handlers, you can create Form Rules.

Composer Packages

Strife Framework works perfect with Composer. You can still enjoy hundreds of thousands of available packages out in the wild!

strife@strife:/opt/lampp/htdocs/myapp $ php composer

   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/


Composer version 1.9.3 2020-02-04 12:58:49