I’ve been slowly (oh so sloooowwwwly) working on MLJS since my last release in April. Going to try to do smaller, more frequent releases in future.
Done some cool stuff for demos and my other pre-sales colleagues in MarkLogic – all based on real world customer requirements.
These changes will be available in the July release of MLJS in the coming weeks… I’ve saved the best til last below…
All widget improvements can be viewed on the MLJS Gallery.
Improved semantic widgets
The graph explorer widget now supports browsing through ANY RDF type – not just the ones you tell it about! I’ve also fixed the linking issues between subjects that have already been drawn.
Added built in support for some OpenCalais RDF types to enable quicker enrichment demos. Most visible in the sparqlbar visual query widget.
SparqlBar has had some bug fixes for adding/removing/changing query terms
Most interestingly – I’ve re-jigged the entity facts widget which renders all known information about a Subject – this can now act as an InfoBox. So when you do a content search, the first (or selected) search result causes the InfoBox to show all facts about all subjects mentioned in the shown Document. This is accomplished using the Document Ontology idea I’ve written about before.
The semanticcontext and tripleconfig objects have been re-worked to support the above. In particular with advanced caching to reduce the number of SPARQL requests (in one example from 32 to 3!), and cache triples loaded since the last page load – great for exploration pages. All widgets built on the semanticcontext can take full advantage of the cache (or force a refresh if needed).
Document creation and Editing
I’ve been asked about this for ages but never had a reason to do it. I’ve had a ‘create‘ widget in the widget-docbuilder.js file for at least 14 months – but it’s been limited to file upload and read/write permission setting.
I’m now working on adding creation and editing via a form of a full XML or JSON document, with templating support. I’ll also support multiple instances of elements in the form. This will NOT be a replacement for XForms – just a quick doc editing widget as an example of what can be done on MarkLogic.
In future this may support the PROV-O ontology to track change to documents… shout if you want to see that feature soon!
BootStrap CSS and GlyphIcons throughout
I’ve been using Bootstrap CSS for a while but only as a shell – I’ve now re-worked EVERY widget (and have the hair line to prove it!) to use Bootstrap CSS styling, and glyphicons. This has vastly improved the look and feel of MLJS.
This also means you can generate your own web site’s theme in Bootstrap and just drop in a CSS file to re-theme everything in MLJS!
Node.js Bower support
MLJS is not just about the browser – there’s strong Node.js integration.
Paul Hoehne in MarkLogic Consulting had a personal MBO last month (our consultants do 1 thing per quarter to help the wider MarkLogic community) to add Bower support to MLJS! You can now generate an MLJS app using Bower to pull in dependencies.
Node.js rest app server and MarkLogic REST API proxy
Another node.js improvement is that I’ve extracted some old code for a situational awareness app that created an app server in Node.js for your MarkLogic HTML+JS REST app so it runs fast from the file system rather than within the MarkLogic database. Makes pages load like lightning!
Another benefit is this mljs-webserver code proxies the REST API – so ZERO code changes are required in your MarkLogic REST app!
This app server also fully supports websockets. This allows alerts in MarkLogic to travel all the way to the browser instantly for the first time. More on that in the next Visualisations release details later in this blog entry!
Checkout the js files and shell scripts with ‘webserver’ in the name in the root of the GitHub Repo.
I’ve been continuing to work on my drag/drop page editing widget. All production quality widgets are now supported in here – and you can create new pages from scratch, edit context configuration, and much much more. Makes creating an MLJS page as simple as writing some JSON…
Workplace pre-built application
For those like me who want it even EASIER to create great web apps – there’s soon to be a Workplace web application. The first page shown below.
What this will mean is you can deploy this standard app on top of your existing MarkLogic database.
Straight away you’ll create a new page – which automatically shows up in the app’s navigation – using the Workplace widget to drag/drop widgets in any way you like.
Within minutes you can create a full demo – showing geospatial search on one page, semantic exploration and query on another, or document editing even on another!
I’m really *REALLY* excited about this. Mainly because it makes my demo builds even quicker at work (hours to minutes, down from days without MLJS), and because it allows non-developers to use MarkLogic.
Organisations will be able to plug in their own widgets to MLJS to extend this without talking to me – should create a vibrant widget creation community.
What for the next release?
The next Release in Aug/Sep has a theme of Visualisations. Expect to see changes like the following:-
- More chart types in the HighCharts graphing widgets
- Multiple data series in charts
- More drag/drop between widgets
- OGC WMS/tile caching for maps using OpenLayers and a special MarkLogic caching layer
- More semantic visualisations – including force directed graphs with nodes whose colour, size, link size, and position changes based on values against the Subject
- Interactive advanced content search visual query builder
- Saved searches and Alerts within the browser
- Better tabular display support via Kratu widget, including information extraction, collation, and download
Some stretch goals I may get time for:-
- Situational Awareness app – rework a 2 year old demo in to MLJS to use alerting to show position updates of items on screen, and use a map as the primary user interface – including map overlays
- W3C CORS support in Workplace – allowing you to embed any workplace page or widget inside any external (E.g. Java or .NET) web application – great for dashboard pages!
Lots and lots to do – if there’s anything you’d really really like to see, drop me an email at adam dot fowler at marklogic dot com.