When Lewis and Clark ventured into the wilds of the West, they needed their guide Sacagawea. It was Sacagawea who knew the terrain and could translate the languages spoken there. This seed project is your guide for your first adventures with Finsemble.
Even experienced developers have run into difficulty fully realizing the capabilities of Finsemble because they skipped over the steps highlighted by the seed project. Starting with the seed project is the best tool you have to get up to speed on what Finsemble does and how it can work for your company.
This tutorial will take you through the process of building an application using the Finsemble seed project as a starting point.
Things to know:
What is the seed project?
The seed project is a very basic application built with the Finsemble framework. It includes examples to run, modify, and cut and paste from. The seed project also serves as a valid template for building your own Finsemble application.
The seed project contains a build environment that the dev team at ChartIQ utilizes. All Finsemble dependencies (including OpenFin) are downloaded, installed, and configured by the build environment.
How is Finsemble packaged?
- The seed project imports (i.e., "requires") the Finsemble runtime (as an NPM module).
- When starting your application, the Finsemble runtime (a set of microservices) is started. The runtime loads the seed project's config (a JSON file which contains component locations and settings).
- Once started, the seed project and the runtime function as a unified application (communicating through Finsemble APIs).
Things to do:
Installing the Finsemble framework
In order to install the Finsemble framework, you will need access to our private NPM repository. If you would like access to our private NPM repository, please schedule a demonstration by emailing email@example.com. We'll get started down the right path.
The seed project can be cloned from the Finsemble Seed Project Repo.
If you're unfamiliar with Git or GitHub, see this Introduction to GitHub.
Note: We recommend using Bash for Windows instead of the standard Windows command line. Bash is a little better than the Windows command line (particularly on Windows 7). Bash is included in GitHub for Windows. A standalone version can also be downloaded here.
Once you have access to the private repository, open a command prompt or Bash and change to the directory in which you have cloned this repository. Then run:
> npm login
You will be prompted for the username and password.
> npm install
The Finsemble framework and other dependencies will now install. Note that this installs the framework into the node-modules/@chartiq directory of your seed project.
> npm install -g @chartiq/finsemble-cli
This installs the command line interface (CLI). The CLI provides convenience tools for common tasks such as adding and removing components, clients, and microservices.
Building the seed project
Once you've installed the seed, you can build and launch the application.
To build and run the sample application:
> npm run dev
This starts up the dev runner which is responsible for building, watching, and launching your application. The first time you run this command, Finsemble will download required assets. These assets include the OpenFin runtime environment. It may take some time for this to download.
By default, the seed's application launches with one window showing a documentation page.
The seed project also supports Hot Reload, which can be configured to dynamically reload rebuilt components to speed up the development cycle.
Stopping the application
Press CTRL+C after running
npm run dev at your seed's command prompt (e.g., Bash shell) to quit Finsemble. Alternatively, once you have installed the toolbar, you can quit via the File Menu by clicking on the Finsemble icon in the toolbar and selecting "Quit."
During development, if you encounter a hung node or OpenFin process (which can prevent a Finsemble restart), those can be fixed using:
The seed project in ten steps
Now that you have the Finsemble framework, you're ready to start the seed project. Proceed to Step 1: Adding Components.