BlogKontaktTagcloud

Zend Framwork 1.5 is out

I know, that's definitely old news. But still it's worth to mention that the Zend Framework 1.5 is out since some weeks. It's a big jump from Zend 1.0 but also they have a lot new features in there (and probably some Zend Developers drink too much Java). They have also a new and cooler website for the project now.

In my point of View specialy the improvment in Zend MVC makes the framework now usable for companies with a lot of developers working on the same project (without patching the code over and over again).

The full list of improvments:
  • New Zend_Form component with support for AJAX-enabled form elements
  • New action and view helpers for automating and facilitating AJAX requests and alternate response formats
  • Infocard, OpenID, and LDAP authentication adapters
  • Support for complex Lucene searches, including fuzzy, date-range, and wildcard queries
  • Support for Lucene 2.1 index file format
  • Partial, Placeholder, Action, and Header view helpers for advanced view composition and rendering
  • New Zend_Layout component for automating and facilitating site layouts
  • UTF-8 support for PDF documents
  • New Nirvanix, Technorati, and SlideShare web services
Ähnliche Beiträge:
Coding Contest addicted
Coding Contest
Array instead of switch-case in php
A eventfull PHP-Week
PHP Programming Contest
Comments (0)  Permalink

Coding Contest addicted

As I allready mentioned I can't let my finger from coding contest. Unfortunately Bob found in a comment in my blog more nasty stuff about links in html comments which makes parsing even harder.

I trimed my script again under the size of the original script (ok, nearly the original), but I think if my regex skills would be a bit better, I could still squeeze some bytes out of it. But as I go finaly to holiday tomorow I will send my script to Paul and hope to get some points for the shortest script, as it will definitely not win any price for speed or beauty (did not wrote so ugly code since ages).

BTW: If you still trim you script, I brought up a new testfile. You should still come up with the same 11 links. This testfile is so ugly that my old konqueror is not able to parse it correct (but the comments are absolutly valid, according to the documentation and the validator).
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest
Array instead of switch-case in php
A eventfull PHP-Week
PHP Programming Contest
Comments (0)  Permalink

Coding Contest

Unfortunatly I can not resist if somebody brings up a coding contest. This time Travis and Paul wrote about the coding contest of php architect at planet-php. I did not invest a lot time into it, but still ways more then I planed.

The problem is that the ranking is once by speed and once by size of the script. Two parameters which usually not go well together. After having some great ideas for speeding up my code (even parallel processing, shared memory and map-reduce came to my mind) I decide to let this race to others and fully concentrate to the size. I not even run benchmarks anymore.

Unfortunatly some nasty html special cases (whitespace, case independence, single- and double-quoting, various attributes and so on) blow my perfect sized script a bit. But with some nasty php method tricks it's hopfully still the shortest possible script that gets all valid cases.

Just to let you feel not to save, I wrote a littel nasty html example that might break your own script. (You should get exactly 10 11 links out of it.)
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Array instead of switch-case in php
A eventfull PHP-Week
PHP Programming Contest
Comments (11)  Permalink

Array instead of switch-case in php

First of all, be warned, this article has no pratical relevance. It even might guide you to bad code. But this week it just popped into my mind that I could use an array instead of a switch-case construct. So see how we can do this. This is the example for the switch in the php manual.

switch ($i) {
case 
0:
    echo 
"i equals 0";
    break;
case 
1:
    echo 
"i equals 1";
    break;
case 
2:
    echo 
"i equals 2";
    break;
}
Now I'm able to implement this in a array, for that I put the code for every case statement in a arrayfield Afterwards I can access the field over the parameter and execute the code in it with eval.Here's the example: (Take care to not forget the semicolon in the code string)

$case[0] = "echo \"i equals 0\";";
$case[1] = "echo \"i equals 1\";";
$case[2] = "echo \"i equals 2\";";
eval($case[$i]);
Looks pretty, but what to do if you have to do the default statment. Nothing easier then that, we just have to look if eval goes ok and if not we do something after AND-short circuit:
eval($case[$i]) === false && print("default");
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
A eventfull PHP-Week
PHP Programming Contest
Comments (3)  Permalink

Webserver market share (or "I only believe in statistics that I doctored myself.")

First of all: "PHP 4 is dead, finally!". There are only security fixes until my birthday (2008-08-08), nothing more. I read a lot about this in the last week on the planet (for example "So long, and thanks for all the fish!"). This article brought me to the statistic that only 25 percent of all php hosts run allread PHP 5, so a hell lot of hosts to update during the next months.

In this statistic it is also mentioned that only 50% of all internet hosts are run by asp or php so I tried to figure out how owns the other half of the cake. I tried to find out on netcraft and I didn't find it. But I stumbled over this article. It make me think. It's strange that domain parking decide about the market share of a webserver. This brings me again to "I only believe in statistics that I doctored myself" (which is defintly not from Churchill).
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
Array instead of switch-case in php
A eventfull PHP-Week
Comments (1)  Permalink

First time PHP5 troubles

Support GoPHP5.orgNach dem ich den Umstieg auf PHP5 immer als sehr problemlos angesehen, hatte ich letzte Woche das erste mal ein PHP5 Problem. Meine Gallery Installation ist hoffnungslos veraltet, zum upgraden bin ich aber nie gekommen.

Als nun ein paar Freunde viele Bilder mit dem Javaclient hochladen wollten ging gar nix. Den Fehler sieht man dann leider nicht so genau, mit ein wenig sniffen bin ich dem Fehler jedoch auf die Spur gekommen. "Fatal error: Only variables can be passed by reference in ..." meldete das Script zurück. Das Problem war relativ leicht aufzuspüren, in PHP 5.0.4 wurde am Reference Handling rumgeschraubt. Folgendes funktioniert dann eben nicht mehr:
function gr_move_album( &$gallery, &$response, &$set_destalbumName ) { }
gr_move_album( $gallery, $response, getRequestVar('set_destalbumName') );
Der ziemlich hässlich Workaround ist in diesem Moment denn Wert einfach einer noch nicht existierenden Variable zuzuweisen:
gr_move_album( $gallery, $response, $foo2=getRequestVar('set_destalbumName') );
Nichts desto trotz, es gilt immer noch "go PHP5". Mit Support für PHP4 is spätestens am 8/8/8 definitv Schluss.
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
Array instead of switch-case in php
A eventfull PHP-Week
Comments (0)  Permalink

A eventfull PHP-Week

The week before the last a group of big php-application developer-communities create the initiative GoPHP5. They decide to finally stop supporting PHP4 at the 5. February 2008 and add the minimal requirement of php 5.2. Some big hosting providers stop there support for php4 at this date as well.

But then the php-(core-)developer decided last week to stop there support for PHP4 at the end of the year. There will be only security bug fix until 8.8.2008 (what a greate date, php4 die and i have birthday as well) and then php4 is (hopefully) finally dead.

But even better, after a long time of silence around PHP6, there is some noise. PHP6 has now Namespace support (we waiting for this for ages). And as I looked in the (inofficial) PHP release managment wiki, theres a lot of work going on. Hopefully we will see PHP6 in the begining of 2008.
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
Array instead of switch-case in php
PHP Programming Contest
Comments (0)  Permalink

PHP Programming Contest

I just committed my code for the The PHP-Programming-Contest. But I'm not really happy about it. First of all I thought I will do it in an hour, and really after an hour the first version worked. But I had a lot of performance problem and I had to switch the wordlist from a wikipedia based one to an other one. It took me some hours at the end. I'm also not happy about the performance, I took my already implemented breadth-first algorithm. But after all solving this problem this way it's just to slow, I'd rather should take a A* star search algorithm.

But now I just committed my code. It's realy short (beyond 100 LoC without the search algorithm) and not bad programmed (even the userinterface isn't there to win a beauty contest). And I really wonder if some other programmers commit such a crap like I did or if there are only smart-ass-coder that committed some code.
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
Array instead of switch-case in php
A eventfull PHP-Week
Comments (2)  Permalink

Fremdbloggen

Ich fremdblogge nun auf dem Techblog meines Arbeitsgeber.

Mein erster Artikel "Crazy Numbers in PHP" handelt von dem Umgang von PHP mit Nummern. Ich werde auch zukünftig über PHP, programmieren, Produkte die wir einsetzen und meine Arbeit bei Tilllate im Techblog schreiben, vermutlich häuptsächlich in englisch.
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
Array instead of switch-case in php
Webserver market share (or "I only believe in statistics that I doctored myself.")
Comments (0)  Permalink

PHP Software Architect

This one is just to good to not post it her (specially after my business card says me that I'm now a "Software Architect"):

Cute girl: “What do you do?”
Me: “I’m a PHP Software Architect.”
Cute girl: “What’s PHP? It sounds like a drug.”
Me: “No, it stands for PHP Hyper… nevermind. It’s a web language.”
Cute girl: *blank stare*
Me: “It’s the thing that powers more websites than any other language.”
Cute girl: *blank stare*
Me: “Umm, it powers Yahoo!”
Cute girl: “Oh!”
*dead silence*
Cute girl: “Hey, does it ‘power’ MySpace?”
Me: “No, they use dotNet.”
Cute girl: *turns the other way and starts to talk to the other guy*


It's out of Terry's blogpost "Is Ruby the dog and PHP the dogfood" and it's just the best part out of the whole "pissing ruby on rails contest" which started after this harmless post about twitter. But for me the whole discusion isn't that important, language doesn't matter! Just take the tool/language/framework that fit for you, but don't wonder if your easy to use framework scale badly later one, when your in the front of the hype.
Ähnliche Beiträge:
Zend Framwork 1.5 is out
Coding Contest addicted
Coding Contest
Array instead of switch-case in php
Webserver market share (or "I only believe in statistics that I doctored myself.")
Comments (0)  Permalink
Next1-10/23