[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command Line Interface -- AP Transactions
- Subject: Re: Command Line Interface -- AP Transactions
- From: "Chris Travers" <..hidden..>
- Date: Fri, 22 Sep 2006 13:12:02 -0700
On 9/22/06, John Locke <..hidden..> wrote:
Chris Travers wrote:
This would break some applications I've currently written... that
doesn't sound that easy to access from languages like PHP.
I don't see why you couldn't continue to use the existing syntax. The
CLI I am talking about would be a standalone program.
It seems to me that whatever interface we build should be generic enough
to share semantics between the CLI and some sort of remote execution,
like XML-RPC. I'm currently building a number of Ajax web applications
that use REST semantics to pass similar numbers of arguments, and this
same code goes straight into the CLI interface. The current CLI syntax
seems fine to me, as long as it accepts these arguments either on the
command line or in a GET string or in the body of a POST.
The problem is that at the moment the logic and presentaiton are
pretty closely tied :-P You can continue to use the current model,
but it is basically automating a web application.
To be dreaming here, it would be great to offer a generic presentation
layer, which could return these values in a variety of formats:
* HTML, according to a customizable template
* key=value pairs, newline delimited
* XML, in some simple schema
* JSON, for consumption by other web applications
I've already done this a few times, but in PHP (Smarty is a great tool
for this kind of thing...). But if we can separate this out, LSMB can
provide a solid financial cornerstone of a larger customized ERP
system... and really get webbified to play nice with other "Web 2.0"
Just to be clear, this would be a separate script which would provide
a generic command-line interface to the main API. Not quite the same
thing as automating the web pages. Automating web pages won't go away
because it is trivial to continue to maintain, but we also need
something that other apps can use.
This would also allow you to create the arguments in a file for
repeated use. Once we have XML reports, you could even use it to
generate XML reports for processing elsewhere.