cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: [Proposal] A little reworking of the Cocoon Command Line
Date Wed, 11 Dec 2002 00:30:04 GMT

Upayavira wrote:
> Dear All,
> 
> I would like to do some minor rewriting of the command line Main class, particularly

> splitting it into classes:
> 
> 1. org.apache.cocoon.Main: this is the class that is accessed from the command line.
Its 
> functionality and command line options would remain the same. However, its 
> functionality would be provided by instantiating:
> 
> 2. org.apache.cocoon.ProgrammaticInterface (or some such name): this would be a 
> programmatic interface to running Cocoon. To start with, it would just give an Interface

> to the functionality currently provided within the Cocoon command line. So you could

> have code such as:
> 
>   ProgrammaticInterface cocoon = new ProgrammaticInterface();
>   cocoon.setFollowLinks(true);
>   cocoon.setLogLevel(DEBUG);
>   cocoon.process();
> 
> Once that simple split has been done, the second change I'd like to make is to create
an 
> FTPWritingEnvironment class, and allow the Programmatic Interface (and thus the 
> command line) to use this. This would allow the command line to generate content and

> then send that content by FTP up to a web server. I would code it to use checksums to

> prevent unnecessary uploading, thus maintaining a static synchronised version of a 
> Cocoon driven site on a server that does not directly support Cocoon.
> 
> This for me, being able to publish Cocoon based sites by FTP is a bit of a holy grail.
For 
> the personal projects I work on, all of which are now based upon Cocoon, I have to use

> cheap servers that cannot run Java, and thus cannot run Cocoon. Therefore, FTP is the

> only way.
> 
> Before I start doing anything, I would like to check my proposal out with those on this

> list.

Your ideas are very interesting.

I suggest you to look in the scratchpad for the "ant" proposal, that 
also does a refactoring of the CLI. Most of that code can do without 
Ant, and can be the base for your Programmatic Interface.

If you could combine that approach with yours, it would be awesome :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message