Sep
25
2011
sas
This week I found an impressive chart on the web that illustrates the power of php frameworks. This benchmark shows how many requests per second a very simple web application can deliver. The test is targeting on the basic overhead of the framework, things like bootstrap initialization etc. This kind of overhead which every request have. So this benchmark is provided by the Framework Yii, and what a surprise, this framework is the best of all in this benchmark.
So far so good. The question that I ask myself was, how fast a django application (based on python 2.7), which also deliver this simple “hello world” will be?
I created a very basic simple django 1.3 application for testing the performance. I included this application into the code base from the upon drescriped benchmark application. The whole code is available to my github repository (including the code providing from yii).
Here are the interesting results (Requests per Second):

| Framework |
[#-Requests/sec] (mean) |
| cakephp-1.3.4 |
30.34 |
| symfony-1.4.8 |
45.89 |
| zend-1.10.8 |
60.15 |
| yii-1.1.4 |
100.48 |
| codeigniter-1.7.2 |
143.72 |
| django-1.3 |
431.76 |
Operating System: Kubuntu 11.04The testing environment is as follows:
- Web Server: Apache/2.2.17 (Ubuntu)
- PHP: 5.3.5-1ubuntu7.2
- CPU: Intel Core2Duo P8600 2.4 GHz
- Main Memory: 4GB
- Hard Drive: 300GB SATA HDD
no comments | tags: Benchmark, Django, Framework, php, Python | posted in Allgemein, PHP
Jan
5
2011
sas
If you are not sure which function have the best performance you can look up this at phpbench.com and find the best performance function call.
In my case i wanted to kwow how fast are the functions isset() and empty(): the result is they are exactly equal fast.
no comments | tags: php | posted in Allgemein, PHP
Oct
30
2010
sas

to show the git branch on the command promt set the PS1 var in .bashrc or .profile like this:
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\e[0m\]\[\e[31m\]$(git branch 2>/dev/null|fgrep '\''*'\''|sed '\''s/$/)/;s/^* / (/'\'')\[\e[0m\]$ '
no comments | tags: git | posted in Source Version Control
Jul
12
2010
sas
Intro
About the task of deploy a PHP application to a web-server exists a lot of tools and possibilities. The most of these tools are complicated to configure or difficult to use.
A very simple and integrated with CakePHP solution for this, i would like to introduce here.
Prerequisites
- CakePHP version 1.3
- remote access to your web server during FTP
- a command shell on localhost with configured cake-shell
Let’s start..
1. Installation
git://github.com/sassman/deployment_shell.git
put the code to directory “app/vendors/shells/”.
2. Create the configuration
2.1 Create the configuration interactive
like cake bake shell style the configuration can be created interactively.
cake deploy create_deployment_config
or
cake deploy
2.2 Create the Configuration manually
/app/config/deployment.php:
<?php
class AppDeployment extends BasicDeployment
{
var $default = array(
'source' => 'File',
'destination' => array('Ftp' => array(
'host' => 'yourftp_hostname',
'login' => 'username',
'password' => 'password',
'port' => '21',
'timeout' => '60',
'path' => '/html/app/beta/your_app'
)),
'exclusions' => array(
'files/attachments*',
'core.php'
)
);
var $live = array(
'source' => 'File',
'destination' => array('Ftp' => array(
'host' => 'your_ftphostname',
'login' => 'username',
'password' => 'password',
'port' => '21',
'timeout' => '60',
'path' => '/html/apps/your_app'
)),
'exclusions' => array(
'files/attachments*',
'/cake/',
'core.php'
)
);
}
?>
3. First Run
take a command line shell and go into your applications “/app” folder and type…
cake deploy
executes the deployment shell with the “default” configuration (default configuration descriptor see above).
and
cake deploy live
executes the deployment shell with the “live” configuration.
On this way you can provide one or many more of these configuration descriptors and with it many of deployment targets.
4. Remarks
The tracking of files witch was uploaded is implemented during a sha1 checksum from the file itself and saved in the context of a deployment descriptor. During this, every deployment descriptor provides it’s own change/update list of files.
Any Questions? Send me an email.
1 comment | tags: CakePHP, cakeshell, deployment, php | posted in Allgemein, CakePHP
Jun
8
2010
sas
Mit Visual Studio 2008 SP1 ist es leicht möglich eine Anwendung über Click Once bereitzustellen. Desweiteren kann man die erforderlichen Komponenten auswählen, welche der Click Once Installer dann direkt von Microsoft runterläd.
Wenn man jedoch die Komponenten (in diesem Fall .Net 3.5 SP1) mit vom Bereitstellungsort laden lassen möchte, um z. B. Netzlast zu sparen, führt das, in dem Moment wo man >Bereitstellen< drückt, zu einer Reihe von Fehlermeldungen.
Hier findet man eine lange Liste von Fehlern, welche im VS 2008 SP1 stecken. Unter anderem findet man auch, für das oben beschriebene Problem, unter 2.3.1.1 “Samesite für das .NET Framework 3.5 SP1-Bootstrapperpaket aktivieren” eine ausführliche Anleitung um dies zu beheben.
Viel Spaß beim Deployment!
no comments | tags: .NET, ClickOnce, VS2008 | posted in Allgemein, Software