On Tue, 2 May 2000, Autarch wrote:

> On Tue, 2 May 2000, Tobias Hoellrich wrote:
> 
> > for a future project I'm in the need to support two different ways how our
> > web based service can be accessed:
> > 1.) The traditional way: Handling user requests through a browser
> > 2.) The "headless" way: Handling under-the-hood requests which basically
> > perform the same service as in 1, but without ever generating valid HTML. 
> 
> I think that whay you want, contrary (and/or supplementary) to what some
> other people suggested, is to start by writing an API.  This API should do
> everything _but_ handle the interface.  This means it takes care of the
> database, business logic, report generation (in the form of data
> structures), etc.
> 
> Then you write two interfaces against the API.  One is an HTML based
> interface (which you could do with any of the wonderful perl embedding
> tools available.  My personal preference is Mason).  The other interface
> might be a set of command line executables (which can be run from cron) or
> an actually shell interface, or curses, or whatever.

Right - this is how my *mumble* commercial project works, sort of. It's
the old MVC methodology, if I'm not mistaken.

This is actually how the whole XML approach of Cocoon and AxKit works, if
you think about it. Your DTD is your API, your XML is one "record" or
instance of that data, and the stylesheet(s) are your views on the object.

At this time AxKit doesn't provide the kind of flexibility required to
deliver the sort of dynamic application that serves from databases or user
input using this kind of MVC system. But I'm working on it. Hopefully
others will soon too...

http://xml.sergeant.org/axkit/

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org

Reply via email to