OptimusCrime.net

Computers & Programming

Thoughts on the future of MODX

Posted: 03.03.2015 12:18

Preface

This article is my thoughts on the two articles posted by opengeek where he describes his vision for the next major release of Modx (after this simply called modx3).

You can find the articles I am talking about at medium.com, here:

Disclaimer

I first of all have to say that I love Modx. I really liked Evo, but I fell in love with Revo. I’ve used it for more than 20 projects and I think it is the very best CMS out there. Despite the negativity I might express regarding Revo, please keep this in mind.

To really explain what I think about the next release of Modx, I really should tell the story of how I met Modx and what I’ve learned since then.

My first experience with Modx

When I finished high school I was lucky to get a job in a local ad firm. They took me in without knowing how good I really was at programming, and really I think I was a pretty bad one. However, I have the ability to focus on something of interest and learn that thing. When I got the job in this firm I got access to a simple Evo site that I could use the learn the framework they used for their projects. This was of course Modx. The first couple of hours were filled with confusion. How does these placeholders get populated? What all these elements and what the hell are snippets and chunks? When I figured out the system and how everything was connected I thought it was one of the best ideas I had ever seen. I had done some work in WordPress earlier and I hated it. Evo on the other hand was a really great CMS. It facinated me so much that I learned everything I could about it. After about half a year I knew everything about Evo there was to know.

Working with Revo

After I had created some sites in Evo, Revo was stable enough for us to move up to the next major version. Once again I was confused by all the new stuff but quickly understood how everything was connected. It was a great platform. A really great platform. Once again I sat down and tried to learn everything about Revo. As it is much more complex than Evo it took some more time, but I think I can say today that I can solve almost every problem I encounter alone. I know the pitfalls, I know the good and I know the bad.

University and new technologies

After a year of full time work in this firm I started studying. I still do work for them, but not nearly as much as I would in the offices. However, because I enjoyed working with Modx so much, I stayed up to date on the newest progress and news about the framework. At the same time I did this I also came across many new pieces of technologies while studying. I've done much, much work in Python frameworks like Django and Flask. I’ve also looked at Slim, Laravel and other frameworks like them. This got me to realize that many aspects of Revo was not that great. xPDO is great, but there are many other ORMs that are simply mind blowing. SQLAlchemy in Python for instance. It is simply brilliant. Eloquent that Laravel uses is also super powerful and sexy. I also realized that creating extras for Revo was far too complicated. It should be an easier process. The manager has become a hassle to extend and change. It is simply too tightly connected to the backend code. Actually, changing anything is rather complex because of these connections going all over the place.

The biggest wow I got was when I was writing my own system from scratch and looked into Composer and the PSR standards. Composer is so powerful I just can’t explain it. Using it with the autoloader from PSR you have more or less revolutionized PHP.

The problem with Revo and the PHP revolution

The problem can be summed up pretty fast. Revo is at this time too complex for a rewrite to follow the PSR standards. It can be done but the work one would have to put into it would be enormous. It would also require a huge redesign of the core and how everything it connected. The mindset for applications now it to keep them as separate as possible. I have no idea how one would do that with the Revo code.

The future of Modx

This takes us to the articles written by opengeek. He expresses his wishes for the next release as a microframework where everything is built upon a small core. This makes much sense considering the standards mentioned earlier, as well as benefiting from Composer and all the available packages it can provide.

In order to achieve this we need to start from scratch. As I explained in the previous section, a rewrite of Revo is not possible without breaking more or less everything. Beginning with white pages is the only logical solution.

Imagining the future

Using Composer and make modx3 extendable by packages would redefine how Modx applications are developed. Just imagine having the manager as a separate module. One could decide which manager interface to use, maybe even use multiple of them for different purposes. Installing a gallery by simply writing it in the composer.json file and running the update/install command. Creating your own extra would be super easy. Place models in one directory, backend code in another, templates in a third and scripts somewhere else. Maybe it would be possible to have a simpler sync between develop and production environments?

Final thoughts

The possibilities are endless with a new canvas and all these tools and the great workflow already defined by standards that are well adopted by millions of users already. It would open up Modx to a whole new audience. Laravel is awesome and all that, but it does not have all the brilliant ideas that Modx has. I believe a great modx3 product could really place Modx on the map as the best CMS out there.

I am looking towards the future with a love of excitement.

Feel free to post any thoughts in the comments and joy the excitement for all the cool things that are coming.