Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 15427 invoked by uid 500); 11 Dec 2002 00:31:35 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 15405 invoked from network); 11 Dec 2002 00:31:34 -0000 Message-ID: <3DF6870C.2030503@apache.org> Date: Wed, 11 Dec 2002 01:30:04 +0100 From: Nicola Ken Barozzi Reply-To: nicolaken@apache.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [Proposal] A little reworking of the Cocoon Command Line References: <3DF5E651.4708.14F5741F@localhost> In-Reply-To: <3DF5E651.4708.14F5741F@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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