Robbie's Words

A blog about anything

This week and next, I'm receiving training for Magento, a big-time e-commerse framework that allows you to create a web storefront to sell stuff. This is clearly not the correct choice for our website at work, but the shopping cart at the very least will be leaps and bounds better than what we currently have.

Anyway, I'm being trained on how to develop for Magento so I can be prepared to customize and change it however my company's managers might want or need, and as I'm doing the training, I'm finding that this, like many other big-time frameworks, is just way too over-engineered.

Look at this class namespace: Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection

Why in the world would anyone do this?? I can't even comprehend the process that could possibly have gone into architecting this structure! Who would let this happen? Who would want to work this way?

On top of that, to create a new module, the file and folder structure is so convoluted that you need training to understand how it works; there's no way to figure it out by looking at it! Here's the full sample module file structure from the first part of the training (in order of creation):

app/
  code/
    Mastering/
      SampleModule/
        registration.php
        Block/
          Hello.php
        Controller/
          Adminhtml/
            Index/
              Index.php
          Index/
            Index.php
        etc/
          module.xml
          adminhtml/
            routes.xml
          frontend/
            routes.xml
        Model/
          Item.php
          ResourceModel/
            Item.php
            Item/
              Collection.php
        Setup/
          InstallData.php
          InstallSchema.php
          UpgradeData.php
          UpgradeSchema.php
        view/
          frontend/
            layout/
              mastering_index_index.xml
            templates/
              hello.phtml

Can you believe this?? This many files and folders JUST to create a single page that spits out a tiny list of items! God help you if you didn't have training to know what any of this is for. Plus some files need to be capitalized or lower-case; everything is very specifically laid out.

Compare this to any of my own projects. If I had to accomplish the same thing, I would need 1, maybe 2, files at most to do anything similar. Here, my biggest non-work project to date is the new version of Lexiconga that I've been building:
https://github.com/Alamantus/Lexiconga/tree/master/src
If you had to walk through that code without knowing how it worked, you could actually do it if you understand the JavaScript used.

I don't understand how this happens to software projects. This is just an insane way to develop anything, and I can't comprehend how anyone could want this.