Hello everybody, You are suggesting a component that would tie all other components in? With ConsoleTools, sounds like a usefull bit of a framework ...
In that case, CLI scripts should respect the same architecture, therefore factorization is possible and it is probably a good idea to talk about it now, particularely if you count all the testing that has to be done, Maybe we should have one CLI tool, allowing to run different tasks of different categories with arguments. Tasks could be objects implementing a task interface, which would provide all that is needed (arguments, input, output, action ...). This might allow, in an efficient way, to actually improve ConsoleTools, letting the user to program his tasks and not bother about the UI. This enhancement could also allow making profile objects (again, by implementing a profile interface), which would contain default values. For example, you probably don't need to use several db schemas for most projects, its path and format could be in a profile, making these options *not* mandatory. Thomas Koch wrote: > 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. With UnitTest, i don't mind having not having shortcuts to components because i use a bash shell that has tab-completion. > - 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. This concept of inheritance convincts me. > - More thoughts must be spend on how to automatically > document scripts on the website and in man pages. Good point, for "Task" interfaces ;) > > 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 On the other hand, each component could ship their own tasks. Regards, James. -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
