Hi, I'm about to start implementing
#010534: Command Line Runner to install/save Database Schemes and would like to get your feedback on the following suggestions: commandline tools in eZComponents ================================= - scripts are executable, without suffix (.php) and start with ezc-COMPID-, where COMPID specifies the component they belong to. The COMPID can be a shortcut like dbschema for DatabaseSchema. The minus signs are borrowed from git, but we can also agree on dropping them. - The ConsoleTools/bin directory contains a script ezc-base-updatesymlinks, which creates symlinks from the scripts of all components into the ezc/Base/bin directory or in another directory. So the user can either put links in his /usr/bin or in ezc/Base/bin and needs to add only one directory to his PATH. The ezc-base-updatesymlinks script can be reused from client code to also link their scripts. Therefor the script accepts a parameter to provide the path to the bin directories of the client application. - The console component provides a library of option definitions, which can be reused by all components. Furthermore every component can have it's own library. If the component depends on another component (like PO and DbSchema on DB) then it may reuse the options library of that component. Example: The Db library provides the option dsn, which is useful for DbSchema and PO too. Applications build on top of ezc are free to reuse all option libraries. - ezcBase contains a console_bootstrap.php file, which builds up the console environment or fails if ConsoleTools is not installed. - More thoughts must be spend on how to automatically document scripts on the website and in man pages. Where to place scripts? ======================= There has been a thread on where to place scripts: http://thread.gmane.org/gmane.comp.web.ezcomponents.devel/2890 The options 1. --forget it -- 2. Make a scripts directory in the src dir of a component + script together with the component where it belongs - can add (optional) requirements to the component 3. Make a new scripts component for each component named ezcComponentNameScripts + Nice handling of requirements - Lots of components 1 2 3 + Alexandru Stanoi + Derick + Raymond Bosman + Sergiy Alyeksyeyev + Kore Nordmann + Tobias Schlitt (for scripts without external DEPS: 2) There was no final decission on this discussion. I propose a compromise: 1. All scripts depends on ConsoleTools 2. If the component itself depends on another component (like PO, DbSchema on DB), then the script may also depend on that component and may be placed inside the component. 3. For scripts, that depends on multiple components and where rule 2 not applies, make a separate component. 4. scripts should be placed in bin subdirs as it is unix standard. Even for components, which only contains scripts, this applies, to have consistency. -- Thomas Koch, Software Developer http://www.koch.ro Young Media Concepts GmbH Sonnenstr. 4 CH-8280 Kreuzlingen Switzerland Tel +41 (0)71 / 508 24 86 Fax +41 (0)71 / 560 53 89 Mobile +49 (0)170 / 753 89 16 Web www.ymc.ch -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components