A Standalone Simulator
This week, one of my task is to determine whether the simulator can be implemented as a standalone simulator, and also able to be called by any HTML/witty application to use it. As suggested by my supervisor, there is an example of widget set in the witty example, which has similar concept on this. After analyzing and did some research on the widget set, I manage to implement the widget set to be a standalone application and also uses by other witty application.
The Web Worker Issue
The usage of web worker can actually import execution files. The usage of require() actually cannot fetch the code directly from Github as the MIME type of the file is plain text and will trigger an execution error.
The WResource of WidgetSet
Just like the web worker function, usage of WResource also calls from the host application server. Thanks to my colleague Sumia who give me an idea on how other witty application can call the WResource from other witty application. I figured out how to solve this WResource issue just be calling back the widget set server address using WClient.
Currently, I am developing a widget set that calls the Simulator function without the worker, and solving for the Json parsing to the Simulator using Witty API.