At 10:05 30/3/01 +0200, Stefan Bodewig wrote: >Peter Donald <[EMAIL PROTECTED]> wrote: > >> At 09:25 30/3/01 +0200, Stefan Bodewig wrote: >>> >>>> - separation of task API and implementation (ie servlet spec vs >>>> tomcat) >>> >>>Don't we have this already - even in Ant 1? >> >> Not really ... the tasks directly access a lot of implementation >> details (ie Project object) or do all sorts of naughty things ... I >> just want to clean this up. > >Oh, OK, I see. Fine with me - all things tasks currently do with >project should not remain part of Project anyway IMHO, they belong >into the "logging aspect" or utility classes.
Where they end up should be largely invisible to the tasks. They could end up in CronServerEngine, Project, InstallEngine, ConfigEngine etc. All the tasks see is the TaskContext (see myrmidon proposal for a basic one). They get the logger from context and who ever implements the context get's to choose how it is implemented ;) > >>>> - separate task engine from project engine >>> >>>What are task engine and project engine here? >> >> task engine == an engine that executes tasks in a particular >> context. All the task engine sees is tasktype registries, datatype >> registries and input proxy task objects. >> >> project engine == the engine that executes targets, manipulates >> projects etc. It contains a reference to task engine and will call >> it to execute tasks. > >So this is the major point of "making the task engine reusable", >right? fairly major. >The separation looks artificial at first glance, executing a target >involves executing tasks and if I follow IOC, targets should execute >tasks (unless you want to make targets pure data holders without any >behavior). In my proposal I had targets as pure data holders and the project engine accessed it and interpreted em. However remember that the project and tasks are likely to be "real objects" which hold tasks proxy objects. They are separated due to SOC and they still live by IOC as it is the task engine that does all the calling into the Task. Cheers, Pete *-----------------------------------------------------* | "Faced with the choice between changing one's mind, | | and proving that there is no need to do so - almost | | everyone gets busy on the proof." | | - John Kenneth Galbraith | *-----------------------------------------------------*
