cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Integrating AngularJS with ThingWorx

No ratings

Hello,

There have been some inquires about how can one use AngularJS for developing custom parts that can run in the ThingWorx environment. To address these inquires I have created a document that describes the process of integrating AngularJS with ThingWorx.

The document attached comes with the source code for the examples presented throughout the document and an extension for AngularJS 1.5.8 and angular-material components.


Feedback is appreciated.

Thank you.

Comments

Hi Andrei,

Don't you think that would be a better a approach to build a AngularJS Library for connecting to ThingWorx Services instead, and build everything in AngujarJS environment, Composer Mashups are already bloated with a lot of JS to also include AngularJS + Angular Widgets.

Carles.

Hello Carles,

The approach you are proposing is good, but the main reason for creating a way to use AngularJS directly in the Composer is that we cannot provide support for every custom solution built outside of the Composer environment.

Regards,
Valeanu Andrei

Hey Carles,

In addition to Andrei I want to provide a little more context about why we structured the document like this.

Our typical expectation is that from whatever front-end technology a customer is using, he is capable of doing HTTP REST calls.

So, from this PoV, I would expect also that any AngularJS developer knows to do these calls.

The reason of embedding the AngularJS in composer is to take advantage of all the Mashup Builder goodies - drag and drop, quick save and deploy and so on - basically to use the same familiar ThingWorx environment.

At the end of the day this is the beauty of the platform. You can greatly extend it to match your requirements, while it also allows you to only use parts of it if you want it.

BR,

Vladimir

Hey Vladimir,

Yes I know that anyone with Javascript skills can call a REST API, but a Helper SDK will be better and make things easier, you already did for Android, iOS, .Net,... Why not a Javascript SDK ? Will help a lot on building things out of ThingWorx Foundation, and we can bring a lot of external developers on our teams.

Maybe we should not focus on AngularJS instead a more generic Javascript SDK, that will be a killer feature to build responsive webs out of ThingWorx foundation, mobile Apps with HTML5,...

Carles.

Hi Carles,

This guide was actually driven by market requirements, as there are companies who have extensive AngularJS knowledge, and we wanted to provide an integration example for that technology.

Regarding the browser-side Javascript SDK can you please ping me on private to understand what advantages would it bring compared to a classic Rest call (speaking about front-end only)? Also take into consideration that all the SDKs' built in other languages are only for Edge device to server connectivity, they are not supposed to be used for frontends.

BR,

Vladimir

You are right, actual SDK are for EDGE devices not for Front End.

I'm asking for it becouse it's a normal feature that platforms provide to easily build web apps on top of REST API, some samples:

Hi, Its an interesting topic. Will it support in all platform like IOS.

 

Regards,

Manirajan.V

Version history
Last update:
‎Dec 22, 2016 06:33 AM
Updated by:
Labels (2)
Attachments