What is in BladeRunner?
This topic gives you an introduction to the major components of BladeRunner which are shown below. To understand the structure and conventions used in BladeRunner, see "Application Structure".
BladeRunner Components
BladeRunner consists of seven major components:
Bundlers
Whenever an app (or part of an app) is run during development, bundlers read all necessary code from the app project stored on disk. They perform a recursive dependency analysis, gathering all the assets that the app requires (HTML, JavaScript, XML, CSS, and i18n tokens) from different blades and libraries. For each asset type a specific bundler assembles a single "bundle" file. This makes development easier, because the code for all components can be managed separately, and automatically gathered together at runtime. For the production version of an app, permanent bundles file are created, enhancing performance. For bundlers to work, your code has to comply with BladeRunner’s structure and conventions, which are enforced when the bundlers are executed. Find out more about bundlers…
Embedded Jetty Server
This is a standard J2EE servlet container that is started by the BladeRunner Java application, and which then listens for incoming HTTP requests. It runs on a developer’s machine, and provides access to all apps managed by BladeRunner. Your browser makes requests for your app’s index page or workbench. These requests are first processed by a set of Java filters and servlets, which in turn call the bundlers that assemble the required code assets from your app, ready for return to the browser.
It is expected that each developer will run a single instance of the server on their local machine; it’s not designed for remote access by multiple users. |
BladeRunner Libraries
The HTML5 and JavaScript libraries provide most of the underlying code needed to write apps. They include:
-
Low-level utilities and services: a light-weight class-loading and inheritance system, low-level browser utilities.
-
A service architecture and event-messaging using a publish/subscribe model.
-
Presenter, an MVC library for building rich user interfaces, where HTML templates are enhanced by binding elements to JavaScript properties.
-
An internationalisation library that allows you to produce localised versions of your app simply by listing translations in properties files.
-
A workbench library, so you can run blades in a standalone web-page, make quick modifications and see the effects by refreshing your browser.
Other HTML5 Libraries
Caplin also supplies a set of other HTML5 libraries that are typically required for building web trading apps, and can be purchased separately.
Integration Tasks
The integration tasks perform common development operations. You can either run them from a command line, or add them to your continuous integration system. The "export" task for example, helps you to deploy your app, generating a war file that can be deployed to any J2EE Servlet container, bundling all assets and configuring necessary servlets. Other tasks allow you to run Verifier tests, create apps and blades, or import blades from other apps.
Verifier Test Framework
Verifier is an integrated framework for unit and acceptance testing of apps. It’s included with BladeRunner, although you can use a different testing framework if you prefer. It uses Google’s js-test-driver to execute unit tests, but we’ve extended js-test-driver to understand and use our bundlers, so it automatically includes any dependencies of the code you’re testing, which makes life a bit easier.
Verifier’s acceptance tests are written in a Given-When-Then syntax, which it provides by extending the Jasmine library. This means you can write understandable tests that clearly specify the functionality they’re testing. Find out more about Verifier…
Dashboard
The Dashboard is a browser-based GUI, that allows you to explore your BladeRunner apps. It lets you create apps, aspects, bladesets and blades, as well as allowing you to perform other tasks such as importing functionality from one app to another. If you prefer, you can also carry out these tasks from a command line.
The Dashboard also provides access to other Caplin collateral, such as release notes and supporting documentation, including API reference material.