DooPHP - fastest MVC based PHP framework

Learn More

The Official Blog of DooPHP

News, Updates, Tips & Tricks for DooPHP

Subscribe to Blog

Subscribe to the official blog of DooPHP framework.

I18n Internationalization with DooPHP2009-07-26 03:49:14

I18n Internationalization with DooPHP

DooPHP can be easily extend to support I18n internationalization and localization for your web applications.

Basically, you just need to extend the DooController and add functions for translation in the template tags.

A demo on I18n is up at the demo section.

Please view it at: http://www.doophp.com/demos


Published under: News & Updates Share/Save/Bookmark

Tips on Configuration2009-07-23 11:20:27

Tips on Configuration

As you can see from the demos, DooPHP does not use any Globals or had any define() used in the code. All configs are done in common.conf.php where variables are defined in assoc array style.

Other than the default configurations which are all in Capitalized characters, you can define your own setting variables. It is recommended that you define them in lowercase as DooPHP might add on new configs in later versions.

$config['salt_key'] = 'jjr7&688e-h3er';
$config['blog_pagesize'] = 12;

#retrieve in your code via:
Doo::conf()->salt_key;
Doo::conf()->blog_pagesize;

This is one good thing about DooPHP as it will not conflict with your application since no define() or globals are used. Not a single one ;)


Published under: Tips & Tricks Share/Save/Bookmark

Benchmark Update2009-07-23 01:47:09

Benchmark Update

The graph at the benchmark section has been updated. After a discussion in the forums, Qeephp is re-benchmark with its QCache_PHPDataFile switched on in bootstrap.

Basically it loads the converted Yaml settings of Qeephp to PHP config variables $config just like what DooPHP is doing. And of course this improves the performance.

Doophp is also re-benchmark in production mode with the deploy script. Only common & routes config are loaded. The index.php contains:

include './protected/config/common.conf.php';
include './protected/config/routes.conf.php';
include $config['BASE_PATH'].'deployment/deploy.php';

Doo::conf()->set($config);
Doo::app()->route = $route;
Doo::app()->run();

While the common.conf.php is changed to use absolute path. The previous benchmark is done with the app folder in the archive doo-1.0.zip. It only contains:

$config['SITE_PATH'] = '/var/www/app/';
$config['BASE_PATH'] = '/var/www/dooframework/';
$config['APP_MODE'] = 'prod';
$config['SUBFOLDER'] = '/app/';

The benchmark in production mode:

the new benchmark

Previous benchmark:

the new benchmark

Of course, you can gain more performance by merging all configs into index.php but it SACRIFICE maintainability. So please be wise when you try to optimize your code ;)


Published under: News & Updates Share/Save/Bookmark

DooPHP Documentation2009-07-22 17:26:49

DooPHP Documentation

I have been receiving comments that DooPHP is not well documented as it advertised.

I want to make a correction here, the Documentation you guys are asking for is instead a Tutorial which is being written at the momnet. I know people like simple walkthrough like CodeIgniter user guide. HOWEVER, DooPHP is well documented, almost EVERY line in the source in Javadoc style! And please note that I have uploaded the Class reference documentation which is a common thing in framework or programming language such as Java and ActionScript. Like this Adobe document: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/BitmapData.html

With the complete Javadoc style comments in the framework source, you are able to use code hinting in your favorite IDE. With the API document, you can see every single function, their visibility, parameters, return types, descriptions, examples, etc... It is well documented and please do not criticize me on this. CI doesn't even have one.

What DooPHP needs now is a simple tutorial/user guide. For those who can't wait, simply view the demo which serves as simple tutorial.

Thank you, and please don't flame me on this :)


Published under: News & Updates Share/Save/Bookmark

DooPHP MVC Flow2009-07-22 15:45:25

DooPHP MVC Flow

A new page is added to the Guide section. This is a diagram that describe how DooPHP handles a user request.

doophp flow

For more infomation on MVC, you can read it up at Wikipedia. http://en.wikipedia.org/wiki/Model-view-controller


Published under: News & Updates Share/Save/Bookmark

About

Categories

Archives



Syndication