Fuel is a simple, flexible, community-driven php5 framework, born out of frustration with the tools available. This slogan meets us framework site -
fuelphp.com .
Developers - Dan Horrigan, Phil Sturgeon, Jelmer Schreuder and other community members. The guys were (are?) Active members of the Codeigniter community, but were disappointed in the pace of its development (now Codeigniter is being developed more actively, on two fronts - Codeigniter Core and the community-drive version of Codeigniter Reactor). As a result, Fuel was born. Well, let's take a closer look at it.
FuelPHP is licensed under the MIT license. Active development has been underway since October 2010, the release of the first beta version was planned for 1.1.11. But, as is usually the case in our difficult programming business, the deadline has been moved to 7.1.11. Despite this, you can already get acquainted with the source code, documentation and capabilities of the framework. And the possibilities are promising.
Requirements
- PHP 5.3 or higher
- Web server (tested on Apache, IIS, nginx)
Opportunities
Implemented:
- HMVC
- Cascade file system (as in Kohana)
- Pakages - modules to extend functionality
- ActiveRecord
- Oil command line utility (creating tasks for cron, performing migrations, running tests)
- Krumo Integrated Debugging Tools
- Classes for working with cookies, session, email, ftp, upload, security, form, validation, route, cache, etc.
Scheduled:
- Authentication Modules and ACLs
- Publish sample applications on github
Test Drive
Download the latest version from
github and unpack it at wwwroot / fuel. Directory structure:
public / - directory accessible from the web
assets /
index.php
docs /
fuel /
app /
cache /
classes /
controller /
welcome.php
model /
config /
logs /
migrations /
modules /
tasks /
tmp /
views /
welcome /
404.php
index.php
bootstrap.php
core /
pakages /
Go to http: // localhost / fuel / public /
')
Create your own default controller - fuel / app / classes / controller / testdrive.php:
<? php
class Controller_Testdrive extends Controller {
public function action_index ( )
{
$ this -> render (
'testdrive / index' ,
array (
'hello' => 'Hello Fuel!' ,
)
) ;
}
}
In the example above, the $ hello variable with the value 'Hello Fuel!' Is passed to the testdrive / index view.
Specify in the configuration file fuel / app / config / config.php a new controller by default:
'routes' => array (
// This is the default route. We use a "#" here
// reserved routes.
'#' => 'testdrive' ,
'404' => 'welcome / 404' ,
) ,
View file fuel / app / views / testdrive / index.php:
<! DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" >
< title > Fuel PHP Framework Testdrive < / title >
< / head >
< body >
<? php echo $ hello; ?>
< / body >
< / html >
We update the page and get our 'Hello Fuel!' Output.
findings
Fuel deserves the attention of php-developers who do not want to waste time on long-term study and configuration of heavyweight frameworks, but need modern tools for developing web applications. And considering only a little more than 2 months of age, we can expect even greater achievements from him.
Links
Framework site -
http://fuelphp.com
Source Code -
https://github.com/fuel/fuel
Support -
http://community.fuelphp.com/fuelphp
How fast is Fuel? -
http://dhorrigan.com/blog/article/how-fast-is-fuel
Introducing FuelPHP -
http://philsturgeon.co.uk/news/2011/01/introducing-fuelphp
Twitter -
http://twitter.com/fuelphp
Examples of applications on fuelphp -
http://scrapyrd.com ,
http://amiafucktard.com