Giter Site home page Giter Site logo

frawq's Introduction

AUTHER INFORMATION Name: Waqas Ahmed Email: [email protected]

I have added bootstrap css files already under assets folder. You just need to create template for your new project.

Installation:

  • Create folder for new project and add path in vhosts.
  • Placed downloaded code in newly created folder.
  • Make sure to edit following file: "src\config\app.php" and update base_url variable with the server address you have added in vhosts
  • Hit url in browser. If it says 'Welcome', then you have successfully configure frawq on your machine.

Help: I have created sample IndexController, it contains few actions to help you in your development. Added few Views to show how views works.

To understand the life cycle of framework. Following steps will be helpfull

  • Start with the file 'src/config/routes.php', you will see index '/' that means HOME page identifier. This index will tell which action to trigger. That action will tell which view to render.

  • Index '/' in route file has an array value. That array contains 'uses' index. This will tell which action of particular Controller is to call. e.g 'uses' => '\Controller\IndexController@index'

Let me explain you how it works. Divide the 'uses' value on the basis of @. Then it has two parts, first: '\Controller\IndexController' and second: 'index'. First part is the path to the Controller and second part is the action within that controller file.

Directory Structure:

  • src

    • config

      • app.php // Assign complete base url of your new site to base_url. You can access the $base_url variable any where in views // e.g assets/js/some.js

      • database.php // Add database information in this file

      • filters.php // Filters can be added here. Need to create a static function here, they called under routes.php under 'before' index // '/' => array('uses' => '\Controllers\IndexController@index', 'before' => 'isLoggedIn'),

      • languages.php // for multilingual you can use this file. But currently its functionality is not implemented yet

      • routes.php // that is the heart of frawq. It contains pure logic of request manipulation. All you have to create a route and link to // the controller that will entertain this request. // e.g '/' => array('uses' => '\Controllers\IndexController@index', 'before' => 'isLoggedIn') // '/' => is the URI // array contains the linked controller, also the filter if any applied

    • controllers // this folder will contains all your controller. // Make sure you have extends your controller from \System\Controller // I have created a sample Controller under this, you can get basic information from it

    • Models // This folder will contain main business logic and table related stuff // I have created a sample Model under this, you can get basic information from it

    • System // This folder is the backbone of the framework. Don't change any thing under it, untill you understand the framework flow

    • Views // This folder will contain html templates to create layout of site. // I have created some views for testing purpose.

  • assets

    • js
    • css
    • images // In order to add JS/CSS or any JS plugins use 'assets' folder.

frawq's People

Contributors

waqas385 avatar

Stargazers

Shahid Ahmad avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.