Flash Framework – a high performance, open source web application framework for hackers

Flash Framework – a high performance, open source web application framework for hackers

flash-logo

Flash is a high performance, open-source web application framework. Flash web framework follows the MVT (Model-View-Template) architectural pattern or you can say MVC (Model-View-Controller) pattern because the controller is handle by the system. Flash is fast, lightweight, powerful, simple, and easy to use.

It allows users to create web applications in an easy and simplest way, in the framework users can create their own services and library.

Features

  • Fast and powerful web framework.
  • Extremely Light Weight.
  • MVT Architecture.
  • You can build RESTful APIs faster.
  • Security and XSS Filtering.
  • Simple and easy to learn.
  • Easy to deploy on any server.

Flash architecture

flash-architecture

Flash web framework based on MVT (Model-View-Template) architecture. The MVT (Model-View-Template) is a software design pattern. The Model helps to handle database. It is a data access layer that handles the database. The Template is a presentation layer that handles the User Interface part. The View is used to execute the business logic and interact with a model to carry data and renders a template.

Directory Structure of Flash

/system
/application
    /app
        /templates
        /models.php
        /views.php
        /urls.php
    /app1
    /app..n
    /templates
    /settings.php
    /urls.php
/.htaccess
/index.php

System directory

System directory is the main system directory of the framework, where all the system files are stored.

Application directory

Application is the main project directory that contains all your apps and project files. you can change this default application directory to a different location, set the new APP_DIR path in index.php to change the default application directory. All your app project files (settings, URLs) should be inside the application directory.

App directory

The app is a demo application of your project. You can create new apps like login, admin, news, blogs, or any app that you want. your app directory contains views, models, and URLs files.

Templates directory

The templates directory contains all your HTML template files.

Installation

Flash web framework is for PHP, so it requires PHP 5.6 or newer. now you won’t need to setup anything just yet.

Flash can be installed in few steps:

  • Download the files.
  • Unzip the package.
  • Upload all the Flash folders and files (application, system, .htaccess, index.php) on the server.
/public_html
      /application
      /system
      .htaccess
      index.php

That’s it, in the web framework, there is nothing to configure and setup. it’s always ready to go.

For Linux

A quick setup for Linux and Android devices.

$ git clone https://github.com/rajkumardusad/flash
$ cd flash
$ php -S localhost:8080 index.php

That’s it, in the Flash web framework, there is nothing to configure and setup. it’s always ready to go.

Simple Example

A simple Hello, World web application in the Flash web framework.

Create View

Let’s write the first view. Open the app/views.php file and put the following PHP code in it:

class view extends Views {

  function __construct() {
    parent::__construct();
  }

  function hello_world() {
    return $this->response("hello, world !!");
  }
}

Hello world view is created now map this view with URLs.

Map URLs with Views

Let’s create a URL and map with views. open app/urls.php file and put the following code in it:

//include views to route URLs
require_once("views.php");

$urlpatterns=[
  '/' => 'view.hello_world',
];

Now a simple hello world web app is created.

Documentation