Tuesday, May 28, 2013
MODX: The Official Guide 1st edition, Bob Ray
Finally! I got my hands on a copy of BobRay's book! And the first thing I saw when flipping it open to a random page was the "getParentIds()" function. It looks like I need to rewrite the old UltimateParent snippet to make use of this. Even though I've been a MODx developer for over 8 years, this book has immediately become one of my primary sources of MODx know-how.
One very interesting feature of the book is the sections on Evolution, "Evolution Notes" at the end of the chapters. These notes describe similarities and differences in how Evo handles the subject being discussed. This will be even more significant as Evo development picks up and continues.
The book is over 700 pages, with 13 chapters and an extensive Appendix. While some of it is already obsolete at this point (what computer tech book isn't already partly obsolete by the time it gets published?) the vast majority of its content will definitely be useful. Since I'm already intimately familiar with the basics of how MODx works on the surface - surface functionality hasn't changed much from Evo - I especially find the chapters on using the xPDO-based API invaluable.
THE BASICS
The first six or seven chapters cover the basics of how MODx organizes the content and functionality of a website. After describing how MODx works in general, they go on to explain the basic building blocks of Resources, Templates, Chunks, Template Variables, Snippets and Plugins. For new users, these are well-written and will give you a great insight on how best to leverage these resources and elements to build your sites while maintaining separation of content, presentation and function. For the old hands, they are worth at least skimming through, as they do cover the new twists Revo puts on some of our old friends, like Symlinks and Static Resources, and how all elements can have properties, and can be static elements pointing to files.
CODING THE REVO WAY
Chapter 8 is where things really start to heat up. Revo has a totally different core than Evo. This new core, based on Jason Coward's xPDO library, is fully OOP, MVC, and all sorts of other clever acronyms. But it really does open up whole new approaches to developing for MODx. While snippets and plugins still superficially perform the same functionality as they do for Evo, PHP coding for Revo is a whole new experience. Chapter 8 is over 100 pages explaining how to use the the xPDO-based API with all of its "get" and "set" methods. Object-oriented junkies will be right at home. Examples and tutorials abound.
ORGANIZATION AND SECURITY
Next, in chapter 9, Revo's ability to rename the manager and put its core files outside of the web root are discussed, as well as the organizational possibilities in the concept of "contexts". Contexts make it possible to manage multiple domains and subdomains using the same MODx installation. They are also often used to provide pseudo-subdomains or subdirectories for managing multi-language sites.
Chapter 10 is arguably the single most important chapter in the whole book, as it demystifies the Revo user management system. Permission, Access Policies and Policy Templates, Roles, users, user groups and resource groups are all explained, along with how they fit in to the Access Control List model of Revo security. A number of tutorials working through several common scenarios help illustrate how it all comes together.
Chapter 11 describes how the Manager interface can be customized using Form Customization and Custom Manager Pages, instead of or in conjunction with user permissions.
EXTENDING MODX
Chapters 12 and 13 deal with third-party add-ons, describing how to use the Package Management feature to easily install ready-made add-ons from both the official MODx repository and local packages, and how to create your own add-on packages.
APPENDIX
Finally, the extensive Appendix section has a wealth of useful information. It starts with the API, including xPDO functions, the xPDOObject class that is the foundation of everything, MODx object functions, and the modUser class.
The Appendix even includes a nice introduction to PHP programming, with of course tips and tricks particular to coding for MODx. Debugging and good coding practices are covered.
Using the MODx mail system to send mail via SMTP is described, and finally an exhaustive list of the system events, used to trigger plugin code to modify the behavior of MODx without modifying core files, is provided.
BobRay has for years been helping out newbies and experienced MODx users on the forums, and his Bob's Guides website has excellent articles and tutorial on all kinds of things MODx, as well as some pretty good bread recipes. This book is definitely something that every MODx user, from designer to developer to content editor, should have handy.
I am not a professional web site developper.
I have developped and maintain a dynamic web site(with PHP and MySql) for my hobby interest though. This site is more than a simple blog site and run on MODX.
When I started using MODX, I had a good understanding of HTML and CSS. I also had a working knowledge of JavaScript but no knowledge of PHP. There was a good series of modX site creation instructions on the coding pad blog (just google with "coding pad modx tutorial".) I gained most of working knowledge on MODX from this internet resource. The said tutorial get you going on constructing a database driven web site in relatively short time. Note that I also evaluated Joomla and Drupal at the same time, loaded them on the server and tried them out. In the end I chose MODX over them, mainly it allowed a direct transition from html based web site to dynamic web site. Other systems force you to set up the site their way. With MODX, I did not need to rewrite my html markup, my menu structure and/or my thought process. Infinite amount of fine tuning as to how the web site should look is possible with MODX.
During the course I started to learn PHP to appreciate the power of MODX. Thanks to my knowledge with JavaScript, learning PHP was not difficult. What was difficult was the way MODX let you utilize PHP in "MODX way"
I bought Bob's book the moment it came out. Aside from usual stuff that tells you how to build website without any coding, the most strong point of his book is about how you can vastly improve your site with a little PHP coding and let the MODX engine (with APIs that you can tap) take care of otherwise hard programming exercise.
This is a thick book. You need to skim through the book and get a feeling of what is available inside. Then while you are working on creating a site, and have some questions, you can go to the excellent table of index at the back and find a topic, read them through and apply to your project.
Case in point. Recently I needed a method to dynamically insert a CSS file at the section of particular pages. I remember seeing modx->regClientCSS in the online MODX page, but there was not much of an information other than the mention this can insert a CSS file. Enter Bob's book. Here is what is shown in this entry.
reg* - The following five methods insert CSS,JS, or HTML at various points of a document. In all cases, the script is registered with MODX so that it won't be injected more than once. Multiple scripts are injected in the order in which they are reigstered.
regClientCSS(string $src) - Places the string just above the closing taf of the document. If $src contains ''
This chunk of information turned out to be the exact information that I wanted to know. In another word;
1) Multiple calls to this method will not result in multiple references to the same CSS. the function takes care of itself as "required once"
and
2) parameter can be not only a file path but also a string that actually contains style tag and attributes ""
I could have eventually gain this knowledge by googling Internet I am sure. but it could cost me half an hour or more.
The book is packed with this type of information. I constantly going back to the book when I am working on the site. Indispensable.
If you are actively developing websites with MODX this book is a must.
I bought Bob's guide to MODX after working with MODX for several months. While I was able to get started on my own fairly easily it took Bob's guide to take me into moderate and advanced MODX territory.
The guide *easily* paid for itself the first week I had it. Instead of searching Google for hours I just looked up the relevant topics in the index and found the appropriate section. No matter the topic Bob treats it clearly and thoroughly.
The book is well organized and Bob fills it with plenty of examples. You can either read it from cover to cover, or skip around as you need to learn about various MODX topics. In many cases the examples are the most helpful portion, but they are pieces of code that I haven't been able to find online.
Finally, the author actively monitors the #MODX hastag on twitter and provides ongoing support there as well as the MODX forums. You can't go wrong with an author that backs up his material that way!
I've been designing web sites for well over ten years now and I have never enjoyed using any software programs ... mainly because I enjoy writing my code by hand and designing my own templates as I please. Software programs always restrict you to the templates provided and if you try to change them ... well, it just isn't possible.
But recently, I heard about MODX, which allows you to use your own templates (or to modify the MODX templates as you please), and I said, "Finally!" So, I downloaded the software and started digging in. Unfortunately, the tutorials that I found on the web, although very helpful at times, often left this "newbee" out in the cold and the dark; in the woods, on a moonless night, without a flashlight! Yipe!
So I decided to take a chance at ordering MODX: The Official Guide. Honestly, I was skeptical about the purchase but went ahead, in hopes that I wouldn't be disappointed. Well, I got my copy a few days ago and I have to tell you -- I am really impressed!!!
Bob Ray has done a magnificent job! I mean, I was so pleased to see how clearly he explains everything! No kidding ... most books like this are not only dry and boring, but also very tiring ... and worded in ways that make the execution of various tasks very difficult to comprehend. Not this time! I find myself blazing through, page by page, and understanding exactly what I need to know. This is great!
If you are interested in learning MODX ... don't hesitate to buy this book. Bob Ray will walk you through every step and explain every task in enjoyable ways!
Good job, Bob!
Product Details :
Paperback: 772 pages
Publisher: MODX (September 1, 2011)
Language: English
ISBN-10: 0983619409
ISBN-13: 978-0983619406
Product Dimensions: 10 x 8 x 1.5 inches
More Details about MODX: The Official Guide 1st edition
or
Download MODX: The Official Guide 1st edition PDF Ebook
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment