The goal of javascript would be to actually call your wcf service to retrieve the data and write the html results to the screen. In the twitter example, many parameters are set inside the javascript object, which is used to control the configuration (background color, username, etc.). You can return json and then take values ββfrom json and connect them to the client side html template. If you want this to be used on other sites, I would probably avoid using jquery, since you cannot be sure that the user has enabled it, and therefore you will need to enable it. And then you have problems with the versions, if you are using an older version, and you want to use a newer version on the website that hosts your widget.
source share