MODx Web Development Book Review

MODx Web Development (ISBN: 9781847194909) is written by Antano Solar John and published by Packt Publishing. Download a free chapter (Ch 5: authentication and authorisation).

Finally, there is a book available on MODx – it’s about time! MODx is an open source PHP CMS with an awful lot going for it. While gaining in popularity, it’s nowhere near as well known as the likes of Joomla or Drupal. Hopefully, this book is the first of many on the subject and will help raise its profile and encourage more people to give it a go.

I first came across MODx over 3 years ago, when online documentation was somewhat sparse. I could see great potential in it back then, but after using it for a couple of sites, my work changed and I didn’t have a need for it. More recently, I’ve been working on more complex projects where solutions like MODx come into their own. So this book could not have come at a better time for me. With a somewhat hazy recollection of MODx, I wanted to get up to speed on the fundamentals quickly and this book helped.

This book is most suited to those new to MODx and is also appropriate for those new to content management systems in general. The pace is fairly gentle for the most part. The first three chapters (forty pages) just cover a little background and setting up a local web server (XAMPP) and getting MODx up and running.

Next comes 28 pages devoted to templates. This chapter conveys MODx’s ease of templating, one of its major strengths. You have a basic blog up and running by the end of this chapter, without the content getting technical. The book takes the approach of showing you how to get common functionality up and running, without getting bogged down in explaining what the small pieces of code needed mean. The technical details are saved for a few more advanced chapters near the end of the book. This approach frustrated me a little, since as a coder I like to know exactly what everything is doing. However, I can see the merit of this approach for a less technical audience, which is the main market for this book.

The next three chapters (56 pages) cover authentication, content aggregation (the Ditto snippet) and creating lists and navigation (the Wayfinder snippet) respectively. These are the bread and butter of most websites, and the book provides a good grounding in these techniques. Chapter 5 on Authentication and Authorisation is available as a free download from the Packt website.

As an experienced web developer, chapter 8 on snippets was where things started to get a bit more interesting. This is where some of the technical gaps left in previous chapters start to be filled in. The content is still quite accessible, focusing on explaining how to install and use snippets.

Chapter 9 introduces Place Holders Extended or PHx, which was not only new to me, but also my colleague who has built a few MODx sites recently. So, while much of the book caters for newbies, there is the odd nugget in there covering lesser known features or more advanced material.

Chapter 10 brings the focus right back to the practical, covering popular modules for adding common functionality to websites. It looks at the SMF module (for integrating MODx with a SMF forum), the MaxiGallery image gallery snippet, the built in eForm snippet for creating email forms, the WebLoginPE snippet for implementing user profiles and, finally, how to show similar articles using the old reliable Ditto snippet.

Creating Snippets is covered briefly in Chapter 11, and Chapter 13 looks at Plugins and Modules, including how to create a very simple Plugin. These chapters are both just 16 pages long and I would have preferred some more coverage on these areas. This would not be expected from a beginner book, but since it delves into more advanced topics in places, it would have been nice to see a bit more meat to the coverage.

I was delighted to see a chapter devoted to SEO, deployment and security (ch 12); all vital real world areas, but so often neglected, particularly in introductory books. Alas, aside from information on migrating your site to a live server, there is little of note here. Several general SEO guidelines are included, but I feel that the SEO advantages of using MODx relative to other content management systems, which can often cause problems with search engines, would have been more beneficial.

Another gripe is the amount of pages taken up with large excerpts of HTML code, often only differing from previous excerpts by a line or two. Surely this is overkill, even for newbies. The writing also appears somewhat formulaic or clunky in places, but in technical books, that’s less of a failing. I did notice some typos along the way too, which is more unfortunate, but most were fairly obvious.

There is a very strong MODx community, and some excellent tutorials available online. The Coding Pad has a good list of these. While many find it easy to get up and running using these resources, for others, like me, there is no substitute for a good book. Although I don’t get much time to read these days, I have a large collection of computer books.

In this context, I would describe this book as “OK”. It’s not one of those dry, complicated tomes which I never got into. It’s quite an easy read, and gives you confidence about building real websites with MODx, and perhaps even creating your own snippets if needed. On the other hand, it’s not a bible which I will refer to again and again, but that’s not its aim. Overall, while a little clumsy in places, it’s a good introduction to MODx for new users or developers looking for a refresher course.

Disclaimer: Packt Publishing kindly gave me a free copy of this book to review.

11 thoughts on “MODx Web Development Book Review”

  1. Nice review. I’d say from what I hear it is fairly accurate, the book is reportedly not bad (I haven’t read it).

    One thing I wanted to correct was that the Menu snippet is called Wayfinder and not Wayfarer.

    Thanks for the review.

  2. Oops! That typo’s corrected now – thanks for spotting it Jay.
    I really appreciate you dropping by to give feedback on my review.
    I’m looking forward to getting my hands dirty finally making some sites with MODx again soon. It’s been too long!
    Also excited about MODx Revolution – must check it out when I get some time…

  3. It’s good to see you back on the MODx bandwagon Janine, it was you who put me onto it 3 years ago…and I have been using it religiously ever since!

    U should check out the Revolution 3 beta for some of the cool new features, including a very posh ajax manager and a Package browser that lets you browse, download and install new snippets and plug-ins directly from the manager…how cool is that!!! No ftp etc…posh ๐Ÿ™‚

    I read parts of said book, and found it quite good. The only “issue” I see is that this book services the Evolution branch(MODx 0.9.6.3) and Revolution is a completely different beast altogether. This book may be obsolete when they start pushing Revolution.

    Beware of Phx btw…it can seriously show down your pages!! Use it sparingly.

  4. Thanks for your input Justin – after 3 years at it, you could probably write your own book! ๐Ÿ™‚

    Yes, I have heard great things about MODx Revolution, and also see excitement about the recent 1.0 Evolution release, so will have to check those out sooner rather than later.

    One thing we have found with MODx is that clients can find it a bit hard to use and/or mess things up here and there. I hear that the back end has changed a lot in Evolution 1.0 which may help that. Have you found non tech savvy clients having issues? Are there plugins that can help?

    I’ve been working with another CMS called ExpressionEngine of late, which hasn’t caused issues with clients yet (touch wood!) but has a fair few “quirks” for developers. ๐Ÿ™‚ At the moment, if a site has a lot of structured content types or a lot of membership based functionality, we veer towards using EE, whereas if it’s more of a typical website with lots of general pages, we use MODx. Building sites with MODx seems to be easier for standard sites though, so if the back end was a bit more foolproof for clients we would definitely focus on MODx.

  5. Hey Janine,

    MODx Revolution is going to be in beta for a bit longer but MODx Evolution will continue to evolve (no pun intended). If your clients are “messing” things up there are usually two reasons, they are given too much responsibility in how they manage the content or they are confused by all the fields to “ignore” in the manager.

    One thing to do is always see how you can limit the styles in the output for the client. Ideally the content block should have nothing more than paragraphs, h1-h6 and floated images in it. If your clients are left having to style things, they probably should be in TVs or Chunks. There are basically 3 types of content you will have are pure content (the text and related but freestyle images and headings. Like an individual article or blog post), serialised content (like blog or new site or staff members, repeated content), portal content (content from multiple sources but no unique content of its own).

    Finally if you want to limit what the site editor sees on login you should really install ManagerManager which allows you to control the names and visibility of all the fields associated with a template (and other resources). For a blog you could change the name of Pagetitle to “Post title” or if it was a staff directory Pagetitle could be Member Name.

    There is a tonne of flexibility and it can make it a little harder on the developer/designer but far easier on your client.

    If you want to learn more about how to make client site management easier in MODx please let me or the MODx team know.

    Cheers,

    Jay.

  6. Many thanks for the advice Jay – appreciate you dropping by again.
    I’ll give the ManagerManager plugin a go thanks – it looks useful.
    One thing my colleague has found causing issues to date is clients messing up a snippet/chunk tag within a content panel.
    The other issue is that if you have a news list page which lists out news articles (sub pages), he found that he couldn’t grant the client access to edit just the news articles but not the news list page, due to permissions cascading.
    I know there could well be workarounds for both of these though?
    Thanks again,
    Janine.

  7. I find that making good use of document groups, and splitting things up into template variables greatly helps clients.

    TV’s are massively powerful when used properly. You can tailor the input so the client can’t really get it wrong! Your always going to have problems when they get loose with a wysiwyg, but by splitting the editable content areas up into TV’s you make it easier for the users to find their way around.

    Document groups and Roles allow you to completely customise what the client sees when they log in. I usually hide all the dynamic pages using snippets, to prevent the client removing snippet calls. I hide all the nav I know the client will not use.

    You need to check out the frontend editor in Evolution, I think you will like it.

  8. Re: The other issue is that if you have a news list page which lists out news articles (sub pages), he found that he couldnรขโ‚ฌโ„ขt grant the client access to edit just the news articles but not the news list page, due to permissions cascading.

    – Take the snippet call out of the [*content*] for the news listing page, this way the client can’t get to it and ruin all your hard work! Don’t ever let them near snippets or chunks ๐Ÿ™‚

  9. Thanks for sharing your secrets Justin. ๐Ÿ™‚

    We had made use of TVs in simpler sites, it’s just that this large, complicated site we did ended up having all sorts of snippets in all sorts of places! A lot of spec changes late in the day meant the site became more complex than originally envisaged. But I can appreciate that with sufficient time and thought, it should be possible to make the content management bulletproof.

  10. Hi Janine
    Nice to see ModX gaining in popularity and exposure too. I’m new-ish to ModX and have found it remarkably straightforward to create dynamic and powerful websites with it. I’d mrror what you say about using EE for more complex multi-user sites but with Revo, that may change. Nice post.

  11. Thanks for the input Peter – I’ve been an admirer of your designs over the years ๐Ÿ™‚ I’ll definitely have to take a good look at Revo – since I wrote this post I’ve been using EE more and more and have just been too busy to get my head into modx again – *must* find the time!

Comments are closed.