Web SDK: Released on npm to build new applications in Angular

Follow

The Cumulocity Web SDK is a key component which empowers IoT developers to develop web applications for the Cumulocity IoT platform. Therefore we are happy to announce the next version of the Web SDK, enabling developers to use next-generation JavaScript and Angular to build and deploy web applications.

The key features of the new Web SDK are:

  • Availability on npm repository: The npm repository is the standard package manager for JavaScript modules. The Cumulocity Web SDK packages are now publicly available on npm. This makes it very easy for web developers to consume the new Web SDK.
  • Angular 6+ support: The new Cumulocity Web SDK uses and supports Angular to develop applications on state-of-the-art technology.
  • Module bundling: Through Webpack (a commonly used bundler) developers are now able to pack and deploy applications. This is based on the ECMA Script 2016 `import` statement. This makes composing of applications a lot easier and more variable.
  • Isomorphic module: The @c8y/client enables the access to our API with node.js or any browser framework (e.g. Angular 2-6) and is therefore isomorphic. That allows developers to use it for frontend- as well as for backend-tasks.

Try it out

To try the new Web SDK, install the new c8ycli via:

$ npm install -g @c8y/cli

Create a new app by running:

$ c8ycli new myApp

Start the myApp by navigating to the newly created folder, install all modules and finally serve the web app:

$ cd myApp 
$ npm install
$ c8ycli serve

To get a deeper understanding of the full ecosystem we encourage you to look into the documentation.

 

Note: Related to the changes in bundling Javascript we already announced the removal of runtime plugins. We have collected some background information to describe the decision and the idea behind it.

Note: The Web SDK is currently in beta status and only useful for new applications based on Angular. We will soon release a story for developers to migrate their AngularJS plugins or widgets to also use the new SDK.

Have more questions? Submit a request

Comments