Skip to content

jenbreese/marklogic-samplestack

 
 

Repository files navigation

marklogic-samplestack

Samplestack is a comprehensive sample application that demonstrates how to build an effective MarkLogic application. Based on the idea of a "Question and Answer" website, Samplestack shows you how to integrate MarkLogic into a three-tier application architecture (browser, application server, and database).

README for Version 1.0.1

This release features a middle tier for the Java Enterprise Developer, implemented using Java, Spring, and Gradle.

The project includes the following major components:

  • MVC browser application implemented in Angular.js
  • Middle appserver tier implemented in Java/Spring
  • MarkLogic for the database tier
  • Gradle framework to drive build and configuration of the appserver and database tiers
  • Unit and end-to-end tests

A Node.js version of Samplestack that uses gulp automation will be coming soon.

This README covers the following topics:

Getting Started

To start, clone this repository. For example, run the following command:

git clone https://github.com/marklogic/marklogic-samplestack

Then, launch each of the tiers to get a feel for Samplestack's 3-tiered architecture (from the bottom-up):

  1. Database

This version of Samplestack is intended to run with MarkLogic 8.0

  1. Middle Tier - Application Server

You can choose to run/examine one of two middle tier application servers. Each of these will use the same MarkLogic backend configuration and the same MVC browser application.

  1. Browser Application

The browser application is delivered in two forms:

Additional Information

For more information, see the following:

Reference Architecture Introduction

Samplestack is an instantiation of MarkLogic’s Reference Architecture. It demonstrates how to structure three-tiered MarkLogic applications for production:

  • MarkLogic plays the role of database in Samplestack’s three-tier architecture. Samplestack shows how to configure MarkLogic to ingest, store, and manipulate documents. With the project comes tooling and configuration files to get MarkLogic primed to expose robust search and data services.

  • The middle tier brokers the data between the database and the browser-based web application, coordinates integration with additional services (LDAP), locally optimizes applicationdatabase communications, and enforces business rules. There will be two versions of Samplestack which you can explore based on your preference. One version features a Java middle tier with a Spring Framework and Gradle automation. There will also be a JavaScriptNode.js implementation with gulp automation.

  • The web-based front-end is a Model-View-Controller browser application which drives workflow using the business services exposed by the middle-tier and presents the user interface. It is implemented as an Angular.js application.

Application Overview

The sample application itself is centered around the idea of a Question and Answer site. It is a searchable, transactional, content-rich web application. Users of the application participate in the crowd-sourced knowledge community by asking questions, submitting answers, commenting, and voting. Search is a rich experience with interactive facets and parameters which enable users to narrow in on the answers they seek. The initial seed dataset is an extract of content from the popular Stack Overflow website. Their archives are made available under CC BY-SA and comprise the seed data for Samplestack.

Each of the features in Samplestack demonstrates an important concept for developers building on MarkLogic:

Samplestack Feature MarkLogic Concept
Full-text Search Indexes, query styles
User records and Question documents Data Model for POJOs and JSON.
Users and Roles (log in, log out) Security (authentication and authorization)
Restricted Content Role-based Permissions
Facets Search constraints, analytics
Ask, Answer, Comment Document updates
Voting Updates impact sorting
Accepted Answers and Reputation Transactional model, data integrity

Coming soon: Related tags — demonstration of semantics with the use of RDF triples and SPARQL.

Contributing

Please see our contributing guidelines.

Support

Samplestack is maintained by MarkLogic Engineering and distributed under the Apache 2.0 license. It is not designed for use in production. Everyone is encouraged to file bug reports, feature requests, and pull requests through GitHub. This input is critical and will be carefully considered, but we can’t promise a specific resolution or timeframe for any request. In addition, MarkLogic provides technical support for release tags of Samplestack to licensed customers under the terms outlined in the Support Handbook For more information or to sign up for support, visit help.marklogic.com.

License

Copyright © 2012-2015 MarkLogic

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

A sample implementation of the MarkLogic Reference Architecture

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 70.4%
  • Java 13.8%
  • CSS 10.1%
  • HTML 4.3%
  • Groovy 0.9%
  • Gherkin 0.3%
  • Shell 0.2%