Posts Tagged ‘zfsnippets’

ZFSnippets.com now managed by bescript.de

Tuesday, June 1st, 2010

Not so long ago, I posted requesting that people who fancied maintaining ZFSnippets.com should get in touch and see if I could hand it over. Thanks to everyone who volunteered (sorry I didn’t get back to you all individually!) and eventually I decided to hand it over to German PHP outfit, bescript.de. Ben was very clear and excited in his email and after discussing it with him I knew the handover would be nice and easy and bescript.de would take good care of the site. They have already added new features and ticked some items off the uservoice list!

Again, thanks to everyone who got in touch and best of luck to Ben and his team with the site.

ZFSnippets.com – Zend Framework Code Snippets

Wednesday, March 4th, 2009

ZFSnippets Logo

Not so long ago I was working on a little project using the django framework and was looking for a simple nested set implementation, I found one that was good enough for my needs on djangosnippets.org. I thought this was pretty cool, and realised we didn’t have a one stop shop for Zend Framework code snippets. Symfony and CakePHP also have dedicated sites for this. I’m aware of generic snippets sites and pastebin sites, but I thought it’d be another good learning opportunity to build my own with the Zend Framework, for the Zend Framework.

I’ve ended up implementing a pretty simple site, ZFSnippets. The current basic implementation makes use of:

There are plenty of things I’d like to implement (and fix;)), but will have to see if I find anytime:

  • A site search engine using Zend_Search_Lucene
  • More flexible posting, probably using wiki style markup
  • Version history for all snippets
  • Moving to a stackoverflow.com style, trust model, allowing regular users to collaborate, edit and update snippets.
  • Forgot my password link
  • Contextual error handling and descriptions
  • Accurate scoring/ranking, based on complex calculations.

I did actually spend quite a bit of time looking at markup libraries, coupled with HTMLPurifier, but it seemed like too much effort to start with, so I opted for a method of splitting the source code using hashes like pastie.

I like the idea of having a go with Zend_Search_Lucene, probably adding particular snippets to a queue for indexing whenever somebody posts one or comments on one.

Having built the site, I’m actually struggling to think of what might go on there. Helpers seem like an obvious one, but without building large, complex Zend Framework application, I don’t have much need for custom code, the framework does the leg work for me. Nevermind, if you think it might be any use to you, head on over there and have a browse around, although it’s a little low on content at the minute, or maybe subscribe to the feed and keep your eye out for anything interesting.