Friday, February 22, 2013

PHP : MVC : Framework

I really missed rails framework and available helpers a lot while working on PHP.
But I really learned a lot while finding the similar functionalities in PHP.
I tried the some of the available PHP frameworks but didn't find anything like rails.

So I started to define helpers and functions for my current PHP project.
Currently it's not complete but working with minor bugs.
Bugs like
  If I try to call view without .php extension it works fine, but with .php extension it crashes.

Still missing the actual flow of MVC (model, views and controller)(need to work on it).

Folder structure for this application is as follows:
  
app    
    |- assets    
        |- fonts
        |- images
        |- javascripts
        |- stylesheets
    |- classes
    |- helpers
    |- views
        |- Folder
  config
    |- config.php
    |- constants.php
    |- database.php
    |- path_includes.php
    |- routes.php
  docs
  includes
    |- classes
        |- application.class.php
    |- helpers
        |- common_helper.php
    |- php
        |- active_queries.php
        |- authentication.php
        |- base.php
        |- structure.php
        |- word_plurals.php
  lib
  index.php
  login.php
  logout.php
  navigation.php
  session_settings.php
  signin.php
  ReadMe.txt
  
Need to do lots of changes.
I have uploaded the code to GitHub. If anyone can help me to solve the current bug that will be a great help.

No comments:

Post a Comment