October 8, 2018 | Written by: Andrew Manby, Paul Withers, and John Jardin
Share this post:
Everything You Need to Know About Domino V10 and Node.js
Our webcast covered the essentials of what you can achieve using Domino for full-stack web and mobile development with the latest enterprise framework, Node.js. (For those of you who missed the live event, the replay is available here.)
- A microservices approach to the architecture of your new applications requires greater planning up front and coding for failure. However, microservices make refactoring and extensibility much less onerous as you evolve the solution you are building or extending.
- Swagger is the de facto approach for API documentation, online, on-prem, or in Docker.
- PATCH is best for updating documents but needs enabling on the Domino server.
- Node-RED is a powerful, browser-based tool for wiring together microservices to form flows with the ability to secure the admin console flexibly.
- Implementing Node-RED on-premises is a painless introduction to Node.js.
- As the demo video shows, web sockets allow real-time communication between the server and client-side browsers.
- Front-end Frameworks and IDEs
- There are a variety of front-end frameworks for building a user experience, such as AngularJS, Vue and React that work with Node.js at the back-end.
- The critical difference between these frameworks and XPages is that you need to manage session state persistence.
- For our demo we chose React with Redux for state management. React has a lot of strict rules that add code complexity, however the end result is more standardized.
- Visual Studio Code is a popular development IDE with a variety of extensions. However, there are many others such as Sublime and Atom.
- Agilit-e is a microservice profiling portal that assists developers with day-to-day operations and integrations.
- Kubernetes is a container orchestration platform that can be added to the mix to group and manage Docker containers for better DevOps.
- Istio can be injected as a sidecar proxy to containers to better manage and secure communication to and from the relevant container.
See our demos for how to leverage these key new features.
In the first video we show logging into the React app, authenticating against Domino, and creating a Todo. Although the server delivering the React app is in a U.S. data center and the Domino server is in the UK, you’ll see that the creation of a Todo is very quick.
In the second video we show Node-RED. This is again secure and authenticating against Domino — it’s Domino all the way down. Node-RED can create scheduled tasks. Here we’re calling a REST endpoint on Domino and note that the “updateUrl” points back to the Node-RED server. This allows us to chain jobs. Keep an eye on the application in the background when we run the job. You’ll see that it’s using web sockets to automatically update the browser from a backend process.
In the third video we show the extensibility by using Node-RED functions to create a Todo from Watson Workspace. This uses a Watson Assistant conversation flow to gather information and post the Todo to Domino. Note again how the application in the background is using web sockets to automatically update the browser. And this just re-used the same APIs created for the React app — so no additional effort on Domino!
Lastly, here are some invaluable resources, tutorials, and informational links for you to explore:
Be on the look-out for information on our application development strategy along with a technical 101 training webcast. And, if you haven’t already, sign up for our Domino newsletter to get the latest, best news.