15.07.2016 Views

MARKLOGIC SERVER

Inside-MarkLogic-Server

Inside-MarkLogic-Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MODULES AND DEPLOYMENT<br />

XQuery, XSLT, and JavaScript code files can reside either on the filesystem or inside<br />

a database. Putting code on a filesystem has the advantage of simplicity. You just place<br />

the code (as .xqy or .sjs scripts, or .xslt templates) under a filesystem directory and<br />

you're done. Putting code in a database, on the other hand, gives you some deployment<br />

conveniences. In a clustered environment, it's easier to make sure that every E-node is<br />

using the same codebase, because each file exists just once in the database and doesn't<br />

have to be replicated across E-nodes or hosted on a network filesystem. You also have<br />

the ability to roll out a big multi-file change as an atomic update. With a filesystem<br />

deployment, some requests might see the code update in a half-written state. Also, with<br />

a database, you can use MarkLogic's security rules to determine who can make updates,<br />

and you can expose (via WebDAV) remote secure access without a shell account.<br />

There's never a need for the programmer to explicitly compile XQuery, XSLT, or<br />

JavaScript code. MarkLogic does, however, maintain a "module cache" to optimize<br />

repeated execution of the same code.<br />

OUTPUT OPTIONS<br />

With MarkLogic, you can generate output in many different formats:<br />

• XML, of course. You can output one node or a series of nodes.<br />

• JSON, the JavaScript Object Notation format common in Ajax applications. It's<br />

easy to translate between XML and JSON. MarkLogic includes built-in translators.<br />

• HTML. You can output HTML as the XML-centric XHTML or as<br />

traditional HTML.<br />

• RSS and Atom. They're just XML formats.<br />

• PDF. There's an XML format named XSL-FO designed for generating PDFs.<br />

• Microsoft Office. Office files use XML as a native format beginning with Microsoft<br />

Office 2007. You can read and write the XML files directly, but to make the<br />

complex formats more approachable, we recommend you use MarkLogic's<br />

Office Toolkits.<br />

• Adobe InDesign and QuarkXPress. Like Microsoft Office, these publishing formats<br />

use native XML formats.<br />

59

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!