GithubHelp home page GithubHelp logo

t1seungy / hands-on-rest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marklogicuniversity/hands-on-rest

0.0 1.0 0.0 195 KB

Exercises for learning the MarkLogic REST Client API

License: Apache License 2.0

JavaScript 96.94% XQuery 3.06%

hands-on-rest's Introduction

Hands-on REST: Working with MarkLogic's REST Client API

This project is used for hands-on sessions, guided by someone who is familiar with the MarkLogic REST API. The goal is that, after going through the exercises, a developer will be comfortable using the API to interact with MarkLogic.

Knowledge of JavaScript is assumed.

Introduction

MarkLogic is a document- and triple-store database. One of the features in MarkLogic 8 is a REST API. The exercises presented here will give you a taste of how the REST API works. Note that it is intended to get you started and show the power of the API, but it is not a full replacement for MarkLogic University's class on the subject.

Setup

  1. Download and Install MarkLogic 8.

  2. Clone the Geophoto repository.

  3. cd to a directory where you want to project to be

  4. git clone https://github.com/marklogic/Geophoto

  5. Follow Geophoto's setup instructions, including data import.

  6. In the hands-on-node directory, run npm install.

Geophoto

This session is based on the Geophoto application. Once you've cloned and set up the application and imported the data, start the application (see Geophoto's README for instructions).

See MarkLogic University's Using Node.js: The Geophoto App On Demand video for an overview of the Geophoto application.

Features

Things to note in the Geophoto application:

  • map view
    • click a marker
    • edit the image metadata
    • see the semantic info
  • geo search
    • circle search
    • MarkLogic also supports arbitrary polygons

Data Model

The database holds three types of data: binary images, metadata to describe them, and triples to provide context.

Execution

Trace the steps of editing the title of an image.

  • views/partials/edit.jade
  • public/js/editor/photoeditor.controller.js (updateTitle)
  • public/js/data/photofactory.js (update)
  • POST /api/image/update/:id/:update
  • routes.js: update -> apiupdate -> updateDocument (read, edit, write)

Additional Resources

hands-on-rest's People

Contributors

dmcassel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.