Demo Catalog

Author: Dave Cassel  |  Category: Software Development

I’ve begun working on a Demo Catalog application recently that has a few purposes. My immediate purpose is to make our demos easier for our sales engineers to describe, find, comment on, and file bugs and RFEs against. If others find the app helpful as it develops, that’s great. But this project is also going to be my test-bed for some tech tools.

AngularJS

My team has been using AngularJS for a few months now, and a few projects in we’re really enjoying it. It takes a little time to ramp up, but then we’ve found we like the structure that AngularJS gives us. I’m starting to see re-usable pieces emerge and I expect to see more of that from this and other upcoming projects. We’ll be putting together directives and services that we often need while building MarkLogic demos.

MLJS

Speaking of Angular services, the architecture for this app involves talking to the MarkLogic REST API. I started down the path of making a brand new service to wrap the API, but I stopped and decided to see how far I could get with the MLJS Core libraries. I’ve been meaning to poke at MLJS for a long time.

I did run into a problem where MLJS’ pub/sub model didn’t really click with the promise approach that I’ve seen so much of in AngularJS, but Adam “Indefatigable” Fowler quickly put up an initial version of the MLJS Core that allows the use of promises instead (it’s not complete, but enough to proceed). Quickly, by the way, meant we chatted around 10:30 pm his time, and he sent me an email around 9:30 am the next day telling me I could check out the initial version. Awesome!

JSON

For all apps where I’m using JavaScript to talk to the REST API, I’ve used JSON for calls to /v1/search and other endpoints where it’s supported — although our documents are typically stored in XML, JSON’s a lot easier to work with on the client side.

What I haven’t really tried before is using JSON as the storage format for documents, but I’m trying that out here. I’m not looking to jump into the debate about JSON vs. XML — I like some aspects of each. Rather, I’m going to use this project as a test-bed for exploring the ability to store JSON in MarkLogic. It’s a feature we support, so I want to see how it works and whether I run into any limitations.

And some others…

I’m using the Roxy Deployer, which will come as no surprise to regular readers on this blog. I used Paxton Hare’s Yeoman MarkLogic generator to get the project started. I’m using Twitter Bootstrap for the layout, Karma and Jasmine for unit testing, and Grunt for a variety of tasks.

If you’d like to follow along, contribute, or set me straight as I figure things out, take a look at Demo Cat.

Tags: , , , ,

Leave a Reply