The following listing can help you find the documentation for the tools, frameworks and libraries in use.
The following dependecies are managed automatically if using Model Catalogue with Docker (except Discourse)
- Java 8
- Tomcat 8.x
- MySQL 5.6+
- ElasticSearch 2.0+ (additional notes)
- Discourse (optional for comments)
James: Vlad has implemented Docker so that we can run the catalogue in containers. The continuous integration setup makes a docker image out of our catalogue. However we (David and I) are not sure about Docker because it is still an experimental/immature technology. It sometimes does strange things on Windows. The containers are opaque to inspection.
Description of frontend structure by James:
Most of the front end is written in AngularJS. The thing is, Grails and Angular are both MVC frameworks in their own right, with their own dependency injection systems. So combining them is a bit of a nightmare. We use the Grails plugin, "Angular Asset Pipeline Plugin", its author Craig Burke describes an aspect of their combination: "By default the Asset Pipeline plugin will minify all the Javascript files in your project. This breaks the dependency injection used by AngularJS (which relies on specific parameter names)."
The javascripts are contained in grails-app/assets/javascripts. There are two folders in javascripts, templates and modelcatalogue. templates of course holds most of the templates, which are managed by the Angular Template Asset Pipeline Plugin. Each template must have a corresponding angular module. These are declared in modelcatalogue. Within templates we might have a file such as mc/core/forms/ui/infiniteTable.tpl.html; which when loaded into the Angular template cache would be referred to as mc/core/forms/ui/infiniteTable.html
All the templates in mc are required by mc/index, which in turn is required by modelcatalogue/modelcatalogue, which defines a javascript variable, also called modelcatalogue, which is attached to the window. modelcatalogue/modelcatalogue is called by the Grails index view, at grails-app/views/index.gsp. All of its modules are used for the metadataCurator Angular module, which is registered to the main body of the index page. It appears to me that most of the app is in effect a "single-page app", although I am not sure of the details of how Grails controllers invoke this view.
- NodeJS ecosystem (tested with version 0.10.x)
- NPM for managing tools dependencies
- Bower for managing frontend dependencies
- Karma Test Runner for running JavaScript tests
See package.json for information on versions
Apart from standard HTML + CSS + JS stack we use following languages in the frontend:
- CoffeeScript as alternative to JavaScript
- LESS as alternative to CSS
Polyfills grants access to features which might not be available in older browser
- ES5 and ES6 features covered by via core-js
- Blob via Blob.js
- Window.saveAs via FileSaver.js
- Bootstrap as the base CSS framework
- FontAwesome for application icons
- AngularJS as the base JavaScript framework
- jQuery is not used directly but as an base of other framework
- jQuery UI for dragging and resizable support
- Angular UI Bootstrap as a bridge between AngularJS and Bootstrap
- Angular UI Router for URL routing the application
- NG File Upload for uploading assets
- Angular Loading Bar for showing the network progress
- Angular Auth Interceptor for seamless authentication
- Angular File Saver for storing content to the client
- RxJS (ReactiveX) for event handling (waiting for wider adoption through codebase)
- Rx Angular as a bridge between AngularJS and RxJS
- STOMP over SockJS for server push notification
- SaxonCE for client side XSLT 2.0 transformations
- vkBeautify for formatiing generated XML on client side
See bower.json for information on versions
- Grails 2.5.x ecosystem
- Grails Asset Pipeline for handling the frontend resources
- Grails Spring Security Core 2.0 for securing the application
- Grails Spring Security Core UI for managing the application users
- Grails Database Migration (wrapper around Liquibase) for database migrations
- Grails Executor for executing asynchronous code (additional notes)
- Guava for in memory caching and immutable collections
- RxJava (ReactiveX) for easier event/stream based programming (waiting for wider adoption through codebase, currently used mostly with search indexing) (additional notes)
- Document Builder for MS Word exports
- Spreadsheet Builder for MS Excel exports
- OpenClinica Case Report Form Builder for OpenClinica forms export
- Owlapi for parsing OBO files
- ElasticSearch Java API for indexing and searching catalogue
- Spock for general unit testing
- Geb for browser based testing (additional notes)
See particular grails-app/config/BuildConfig.groovy
files in Grails plugins folders for information on versions