Skip to content

Noch zwei Sessions: PHP und Magento

So, das Barcamp Offenburg neigt sich langsam aber sicher dem Ende entgegen, eine allerletzte Session läuft gerade noch, aber ohne mich. Ich trage daher noch Impressionen von zwei Sessions nach, von denen ich eine selbst initiiert habe.

Doch zunächst zur PHP-Session, in der wir uns ganz ungezwungen über unsere PHP-Gewohnheiten austauschten. Übereinkunft bestand darin, dass meistens mit Eclipse und PDT bzw. Zend Studio for Eclipse gearbeitet wird, Mac-User nehmen auch gern mal Textmate. Die großen Frameworks wie Zend, Symfony oder Cake sind sehr interessant, werden aber noch nicht in großem Umfang von allen eingesetzt. Auch die Informiertheit über PHP5.3 oder gar PHP6 ist noch nicht so weit fortgeschritten. Naja. Danach diskutierten wir noch über die Vor- und Nachteile diverser CMSe, über WYSIWYG-Editoren und vermutlich das Wetter ;O) War jedenfalls ein ganz anregender Erfahrungsaustausch

Meine Magento-Session hatte ich nicht vorbereitet, die Idee kam mir heute morgen ganz spontan, auch weil morgen das erste deutsche Magento-Community-Meeting in Frankfurt stattfindet. Insgesamt beeindruckte Magento alle Teilnehmer, auch wenn wir uns nur gemeinsam durch Front- und Backend klickten und ich die Fragen so gut wie möglich zu beantworten versuchte, ohne Folien o.ä. präsentieren zu können. Magento wird die Webshop-Szene fett rocken, darin waren wir uns ziemlich einig. Zum Ende der Session gab es noch einen kleinen Exkurs über Payment-Systeme, auch interessant. Beate Paland hat außerdem auf den Presta-Shop als mögliche Alternative zu Magento hingewiesen - vermutlich ist diese Software aber nicht ganz so umfangreich. Danke an alle Session-Teilnehmer, der Wissensaustausch hat mal wieder sehr viel Spaß gemacht!

NoseRub

NoseRub is a project started by Dirk Olbertz of Blogscout fame. The idea of NoseRub is that it works as a protocol to aggregate data of decentralized social networks. If you want to check it out, the code of a sample application in its early stages is hosted at Google Code. The goal of NoseRub is that everyone can manage and/or host his/her own social network. By separating the profile, the network, and the data, everything will become portable to a great extent. You stay in control of your data, and if any of your friends update their data, these changes will automagically be incorporated into your app.

NoseRub was shown in public for the first time at BarCamp Cologne 2 (one of the most eagerly awaited sessions), where we could see the sample app on two local webservers. It was built around the CakePHP framework, so the structure of the code is very clearly laid out. Of course, because of its early status, many questions arose at the BarCamp session which need to be clarified and resolved (security concerns, technical specifiations). But all in all, the presentation left most of the participants in awe and/or enthusiasm. And so, like many others might already have done or will do within the next few days, I downloaded and installed NoseRub on my local server. What can I say, it works great even in its raw state. My guess is, that developers will improve it very quickly, add new services along the way, so that by the end of the year we should have a great application that helps us take over control over our social networks. Dirk published a quick tour of the sample app, check it out. I will certainly post more about NoseRub, so stay tuned.

The Observer Pattern and PHP4

Matt Zandstra wrote a great and highly recommended article about The Observer Pattern for the Zend Developer Zone. The tutorial is geared at intermediate and expert users, and of course users of PHP5. Now, for those of you who - like me - sometimes still have to work with PHP Version Four, the example won't work out of the box.

Since the observer pattern came in quite handy for my current project, I'd like to share the minor fixes I had to apply to the code. The methods attach() and detach() are the only two methods you'll have to change. Just edit them like so:


function attach($obs) {
    $this->observers[get_class($obs)] = $obs;
}

function detach($obs) {
    unset($this->observers[get_class($obs)]);
}
 

I don't know why Matt used delete() to detach an observer because in the manual it says under delete(): This is a dummy manual entry to satisfy those people who are looking for unlink() or unset() in the wrong place. Whatever, I hope some of you will find my entry useful when hunting for this specific problem.