Magento book review found
June 8, 2008
I found a review of my brother’s Magento book earlier today. Starting off with “However, I’m not really the type of person to give accolades unless something is absolutely stellar. As such, this post will primarily be about the shortcomings of the book” I wasn’t particularly surprised that there was more of a focus on negatives rather than positives.
Bearing in mind that I’m not the author, but I did see the process of writing the book, and helped put Mark and php|a together in the first place, I’ll address a few of the issues that Brandon brings up.
First to market
This became a bigger issue than I thought it would be. Varien promised last year that they’d have a 1.0 release in the first quarter of 2008. Look when Magento 1.0 was released - March 31, 2008. It doesn’t get any more ‘down to the wire’ than this. From what I see, they shipped to hit a release date, and (for what it’s worth) QA seemed to take a back seat.
What does this have to do with the book? php|a had committed to a certain ship date, which created a certain due date for Mark. About 2 weeks before the final Magento release, there was a very large codebase change, which affected large parts of what Mark had written. Having to go back and check/recheck the code, rewrite sections that were now technically ‘wrong’, and rewrite explanations about how some of the internals were working all took time which may have been better spent in other areas. This is not to throw the whole thing on php|a, or to point the finger at any one person, it’s simply what happened.
Missing info
This was sort of a design decision, compounded by the time decision. There was an effort to avoid rehashing a lot of what’s already been written in the online Magento guide. This may have been taken too far, in that Brandon felt there were things missing from explanations. There was likely an assumption that the reader would be reading the book in conjunction with having gone through online material as well.
Complexity
“However, the construction of a completely custom module seems so complex that Kismal either does not include all the finer nuances or simply cannot coherently describe its creation—a sign that does not particularly bode well.“ Doesn’t bode well for which party? The book, or Magento itself? I can tell you my own non-author impressions that Magento is likely far more complex than it needed to be for a 1.0 release. The phrase “bit off more than they could chew” springs to mind. I also understand that some of the complexity comes from rewrapping much of the ZendFramework with Magento’s code.
I fear I’m going to start to ramble, and I’m certainly not a Magento expert so I’ll leave some of the more specific issues to other people.
It may be hard to take what I say without a few grains of salt - Mark is my brother and we’ve worked together for a number of years. Those two points alone probably disqualify me from any claim of ‘objectivity’ (I’m not try to say I’m 100% objective either). There were certainly issues that, given more time, I know Mark would have wanted to delve in to. Also, given the fairly rapid changes that were happening in Magento, the curse of technical books in general - being out of date before the book is published - is something I know Mark was aware of, and I think tried to deal with as best as possible.
Having said all that, it was still good to find this first book review. I’m looking forward to reading more, and eventually reading some of my own book, the PHP Job Hunter’s Handbook.
Did you like this post? Buy me a hot chocolate!
Posted in




June 8th, 2008 at 6:41 pm
I really think you should spend more time reflecting on the issues the reader raises and spend you time trying to address them instead of justifying them.
June 8th, 2008 at 7:42 pm
Fair point George. I did point out that I’m probably biased, and as my view of the book itself is colored by the process of its writing, it’s very hard for me to *not* take this sort of stand.
I did point out that one of Brandon’s points was that some things he thought should be in the book probably should have been. I know Mark’s explanation (in the book) was that he wasn’t going to reprint a lot of what’s already available on the web, but that doesn’t make for the best experience for a reader. Having to jump back and forth between a print version (or PDF) and multiple online resources (which, I don’t believe, are all illustrated in the book) is not a fluid experience, and I’d agree that these should be addressed, perhaps in a future version.
In hindsight, trying to get a book shipped for a 1.0 open source project release was/is probably a more daunting task than originally anticipated. Many of the books on my bookshelf here were written for projects that were multiple years old (Drupal, Ruby, PHP, ec.) and had the benefit of a more stable project to write against.
Grammar mistakes - not good, I agree. They can detract from whatever message is there, and make reading (and getting to the meat of the content) difficult for many people. I haven’t read through the entire book with a fine tooth comb, so I can’t comment on the number of grammar mistakes, but I’ve no doubt there are some in there.
So again, given my relationship with the project and author, I’m not an unbiased reviewer, nor was I trying to be. I would like to have known if Brandon was able to use any of the code in the book, as I know Mark spent a lot of time getting those ‘right’. The “made to order” project was an outgrowth of consulting work he was doing, and I suspect that it may help a number of people out there trying to do similar things with Magento.
June 9th, 2008 at 10:40 am
Mike, Brandon here. Thanks for your comments and points regarding your brother’s Guide to Programming with Magento book.
That is very unfortunate that the release date was changed for the book publish…and that it coincided with a major code change for Magento. That’s the sort of thing that just backs an author into a corner and evokes a, “damed if you do and damed if you don’t” situation. To compound the situation, this information is not the sort of thing that people know about when purchasing or reading the text and thus gives a false impression as to the intentions and abilities of the author.
I agree with you that Magento’s online materials should server as a primary/companion to any book published on the topic. However, I have found Magento’s onine “documentation” to be not entirely helpful. It seems to be geared more towards the front end user (shop and product management, etc.) and designers (UI) rather than developers wishing to customize and extend Magento. For instance, in the Knowledge Base there are only 5 articles on modules, non of which cover module creation from the ground up. Magento’s “Technical Docs” is simply a phpdocumentor result of the entire code base which, as I mentioned in another of my blogs, is rather useless as a lone means of documentation. It’s nice that Magento took the time to create very nice screencasts but the vast majority of these topics cover front end features and such. I saw only one technically oriented screencast that was related to theme creation but it was covered so quickly that I could hardly keep up with the speaker much less follow what was happening on screen.
Again Mike, I would have to agree with you in that Magento seems overly complex for what it does. It is a great package and the price/value ratio cannot be beaten. Yet I feel that software, especially open-source software, must be written to be functional AND understandable. The entire purpose of open-source software is that it can be shared, modified and reused. However, if the majority of programmers cannot understand and grasp the foundation of the software in a reasonable amount of time, then that software looses some of its open-source appeal.
It is true that my review focused primarily on the negative aspects of the book. When reading books technical in nature, I think we naturally gravitate towards noticing what the book doesn’t provide rather than what it actually does provide. What I probably should have also mentioned was that I was thankful that there was a book covering this topic, period. The book did help us understand some of the nuances of Magento better. In fact much better then the Magento documentation did. The writing quality (aside from grammatical and spelling errors missed probably due to the PDF version being a pre-release) was overall very good. There were very few instances where I was completely lost as to what the author was trying to convey. However, after reading the book, a complete understanding of customizing Magento remains elusive and I feel this has more to do with the sheer overcomplexity of Magento itself than with deficiencies in the book.
June 9th, 2008 at 10:47 am
Thanks for the feedback Brandon. With respect to George’s comment, there’s a fine line between “explaining” and “justifying”. I appreciate you taking the time to write here in as much detail as you did. I felt towards the end of Mark’s project that he was in that “damned in you do, damned if you don’t” situation, but when he started (in January, I think) I’m not sure anyone foresaw the obstacles coming.
Did I mention above about Zend? From some of my limited readings of the Magento boards, I get the feeling that the Magento gang aren’t happy with their choice of ZF as a basis to build on, which may also have played a part in the ‘overly complicated’ feeling people can get looking at Magento.
I’d also agree - and I think I did on your blog earlier - about documentation in general. It’s weak around most projects, and Magento isn’t unique in this situation. I suspect that Magento’s docs and tutorials will likely get better over the next year, assuming they stabilize more and give the community a chance to grow some knowledge around it as it stands.
June 9th, 2008 at 11:40 am
Hey, it’s me.
I wrote the book. I read Brandon’s comments on the book. I must say that it was hard to get a real sense of what was missing from the book based on Brandon’s comments. This is not defending nor justifying any shortcomings of the book, just a simple fact.
From my point of view, there are 4 completely custom modules with full source code. I’m not sure how this relates to “only expand[ing] or overrid[ing] functionality”.
There is a balance to be struck between explaining all the nuances of Magento, which may or may not change in the next release, and simply getting the idea across of how to write custom modules. I tried to re-use most of what was in Magento already simply to keep the size of the examples down to 150 pages. Trying to explain a module with all the bells and whistles seem to focus more on the business logic of a particular module (like MTO) rather than on Magento itself. I had to cut back some of the features of the modules to avoid going off on tangents about why this sort of code is “best practices” and to re-focus on Magento itself.
When it comes to pointing out Magento’s downfalls, I felt that it was necessary to make clear what Magento could and could not do. This is partly because the book is about Magento, and partly to be clear about my code so that readers were not left wondering why I did a certain feature in a particular way. The answer is spelled out right there, because M cannot do X we will do Y.
As for offering up alternative solutions to M’s shortcomings, I don’t feel that a printed book is the most appropriate place to start showing the reader how to fork their copy of Magento and fall off the upgrade path. There are better avenues for that type of discussion.
If there is to be another revision of this book, I will look at Brandon’s comments and try to address the issues of all readers. But, as of right now, I’m not sure I fully understand the explanation of the book’s shortcomings.
P.S. I just re-read this comment off of Brandon’s blog post:
“As developers, one of the most important things we’re interested in with a new software package is how we can modify, hack and expand it to suit our needs. Let me be the first to tell you, the Magento devs did not have this in mind when building their code base.”
This is total non-sequitur. I followed Magento’s development for more than 6 months. This is the very first thing on the Magento devs’ minds. The package is customizable almost to a fault. I’m not sure how you can say that Magento is not customizable in one breath, then in the next say that the book’s examples are all customizations, and not enough new development. Also, I’m not sure how this point relates to the book.
June 22nd, 2008 at 2:12 pm
Hello all,
I have recently begun my adventure with Magento, and for the first couple days really struggled understanding the structure of the application and its run cycle. I picked up the book (well, the paper copy is en-route but I’ve been using the pdf) and I found it to be really helpful. I think that for the most part the theory-heavy section are just fine. They explain the system at a level that I think is fine for an intermediate-advanced php programmer. Lets be honest, Magento modules are not for the new programmer anyway. After reading the section explaining the EAV database scheme and various other elements, I am starting to get a handle on what makes Magento tick.
If a revision of the book were to come out, the main “shortcoming” I have run up against are in the example modules. The code and explanations that ARE there are written just fine, but I have run into some walls when running through the examples and a particular activity is summarized into one or two sentences. I realize that sometimes this is done to avoid duplication of concepts already explained in a previous chapter but in some cases a simple page reference would have helped a lot. Magento’s vocabulary is easy to get mixed up and a certain amount of hand holding is comforting, even for the more savvy programmer. In general some of the biggest hurdles were when the location of a particular class or xml was not specifically stated. Even the file structure of Magento can be hard to grasp.
So my main recommendations would be: 1.) Print as much code as possible, without being redundant, and provide more specific cross-referencing to previously explained tasks. 2.) Really hammer in the folder structure and locations of specific files. 3.)Post finished versions of the example modules (somewhere password protected if nessesary). This last one would really, really help me. Sometimes doing a little reverse-engineering along with forward-engineering explanations helps to cement the concepts and practices.
I want to restate: the book as it stands is already a great reference. I have found it, in most cases, to far exceed the current wiki and forum entries in breadth and clarity. If I could work through the examples with a little more ease, I think I would be well on my way to getting what I need out of Magento.
Thanks,
Brian
July 20th, 2008 at 6:31 pm
Hello all, I am a 23 yr old college student / web designer. I am some what new to web designing as far as clientele is concerned. its getting to the point of my career where I feel I am ready to take on clients and I decided I would want to use Magento to be the commerce of choice. I am glad to see that I am not the only one that finds magento to be a very very difficult application. I’ve read the php docs and the articles and found them to be rather vague. Even though magento is very complex, I find the structure and over all concept to be very fascinating and I am very excited and eager to learn how magento truly works. I know that once I master magento, my production time will be cut in half compare to working with other commerce applications such as OScommerce and x-cart. Not only that, but just by it being free, I can also quote my customers cheaper and profit more out of the work I due.
I’m not sure what those toys are called, the ones that have a egg within a egg, within a egg, within a egg. Once I find out what the name of those toys are called, that’s what I’m going to call applications such as xcart. Cause that’s what they consist of. Code nested within code, nested within code and its very frustrating. And magento lacks that which I love. It also truely separates application from design. But back to the main point of this message. Mark I have not read your book but once I get the money I am going to buy it regardless of the reviews. Cause its getting to the point where I’m becoming frusterated with magento’s lack of explanation desperate for better resources. The website does not help the developer out at all. Which somewhat interferes with what I want to do design wise as well. They throw their tech docs out there like we should already know what they do for the most part and thats a bad method of teaching.
I find myself going to forums constantly asking questions and half the time no one answer. For a second there I thought that magento probably just had a very weak community. But now I’m starting to wonder if maybe no one truly knows the answer and everyone is there just to find an answer.
Even though I have not read the book, Im glad you guys made one and I am going to be very excited to get it as soon as I get a chance. Because I feel any type of good explanation will help me alot so thanks for making the book, you did us all a favor.
July 20th, 2008 at 6:40 pm
@Anthony:
I understand your frustration. I’ll pass along your post to Mark, who wrote the book, but you can also reach him here and here.
I think the ‘matryoshka dolls’ are what you’re talking about.
July 23rd, 2008 at 9:58 pm
Hello mgkimsal, this is Anthony again. I’ve been reading your brothers book and I have found it to be very helpful in understanding magento. By reading the book and hearing you and your brothers argument, if there is anyone to blame for anything, its the publishers. They gave your brother little time to explain something so big and complex. And by reading the book I could tell that your brother was moving along quite fast.
I am pretty good at php but never have I worked with zend framework or used the EAV model. He was great at explaining the EAV system and it really help me to understand it, however I was quite lost when trying to understand the dispatch process. These are definitions I have never heard ever In my life. If this is part of the Zend Framework then it almost seems as if it works like the .Net framework. Where there is preload and a post load. In which you can call events during the process of the page loading.
When it came to step by step instructions on how to create custom modules, he was amazing at giving instructions. Never did I find myself saying ‘Wheres that at?’ or ‘Its not working!!!’ But however I did find myself saying ‘Great it worked!!!! But I dont understand how it just worked’ One moment where I found myself doing that was when making the first custom module. he said to make my first block and call it ProductViewCase.php. There we made a few methods called getCaseCount() within the method we made this
function getCaseCount() {
$product = $this->getProduct();
return intval($product->getCaseCount());
}
I was a little confused because getCaseCount() called itself within the method. I tried looking for the method in the magento documentation and I couldnt find it. He wasnt clear on what exactly we did. Even though we did it which was great, I had no idea how we did it. I also notice that within the template we used the $this-> prefix and we wasnt even in a class. Thats not normal for usual php coding. Even though I had somewhat of ideas why I could do that, I didnt hear it from him which left me not confident about how exactly it worked.
But overall its a great book, Im glad he made it. I wish the publishers gave your brother more time. Actually alot more time. So the book could of been bigger. I was actually thinking about taking their online courses but now im a little skeptical given what little time they gave your brother to cover the material. But slowly but surely I am learning magento and I have the book to help me out as well.
July 24th, 2008 at 5:10 am
@Anthony:
I wouldn’t come down too hard on php|a - I think this is more the nature of tech publishing than anything else. Given a product’s launch I suspect most publishers would have had similar deadlines. I can’t speak to their online course on Magento, but I’ve known instructors who handled some of their other classes and know them to be top-notch people (and developers).
If you’re looking for specific help on Magento (or PHP), Mark is still doing consulting. I don’t know his exact schedule, but if you have questions, you can contact him through http://biz.metrofindings.com
Thanks Anthony.
July 24th, 2008 at 6:01 am
Source code is finally available too…
http://biz.metrofindings.com/magento-book/
July 24th, 2008 at 6:04 am
Oh, and the “getCaseCount()” is a block method calling a product method. You see that a lot in the Magento template/block system. Blocks usually end up simply wrapping access to higher functions. To me, this seems like what helpers should be doing.
$this-> in template files points to the containing “block”. So, all the .phtml files are executed withing the scope of an object. Exactly which block object is being used depends on the layout/*.xml files.
August 5th, 2008 at 3:22 pm
I tried to download the source code, but the word test has not passed me. I have the PDF version; is page 85 the same in both versions?
I’d really like the source code as there are unclear things in the book. For example, I’ve so far been unable to get my magento install talking to a CMS database (joomla, in this case). It seems in the book the process is to set up a EAV entity in the overriding module (UserConnect) even though the data source table in joomla is not EAV, which is confusing. I’m hoping that the source code could clear that up.
I imagine that it must have been a difficult book to write under the circumstances, but I just wanted to say thanks! It’s a good source, warts and all. I think it would be really useful to set up an eratta site for it, however, to fix any mistakes (should ‘_getDefaultEntities()’ on page 92 be ‘_getDefaultAttributes()’?), and maybe clear up other things that weren’t clear for people.
August 5th, 2008 at 3:37 pm
Problem solved with the getting the source code! I was checking page 85 of the pdf reader not what was printed on the page, so please disregard that part of my post. Now lets see if it makes things more clear!