Code Monkey home page Code Monkey logo

slim-fizbuz's Introduction

Slim-FizBuz

Abstract

This is a place to explore best practices and a sain base for php projects. Most critisizme against php aren't language based, but are related to lack of project structure, and insufficant use of best practices. One directory (flat implementations) are hard to secure and a bear to undertand. Your project can be improved by implementing any of the parts of the project within. The components listest bellow in this readme for your convicence.

For Exsisting Code bases

I've found great benefits converting to the slim framework for current projects. For these projects I leave out template integration, and copy the current php files into the template directory. Then recreate the routes in the index page(btw the most time intensive step) and presto; you project is light years ahead in terms of structure and understandability.

Parts

###Slim Microframework### This slim framework is the crux of this whole project. It gives strucutre where there once wasn't any.
###Bootstrap### Is is a front end framework used to aid in css and javascript formating for quick prototyping. I've found that after the first few iterations, you will probably replace this, but it aids in getting things off the ground by making css not your biggest problem. ###orm### An orm is includes, but not used in this project. I suggest you use one. They enhance readability substantially, as well as help guard aganst some security issues such as sql injection ###Twig### Is a templating engine. Twig is included in three steps.

slim-fizbuz's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

slim-fizbuz's Issues

[EXPIRED] Add Twig setup instructions

Slim-Fizbuz does not work out of the box.
It fires as follows

Warning: Uncaught exception 'ErrorException' with message '
require_once(/usr/share/php5/PEAR/Twig/Autoloader.php) 
[function.require-once]: failed to open stream: 
No such file or directory' in D:\www\domains\localhost\libs\TwigView.php:87
Stack trace: #0 D:\www\domains\localhost\libs\TwigView.php(87):
Slim::handleErrors(2, 'require_once(/u...', 'D:\www\domains\...', 87, Array)
#1 D:\www\domains\localhost\libs\TwigView.php(87): TwigView::getEnvironment()
#2 D:\www\domains\localhost\libs\TwigView.php(73): TwigView->getEnvironment() 
#3 D:\www\domains\localhost\libs\Slim\View.php(144): TwigView->render('index.twig')
#4 D:\www\domains\localhost\libs\Slim\Slim.php(603): Slim_View->display('index.twig')
#5 D:\www\domains\localhost\index.php(45): Slim->render('index.twig', Array)
#6 [internal function]: {closure}()
#7 D:\www\domains\localhost\libs\Slim\Route.php(392): call_user_func_array(Object(Closure), Array)
#8 D:\www\domains\localhost\libs\Slim\Slim.php(1047): Slim_Route->dispatch()
#9 D:\www\domains\localhost\index.php(73): Slim->run()
#10 {main} thrown in D:\www\domains\localhost\libs\TwigView.php on line 87

Fatal error: TwigView::getEnvironment() [function.require]: 
Failed opening required '/usr/share/php5/PEAR/Twig/Autoloader.php' 
(include_path='.;D:/www/modules/php/PHP-5.3.23/;D:/www/modules/php/PHP-5.3.23/PEAR') 
in D:\www\domains\localhost\libs\TwigView.php on line 87

Obviously Twig is missing, but there are no instructions where to place it.

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.