MODX Community

Advantages of using modx?

hi guys, this is a serious and genuine question so please no flamebait responses.

I am a junior developer, worked for a company developing in modx, but now i’ve moved on to a company as an october cms developer, and i’m trying to understand the advantages of using modx over other systems.

since i’m not very experienced, there might be obvious things i’m not seeing, so please try not to be insulted by my questions or be condescending in your response.

As far as i can tell, compared to the system I am using, modx seems to have some vary glaring disadvantages. Again, these could be just perceived disadvantages, due to my inexperience.

For one, the fact that modx stores html code, and even php code (in the form of snippets) in the database, seems like a big problem for me. Doesn’t this mean that it’s impossible to version control your code? since its stored in the database you can’t commit it to git. Then you have the issue of not being able to use debugging software like xdebug through your IDE because the code is not file based. And you can’t use your IDE’s search functionality or go to method implementation (I use phpstorm btw). Also, doesn’t this architecture increase queries to the database, thus decreasing performance of your application?

I read about people using roundabout tricks to manage some form of version control, but doesn’t this make for bad developer experience and still not defeat some of the issues mentioned above?

also there are no database migrations as there are in octobercms, so version controlling your database is also troublesome

then there are things like translations and user permissions, what in other systems seems like a five minute job to set up, with modx always seemed like an uphill battle, needing to modify htaccess files to make translation packages work seems like bad practice to me

user experience also seems to suffer, with an admin panel that looks like something from the 90’s, and also non intuitive. Slows down the development workflow, and also then creates other issues, how do you help the end user get his head around ‘resources’, template variables or dealing with namespaces when all they need to do is translate a string etc.

no templating engine? I see now that someone tried to bring in twig to modx, but plugin seems abandoned, never got a full release, just an RC version years ago, documentation seems to not be there, and implementation seems like a hack, don’t even know if this plugin works any more or if it ever did. so no templating engine means messy unmaintainable code

another issue seems to be how development friendly it is, october has cli commands for scaffolding plugins, components, controllers etc in seconds, while modx makes this unnecessarily tiresome and time consuming. Again this could just be my inexperience talking but modx seems to make the development experience just a drag, needing to follow multiple steps in the documentation in order to do things done in seconds with other systems

and my final issue with modx, I tried creating a rest api, followed the instructions in the documentation but couldn’t make it work, some posts on the internet seemed to suggest documentation for the rest api was not accurate, instead suggesting their own steps in creating a rest api, which I still could not manage to make work. I understand you can just blame it all on my inexperience, but never had issues creating rest apis with octobercms and laravel in general.

developing in octobercms, at least for me, makes for rapid development, much faster than modx, and also a much more enjoyable developer experience

so I guess Im trying to understand what advantages modx has to offer, and if it actually is something worth sticking with for development purposes, I assume there must be some advantages Im not seeing if people are choosing it over other cmses

I appreciate you taking the time to read and respond

Hi @michalis123, welcome to the modx community.

I am only able to answer you some questions. The last time I worked as a professional webdeveloper was back in 2008 untill 2012. Worked using a proprietary php framework (I was biased as well as I never tried other cms/cmf before) and later I tried Joomla, wordpress and then I found MODx.

As far as I can tell modx allows you pure frontend integration freedom. I didn’t find such freedom on Joomla nor in Wordpress. I always had to adjust my HTML code to fit the platform way of working. Not in Modx.

I can understand what you say regarding having the code in DB, but this is not a deal breaker since you can define static files and these can be used for code versioning with ease, with a plus:
As soon as you mark a template/chunk/snippet/plugin as static file, the file has priority over DB content. Meaning that you can make changes to the file, clear the cache and it just works. As soon as you open it in MODx manager, it gets automaticaly updated from the file and you can make changes freely. Once you save, the file gets changed. I don’t know any other CMS/CMF that allows me to do this. For me, using Git was never a problem.
SInce I use notepad++ and VSCode, my debug is all performed on the browser with PHP xDebug extension. I am outdated, I know, but it works great :slight_smile:
But I can understand that using an IDE with live error dump might be tricky. I couldn’t get used to an IDE and always preferred to use plain code editing with simple syntax highlighting.

And never saw a big problem with performance, because modx has Cache tweaking options. So the DB queries are few once the site gets properly cached (there are even plugins for cache refreshing when it gets cleared). Every cms/cmf has a catch about cache (better not talk about Wordpress :slight_smile: ).

I have some sites with multi-lingual implementation along with subdomains linked to contexts, and never had to change htaccess for that. I just use a combination of extras to make it work and that’s it (Babel and xRouting). Never had to edit the default htaccess except to force https (as an example).

Modx 3.0 is on its way with a lot of improvements. Modx 2 is showing signs of (good) aging. So it is normal that some architecture might be outdated. Should be solved soon :slight_smile: It will be more developer friendly with a new and modern interface along with code refactoring following the new coding guidelines. I recommend you to have a look on it. You will quite possibly be surprised.

I cannot comment about restAPI as I never used it, sorry.
I am also unable to comment MODx vs OctoberCMS because I never used OctoberCMS and any other Laravel based solutions.

Backend development in MODx has been a tricky adventure. Still trying to learn properly xPDO and trying to create my custom solutions for the MODx backend. ExtJS has been a nightmare for me I must confess… MIGx was a very good extra that I found in order to make backend development easier.

Since WebDev is one of my (vast) hobbies, I prefer to stick to a solution that just works for what I need and want to do. On a professional point of view, that would be possibly different but, again, I cannot comment on that perspective because I am not a professional webdev since 2012. I will let other users to comment on these points.

Cheers

3 Likes

Hi @michalis123,

There’s nothing wrong with choosing to use OctoberCMS, it’s also a good CMS. It’s not however as mature as MODX.

Some points about your MODX queries:

  • You can choose to have your elements (i.e. templates, snippets, chunks, plugins) in the database (this is usually more user friendly for non-developers) or as a developer you would usually use static elements instead so you can easily use versioning with git etc. You can also choose to use static resources if you wished. There are even tools to export the entirety of the database into version-able files or any specific subsection e.g. Gitify

  • database migrations are quick with MODX tools such as Teleport. Teleport is even used on the MODX Cloud platform and allows for pushing dev -> staging -> production workflows. It can be highly customised.

  • MODX has a context architecture that is multilingual ready. I assume this is what you mean by translations… lexicons are used and easily updated so I’m not sure why you’re having trouble with it. It is not required to change anything in an .htaccess file for multi-lingual sites (unless you choose to set it up that way). Instead just install LangRouter or XRouting and it handles it for you. If you want to even take a step back further from that and have everything ready in one click, try the extra MultiLangSetup.

  • The look of the admin panel (called the manager) is highly subjective. It’s being refreshed for MODX3 but I still like the default theme for MODX2. As a comparison, the OctoberCMS admin panel is highly stylised with bold bright colours which is great for some but I’m not really a fan of. I find my clients tend to prefer more of a business/professional tone.

  • MODX has it’s own tag system built on top of the smarty templating engine. I’m a bit confused how you were not aware of this as you would encounter these tags from day 1. You’re not limited to the default one though, you can choose to replace it with the Fenom templating engine which is touted for it’s speed. Other extras such as Fred and Commerce include Twig so that’s an option too.

  • Setting up a rest api is straight forward and shouldn’t take long in MODX. If you’re having any trouble, just make a post about the issue and I’m sure you’ll get help quickly.

I hope those responses clear some things up about MODX for you. I find the community to be extremely helpful so just make a post when you run into any issues.

Cheers!

6 Likes

thanks you for answering, I will take a look at the things you mentioned

The advantages of MODX are most noticeable in the work with large sites. Here you will get an almost empty shell, which can be adjusted to the actual needs of a particular site. There is no strict binding of the placement of templates in the hotel catalogs, and the syntax of the CMS allows you to keep the code clean. shareit apk vidmate app