I've had some good success now getting a "quick and dirty" Demo app up
and running. I'm using the HTTP App server,
with a lot of xquery pages, as well as a "common" module. Not the
cleanest solution but was extremely quick to develop and experiment
with. But I know whats coming next ... If I'm lucky :)
The team (and I agree) that its not a good idea to mix presentation with
query logic. All my current pages generate HTML
intermixed with xquery code. While this works in this limited case I
dont think its a good long term direction in our environment.
Not only is the business logic bundled with presentation (and my
presentation HTML skills are not that great),
but the intended use cases will be heterogeneous. I'll need to
integrate the fundamental queries into existing App servers, as well as
standalone applications, as well as (likely) keep a pure ML HTTP/HTML
App server .
So what are good ways of architectecting a ML based backend to be able
to serve multiple front ends, including an ML App server ?
Here's what I'm thinking ... but not entirely sure its a good
architecture.
1) Write the core code as an XDBC based module.
a. For external uses use XCC to run the queries
b. for ML App server use "xdmp:invoke" to access the core modules
(can the App module "invoke" modules in XDBC world ?
c. An advantage here is I can use a debugger (Oxygen) to debug
XDBC based modules where I cannot debug App server (HTTP) modules
2) Put the core code in xquery modules. Make them accessable to
both App and XDBC based modules.
a. For XDBC use an inline query that 'imports' the module then
runs the function'
b. For ML App server use, simply import the module and use directly
3) Use the App server as a kind of HTTP ("Restful") type service
for both internal and external use.
a. for external use have it produce raw xml
b. for internal use use "Invoke" then wrap in HTML
c. Is this much different then #1 ? although I cant debug with
oxygen an App server based module
Any other suggestions ?
----------------------------------------
David A. Lee
Senior Principal Software Engineer
Epocrates, Inc.
[email protected] <mailto:[email protected]>
812-482-5224
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general