Posts Tagged ‘zend framework’

Wanted: New home for zfsnippets.com

Monday, April 26th, 2010

Update 27/04/2010: I have received a number of enquiries via email and I’ll be going through them to try and find the best candidate, I’ll also make an effort to reply to all emails I’ve received. Thanks to all for your interest.

It’s been just over a year since I initially launched zfsnippets.com, it was a good little project for me to get used to the Zend Framework, but since then I’ve totally neglected it. I’d normally leave a website going despite my lack of enthusiasm, but I no longer need the VPS it is hosted on so I’m looking for someone else to take the project on and move to their hosting solution.

My interests have moved quite rapidly in the last year and the project is sadly no longer of interest to me. ZFSnippets receives approximately 2,500 visits a month, so I think it’s worth keeping the project alive.

screenshot2

If you’re interested in hosting the site and hopefully building on it and improving it, please email me, dave.marshall _at_ atstsolutions.co.uk.

Review: Zend Framework 1.8 Web Application Development

Thursday, February 11th, 2010

Zend book image

Sometime last year, I, along with quite a few others, was asked to review one of
Packt Publishing’s new books, Zend Framework 1.8 Web Application Development, written by Keith Pope. They sent me a copy, which was very good of them and although it’s taken me ages to finish and get round to writing this review, that’s not a true reflection of how good the book was, I’m just a very busy/lazy person! So lazy, that I did in fact say I’d have it done in two weeks, which turned into 4 months.

Packt asked if I’d be interested in reviewing the book, so watch this space, I’ll be back in a couple of weeks with a review.

My Post dated 15/10/2009

Introduction

Design, develop, and deploy feature-rich PHP web applications with this MVC framework

That is the books strap line, and it does exactly what it says on the tin. The bulk of the book actually takes you through the design, development, testing and deployment of a real world example application, called the Storefront. The book claims that it is written for PHP web developers that are either using or looking to start using the Zend Framework and that a basic knowledge of Object Oriented design would be helpful. While you might be able to manage without any OOD experience, I’d say you definitely need some to get the most out of this book, as the second chapter digs right under the hood of the Frameworks MVC architecture. My personal experience was that I got to learn all the things I haven’t had time to learn, I’ve been using the Framework for a couple of years now, always appreciating, but not always understanding what it was doing for me.

MVC Architecture

The first chapter gives you a brief overview of creating an MVC application in the Zend Framework, experienced users of the Framework will probably want to gloss over this part, whereas people looking to start using the framework should take their time and take things in. The next chapter is when I really started to enjoy the book. Each component of the MVC architecture is presented as it’s own topic, with each component getting a breakdown of Design Patterns/theory, default settings/configuration, usage and finally customisation.

The chapter is well put together and considering the amount of information portrayed, is not overwhelming.

Storefront Application

The rest of the book provides the information you need about the framework around a real world example application, called StoreFront, which is a basic e-commerce application. I should point out that I didn’t code the application as I went, if I’m reading I like to read, but where appropriate I have used the book as a reference when updating my existing Zend Framework applications.

The best thing about these chapters though, is some of the design theory you pick up on the way, that isn’t directly relevant to the Zend Framework, but can be applied to any framework out there. Best practices such as Fat Models, Composition, Fluent interfaces are all explained in detail, along with relevant and realistic examples. Further more, the applications MVC separation is excellent, taken in context (it might be a little overkill for the example application, but is there to show you the methods).

After taking you through the creation of the application, the book then takes you into optimisation and testing. The optimisation takes you though some general PHP optimisation techniques, but then ploughs into techniques like a transparent abstract cache that is applied to the models. Testing is carried out with the trusty PHPUnit, along with the frameworks extension of the library Zend_Test and the book goes on to integrate the test suites with apache ant (why not phing) and phpundercontrol.

Conclusion

In conclusion, I thought this book was an excellent read and I plan to follow it through again when I build my next ZF app (I have two good ideas in the pipeline). Find out more or and buy it!. Thanks to Packt for sending me a copy!

Zend Framework 1.8 Web Application Development

Thursday, October 15th, 2009

Packt Publishing have recently contacted me letting me know about one of their new books, Zend Framework 1.8 Web Application Development. It looks reasonably priced, and if you fancy having a quick look before you by, the author Keith Pope has a free chapter to download. Packt asked if I’d be interested in reviewing the book, so watch this space, I’ll be back in a couple of weeks with a review.

ZFSnippets.com update

Monday, April 6th, 2009

It’s been just over a month since I launched zfsnippets.com and I’m very pleased with the reception it got, which spurred me on to try and improve it.

Since then, following suggestions on the feedback forum I’ve implemented a few new features. What I’ve noticed is the ease at which these features where added, thanks to the quality of the Zend Framework.

Favourites

Along with adding icons for up votes, there’s now a little star icon to add snippets to your favourites, easily accessible from your user page. A little sprinkling of dojo and these are added via AJAX.

screenshot2

Revision History

Snippets can now be edited by the creator and a revision history is kept.

screenshot3

Using a simple implementation of the Longest common subsequence problem, you can also view diffs of the revisions.

screenshot4

Search

Lastly there’s the search engine, built on top of Zend_Search_Lucene. This took a little more work, but the results were worth it. I hadn’t realised how powerful the Lucene query language was until now and I’m very impressed with the implementation.

screenshot1

As you would expect, traffic has slowed down considerably since the initial burst, but there’s still a bit of steady traffic there and I hope people keep coming back to visit now and then. As for going forward, I think I’ll add a field to allow contributors to specify which zend framework version their snippet was tested or is compatible with, then look a little more at the scoring system.

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.