Python Vs WordPress

WordPress powers 43.5% of the world’s web sites, but Python is much better at managing complexity.


Hierarchy
    A basic principal in human factors is that there should be no more than about 7 items in any category.    In Python-based CMS's such as Plone, Silva and the ForestWiki, pages are added to a tree of pages, making it easy to manage complexity.   Pages can  be accessed voa their hierarchical path
/path/to/my-new-page

    This is much like in a file system. But unlike a file system, in the ForestWiki pages can also be accessed by their canonical path

/my-new-page
    The former gives context, the latter is easier to type.  In this system, there can only be one page with each name. Try to create a blog page with the same name (slug), and one gets an error.

    In contrast, in WordPress pages are created at their canonical path
        /my-new-page
    By default there is a single long list of pages.  One can add a category path.
        /path/to/my-new-page
    But that takes work.   And when trying to rearrange the category tree, you have to visit and edit every moved page. Quite unreasonable for large complex sites.

    WordPress functions have a similar problem.  There is only a single namespace.  You get a long list of functions.  If you write a function called foo, and I write a function called foo, only one function will get used.  This leads to large numbers of conflicts, particularly for beginners.  Instead one has to prefix the function names as in:  my-module-foo and your—module-foo. In practice people use 3 letter prefixes, which works great, until it doesn’t.
    In contrast Python has namespaces.
        from  my-module import foo.
    Or
        from your-module import foo.
    
Or
        from your-module import foo as your-foo
    After which one can happily call foo or your-foo Much easier, and more robust.

Security
    Lack of hierarchy has a big impact on security.   I thought of adding database tables to WordPress for editing local candidates and parties.  The problem is that if one has the edit-candidate permission, or the edit-party permission one can edit all of the parties or candidates, and not just your own data.  A hugely bad design.
    In contrast, in the ForestWiki GreenMaps application, there is hierarchical security.  Every user can be given permission to edit their data and only their data.  One level up, a state party administrator could be given permission to edit all of the local data.  Or a national user could be given permission to edit all of the nation's data. Or maybe just all of the state-party data.  Further refinements on the hierarchical security model are possible, and have been implemented in Plone.
    In Green Maps, every local group can have permission to add content to their branch of the tree, and only to their branch of the tree.  And they can assign hierarchical permission to those below them.  As a candidate, I could grant one person permission to edit events, another permission to edit news, and a third permission to edit both.

Libraries and Plugins
    Python has much better organised libraries.  When searching for a Python library, I very quickly find the recommended one, and multiple blog postings about it.  The library is free. It focus on one functional area and has all of the functionality that I expect it to have.  If I am not happy with it,  there are usually a few other less well known options and soon the best ones rise to the top.
    In WordPress, searching for a plugin is a nightmare.   Many sell upgrades, meaning that not all functionality is available.  Then there is competition for the money, and so multiple plugins do similar things, many of them restricting different functionality.   And there is competition to be the brand name, meaning that many plugins offer lots of different functionality.   Meaning that in any one category, there are lots of plugins with other functionality to choose from.  No thanks.

Abstraction
    Python is also much better at abstraction.  In the Python world, I use JSON forms.  I edit the json, and that controls the display, multiple form tabs, the client validation, and the server validation of the forms.  When first developing WordPress, I have to create the form display, the form submission function, the form sanitising function, and the form data commit function.  It is a lot of repetitive work. Fortunately there is so much of this repetitive work out there, that DeepSeek did a great job writing the code. Perhaps a more advanced approach is possible, but this is the default.

    WordPress has a great sales pitch.  A popular platform with tons of Themes   Sounds great until you try to use them.   7573 themes.  Not organised as a taxonomy.  Every time I try to do a key word search, I get hundred of results.  Or nothing.  At first the theme looks great, until it does not do what you need it to.  And then one has to do file system development, which usually means first learning how to use Linux.  

    In contrast Python expects one to find themes elsewhere.

 Summary
    WordPress and Python each have their strengths.  The challenge is to know when to use each of them.   Many people choose  WordPress, and it is fine for simple applications, but for complex server applications use Python. 


  Python Vs WordPress

  Contact

  Through the Web Development

  Competing Products

  Teaching

  BastilleBSD

  Forest Wiki

  Verilog

  Categories

  Federated Wiki

  More


 Built using the  Forest Map Wiki