Guite / MostGenerator

Transformation cartridges for generating Symfony bundles from ModuleStudio models.
https://modulestudio.de
23 stars 2 forks source link

Extended abilities to import and export data #1224

Open ThiloWitt opened 5 years ago

ThiloWitt commented 5 years ago
Q A
ModuleStudio Version [1.4.0]
Operating System [Windows]
Zikula Target in Model [ZK20]
Zikula Version [2.x-git]
PHP Version [7.2.x]

Summary

When importing existing document collections through database tools like phpMyAdmin, no Create log entries are inserted in the Log table. A native import function shall be able to do this.

Desired Behavior

A tab in the module's Admin backend view shall show the option to import document collections via csv and other file types. While importing them, the module shall produce Create entries in the Log table.

Guite commented 4 years ago

I see this feature in a more general sense than just Loggable.

Here are a few considerations:

  1. import options are generally and often interesting.
  2. but they can be very versatile (different input formats, etc.) and must also cover extended requirements, like handling large amounts of data (chunk size, batch processing, etc.)
  3. this is also a topic for which there are certainly already cool solutions in the Symfony ecosystem. So we don't have to reinvent the wheels here and generate import scripts for CSV, XML, etc. etc. for all kinds of entities.
  4. if you are looking at generic import options, exports should also be rethought and adjusted in the same step.

How could that look like:

  1. In ModuleStudio there could be a few check marks like "generateImportAbilities", "generateExportAbilities" or selections like "importFormats", "exportFormats" or something like that.
  2. The generator creates a dependency in 'composer.json' to include the desired component.
  3. It also creates adapter classes utilising this component.
  4. It also generates a CLI command to start the import/export jobs from the console.

Interesting links: