The Life of RubenV - Skyblue!
Zend Framework 1.8 Web Application Development

I recently read the book Zend Framework 1.8 Web Application Development by Keith Pope. Having done quite a lot of PHP work and having used Zend Framework, this book caught my attention. In general, I don't really like IT books that cover a technology, most of them tend to be a refactored version of the reference manual.

Zend Framework 1.8


Not this book. It's actually nice and complementary to the reference manual provided by Zend: whereas the reference manual describes each component in great detail, this book takes a more high-level view of things, showing how the pieces of the puzzle fit together.

It does this by building a full application, from the ground up, step-by-step. Where needed, a detour past theory is not shied. So it's not all application: the author takes quite a lot of time to cover e.g. the ideas behind MVC.

I also liked the broad range of topics covered, including testing, something which is quite often overlooked for web applications.

In all, this is a good read. No earth-shattering must-have literature, but certainly useful. If you plan on building a lot of Zend Framework applications, this book will certainly help a lot. The only minor point is the somewhat confusing Model description. Other than that: good one.

Disclaimer: Packt Publishing was so kind to send me a review copy of this book. This would not stop me from declaring that it's utter shit, it just so happens to be that I liked the book. You can buy my time, not my opinion.

php, zendframework | Wednesday December 2 2009 10:26 | Comments (0)
Zend_Service_Mollom 1.2.0

I've just released Zend_Service_Mollom 1.2.0, the Zend Framework component that integrates Mollom, the comment-spam checker.

New in this release is optional support for caching, making calls to Mollom faster.

I will propose this version for Zend Framework 1.8.

Download: Zend_Service_Mollom-1.2.0.zip
Git: git://git.savanne.be/git/zend.service.mollom.git
Documentation: here

Zend_Service_Mollom

php, zendframework | Sunday December 21 2008 17:21 | Comments (3)
Zend_Service_Mollom 1.0.0 & 1.1.0

I have just released Zend_Service_Mollom 1.0.0 and 1.1.0.

If you run a blog that accepts comments, you're probably familiar with comment spam. You could manually verify all comments, but that gets cumbersome after some time. A better solution is using an automatic scanner to verify comments. Like Mollom. Mollom checks your comments and provides CAPTCHAs if it's not 100% sure (about 2% of all comments). This takes the hard work of removing spam out of your hands, with the reassurance that no good content will be blocked. More on the How Mollom works page.

Zend_Service_Mollom is a Zend Framework component that makes using Mollom dead simple. Offcourse, even if you don't use the full Zend Framework for your website, it can also be used as a standalone component.

Yesterday marked the release of 1.0.0, which was immediately followed today by 1.1.0, after feedback from the Mollom team.

Download instructions and documentation can be found here: Zend_Service_Mollom.

Enjoy!

Zend_Service_Mollom
Zend_Service_Mollom

php, zendframework | Sunday December 7 2008 12:25 | Comments (0)
ZF & Doctrine Article Update

Long overdue, I've put up an updated version of the Integrating Zend Framework and Doctrine article. Now also featuring a git repository to make it easier to get your hands on the code.

Zend Framework loves Doctrine

doctrine, php, zendframework | Sunday November 30 2008 13:39 | Comments (1)
GSoC, ZF & Doctrine

Some updates from the past week:

Summer of Code
I have submitted my Google Summer of Code proposal for a Banshee project to the Mono Project. I might submit another one to GNOME (just in case), but only if I can work it out in greater detail. I don't want to waste reviewers time by sending in half a proposal.

Zend Framework & Doctrine
After trying out the Zend Framework (a PHP Application Development Framework) and Doctrine (a Object Relational Mapper for PHP) for quite some time, I wrote up an article on Integrating Zend Framework and Doctrine. If you want to play with some of the nicest PHP technologies currently around, check it out!

Oh and this is probably my first message to appear on planet.grep.be. Hi all!

doctrine, gnome, php, summerofcode, zendframework | Saturday March 29 2008 21:35 | Comments (37)
Incrementally serving RSS feeds

We're living in a Web 2.0 world where content is increasingly more being served using RSS feeds. When more and more people are tracking your site through RSS, these RSS feeds will start to amount for a rather big portion of your monthly bandwidth (especially if you consider that most readers refresh each feed once an hour).

Fortunately, there's something we can do about this! You can use a service like rsscache.com or feedburner, but both aren't half as smart as they could be (rsscache.com comes close, but they keep track of your IP address, which just doesn't work in a world of laptops). Here's the smart way:

The browser cache: say hello to an old friend.
If your website serves RSS feeds through a static file, your webserver will take care of most of this. However, most RSS feeds are generated on-the-fly. This has advantages: it's easy to do and your feed is always brand new. There's a disadvantage though: unless you explicitly add it, you lose all the advantages of the browser cache. Why?

To explain that, we have to make a short (I promise) trip into the world of HTTP.

When you try to view a webpage, your browser wil send a request to the webserver. The webserver will then send back the webpage you requested, but it will also send back some headers, invisible to the user. These headers control a lot of things, like the filetype of the served file and the way this file should be cached (starting to see where we're going?). One of these headers is the ETag header. It's basically a label for the file you just received. Every time the file changes on the server, it gets a new ETag. Now if your browser requests that file again, it will also send the ETag of the cached copy back to the webserver. The webserver will check that ETag, if it's still valid, it'll simply respond back to the browser: 304 Not Modified. And that's it. No file transferred, zero bandwidth used. Your browser will use it's cached copy, which is way faster than receiving it again. Everybody happy!

Unless you're serving from a PHP script... You see, PHP scripts are dynamic, they get regenerated every time, so the webserver can't calculate an ETag. Which means we have to do it ourselves. Thankfully, this isn't very hard.

Now do it in pieces
But wait, don't start cheering yet, we can do it even better! RSS has a nice property: the feed reader (which works just like a web browser, it also uses the ETag headers) will store all RSS items they've received. This means we only have to send it the new blog posts. And that's a lot better than sending out everything you wrote in a month every time someone asks for it.

So how can we do this? *crickets* You guessed it! ETag! If we get a request with an ETag, we know exactly which version the client has. So we can easily find out which posts we have to send. Now isn't that even better? Instead of sending out the entire feed again when you've posted a new part of your adventures, only the new content will be downloaded. And most of the time, that save you about 90% in bandwidth.

Give it to me!
Now here's the best part: even though it all sounds quite complicated, it's actually dead simple to add this. I've written a simple PHP class to easily add this to your website. For those interested, the code is over here. It's a bit of a hack (I use a slightly different version to serve my own website), but it works. Usage instructions are inside the script. Let me know if you run into any problems. But: no money back when it scares your cat. Enjoy!

php | Saturday June 2 2007 22:23 | Comments (0)
The author:
RubenV
Ruben Vermeersch
Computer Scientist (Software Engineering), GNOME Hacker, PhD Researcher, Photographer, Earthling
More info | Tweets
You are here:
I speak:
More:
The past: