- Save 10% on Books for Schools offered by Amazon.co.uk when you purchase 10 or more of the same book. Here's how (terms and conditions apply) Enter code SCHOOLS2016 at checkout. Here's how (terms and conditions apply)
Pro Zend Framework CMS: Building a full CMS using Advanced Aspects of the Zend Framework Paperback – 2 Jun 2010
- Choose from over 13,000 locations across the UK
- Prime members get unlimited deliveries at no additional cost
- Find your preferred location and add it to your address book
- Dispatch to this address when you check out
Special Offers and Product Promotions
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
About the Author
Forrest Lyman is a passionate PHP developer who concentrates on content management systems (CMS) development. He developed the Digitalus CMS on the Zend Framework, progressing from version 0.1 through 1.5. Once Zend Framework reached its production release (1.0), Forrest released Digitalus as an open source project. Over the course of the project, he developed a wide range of sites based on the CMS, from small business sites to international non-profit and university systems. Working hands-on developing these sites with the Zend Framework has given Forrest a unique perspective into building extensible CMS systems with Zend Framework.
What Other Items Do Customers Buy After Viewing This Item?
Top Customer Reviews
Overall this book provides a great insight into how to build your own CMS with the ZF, but at the same time, dont simply copy and paste the code. The number of errors in the book is ridiculous to say the least. While minor typos are common in most books, it appears this book was written in a hurry and never proof read. You have to be vigilant in looking at exactly what the code is 'trying' to accomplish and then fix these issues. In a way this is a good method to get the user thinking about the code and practices debugging. But the big thing that I ran into was half way threw the book I noticed a reference to the 'updatePage' action with one of the Models. At no point in the tutorial did we create this function. I soon realised after a bit of debugging, this was created in a separate Model with a number of other class that needed to be moved across.
Although the number of issues of poor documentation and wrong code in this book is scary, it does help you become a better programmer as these are similar issues that could come up in real life situations.
I have purchased a number of Apress books, they have all been accompanied by a great library of source code, this book however is provided with simply the finished product with no SQL documentation. While I have not actually tested out the finished CMS from the source code, I'm sure it would no doubt have a number of 'bugs' that the book has so wouldnt even work.
Overall this book appears to have been rushed through to production is little or no oversight. Hopefully they are working on a second edition of the book that will address some of these major pit falls.Read more ›
The author has forgotten some essential information withouth which you won't be able to move on as your code will throw errors. Things like including path to the CMS folder in the bootstrap, plenty of the typos in the names of the classes etc. You really have to be careful and do some internet research to find your way around this project. Apart from this - interesting concepts for the beginner in Zend Framework.
Going to the publishers website you can download source code that the book uses, so thought i'd take a look, and i'm glad I did.
I'm really not sure why this book is pitched at professional techniques as the source includes calling zend_db_table and select methods objects directly from inside an action (rather than abstracting these into the model that they use), using the costly actionstack to forward to empty actions just to show a message (when you could just render a different script in the same action) and other techniques that seasoned developers would steer clear of.
I obviously can't comment on the content of the book, but if you already have a few ZF projects under your belt then you may want to look at something more advanced such as Zend Framework 1.8 Web Application Development
Most Helpful Customer Reviews on Amazon.com (beta)
The author spends multiple chapters on the same exact CRUD (create, read, update, delete) functionality in each controller. Very little additional information is given when new features are added.
All in all, the biggest complaint, and the reason this is rated 2 stars as opposed to 4, is you simply can not follow the code in the book. I did a quick run through of my notes after finishing the book and came to the conclusion that 1 in 4 code samples contains at least 1 critical error. From misspellings, to incorrect class names, to missing syntax, to functions that don't exist; You will be spending hours upon hours just trying to figure out why your script isn't working! And to top it off, the publisher has not yet added a single errata (I personally have submitted at least 20).
Another complaint is the sample code is not broken up into chapters, but instead provides only the final product. This is somewhat useless when working through the book systematically. I worry that this added layer of complication and frustration may drive many away from using Zend Framework as a person could easily mistake problems in the sample code with problems of the framework.
To wrap it up, this book was a rushed, weakly thought out attempt at covering the beast that is Zend Framework. I highly recommend you look elsewhere.
The other issue, as Travis points out, is repetition. After building a few CRUD actions there really isn't any need to to show more basic CRUD code samples later in the book. Instead, discussing subjects covered or alternate approaches in a bit more detail would have been more valuable for readers.
If you need to build your first CMS and are looking for a good example of how to do so with the Zend Framework, I'd recommend this book despite the editing errors. If you're a seasoned developer, I'd look elsewhere.
That said, I learned a lot in this book and had a lot of fun with it. For the most part if you have some experience with php and the Zend Framework you should be able to figure out the errors and fix them.
I'll briefly cover what I think is the heart of the book.
This book uses direct inheritance as it is simple and easy to implement versus lets say composition. For example, by using direct inheritance, if you have a Page Model, then you would directly extend from the data source gateway class.
eg. class Model_Page extends Zend_Db_Table_Abstract
The disadvantages of this are it is hard to run unit test without a database connection. Breaks OO inheritance principle (if your concerned about that) and is tightly coupled with Zend_Db_Table.
The author notes that there are a number of different opinions regarding the structure of an MVC application. He states that the approach he describes is a fat controller approach.
But after building the application it seems to me he is using a Fat Model skinny Controller for the business logic in the application stack. The methods and queries are done in the Model not the Controller.
Doing this allows for code reuse anywhere in the application, readability is enhanced and maintainability is easier as the Controller is easier to maintain with fewer lines of code and less logic contained in it.
What I really like about the application you build, is the authors use of an abstract data structure. Abstract data structures look at content in a contrastive way. In an abstract system content is content. To implement this approach he uses the node pattern which consists of two components: pages which are the main containers and the content nodes which are the actual blocks of content. A page can have any number of content nodes.
So what the pattern means is that any page can have any number of content nodes. The same database tables can work for a page, a blog, a cms, or any type of page. Also, pages can contain other pages.
The Model_Page and Model_ContentNode classes you build handle the low-level database management and this is where the direct inheritance takes place from Zend_Db_Table_Abstract.
The Page and ContentNode model classes provide an abstraction layer between the application and the underlying database structure. But this has added difficulty because you create a flexible data structure and this has made managing the data more complicated than it would be if you had a fixed table tailored for each content type. Like in a traditional CMS database.
The way around this involves creating another layer of abstraction on top of the models called "content item objects".
These objects extend a base abstract class called CMS_Content_Item_Abstract that handles all the interaction with the Page and ContentNode models. This in turn gives you a real object oriented data access.
So, now that I have this base content item class, I can create new forms of content for my CMS project very easily, without altering the underlying model or database. You can than create a concrete class that extends the abstract class and add public properties for each of your data.
I liked this approach and would be interested to hear what other people think.
I have looked closely at the few other Zend Framework books, and this book does not contain the glaring errors and weaknesses of those books.
My only criticism of this book is the "Pro" techniques title. I think they are introductory techniques. Since no other book has provided the introductory techniques in a compelling and effective way, I recommend it for that reason. I look forward to an advanced Zend Framework book in the future.
Look for similar items by category
- Books > Computing & Internet > Programming > Languages
- Books > Computing & Internet > Programming > Languages & Tools
- Books > Computing & Internet > Programming > Software Design, Testing & Engineering > Functional Programming
- Books > Computing & Internet > Programming > Software Design, Testing & Engineering > Software Architecture