Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
You can even use MarkLogic to enforce a schema. 2<br />
PROGRAMMABLE<br />
To interact with and program MarkLogic Server at the lowest level, you can choose<br />
between four W3C-standard programming languages: XQuery, XSLT, JavaScript, and<br />
SPARQL. XQuery is an XML-centric functional language designed to query, retrieve,<br />
and manipulate XML. XSLT is a style-sheet language that makes it easy to transform<br />
content during ingestion and output. JavaScript is a dynamic, object-based language<br />
that excels at working with JSON. SPARQL is a SQL-like query language for retrieving<br />
semantic data.<br />
MarkLogic lets you mix and match between the languages. XSLT can make in-process<br />
calls to XQuery and vice versa, JavaScript modules can import XQuery libraries and<br />
access the functions and variables as if they were JavaScript and built-in functions in<br />
XQuery and JavaScript let you execute SPARQL queries. MarkLogic also exposes a<br />
REST API and a SQL interface over ODBC.<br />
MarkLogic operates as a single process per host, and it opens various socket ports for<br />
external communication. When configuring new socket ports for your application to<br />
use, you can pick from a variety of protocols:<br />
HTTP and HTTPS Web Protocols<br />
MarkLogic natively speaks HTTP and HTTPS. Incoming web calls can run XQuery,<br />
XSLT, or JavaScript programs the same way other servers invoke PHP, JSP, or<br />
ASP.NET scripts. These scripts can accept incoming data, perform updates, and<br />
generate output. Using these scripts, you can write full web applications or RESTful<br />
web service endpoints, with no need for a front-end layer.<br />
XDBC Wire Protocol<br />
XDBC enables programmatic access to MarkLogic from other language contexts,<br />
similar to what JDBC and ODBC provide for relational databases. MarkLogic<br />
officially supports Java and .NET client libraries named XCC. There are open-source,<br />
community-developed libraries in other languages. XDBC and the XCC client libraries<br />
make it easy to integrate MarkLogic into an existing application stack.<br />
REST API<br />
MarkLogic exposes a set of core services as an HTTP-based REST API. Behind the<br />
scenes the REST services are written in XQuery and placed on an HTTP or HTTPS<br />
port, but they're provided out of the box so users of the REST API don't need to see<br />
2 See http://www.kellblog.com/2010/05/11/the-information-continuum-and-the-three-types-of-subtlysemi-structured-information/<br />
for a deeper discussion of why so much structured information is really semistructured<br />
information.<br />
9