Design Studio 1.2 SDK – Rapid Prototyping Addon HTML/JS Templating
Since there was enough interest, here’s the source code available on GitHub.
EDIT: Updated link:
I have been having fun writing a few toy addons for Design Studio, but I wanted to see if I could write something a bit more useful. I am still learning the ins and outs of the Eclipse SDK, but one part of my workflow that I’ve noticed could be improved is the amount of time I spend in the Eclipse SDK to tweak a line of HTML or JS, and then hop back to re-launch Design Studio to see the results (or in my case a lot of times, unintended, self-inflicted bugs 🙂 )
In order to make these components not just hardcoded, statics fragments, I also created 10 placeholder parameters (See the properties panel). For each Placeholder, there is a corresponding Replacement. These placeholders and replacements can be maintained directly within the property panel, or even in the Script window:
In this example, I am setting some text as well as even some image sources at runtime. (silverMedal and bronzeMedal are global variable strings of type base-64).
A simple example of what this would look like at runtime by clicking this button is such:
This addon could also facilitate things like IFRAMEs, freeform HTML content, etc. All this without hopping back and forth between Design Studio SDK and Design Studio itself.
If there is some interest, I can supply the source files to this addon, however it appears that I will have to find somewhere on SCN that accepts a .ZIP file. Perhaps creating an SCN Document will allow for this.
At the end of the day, this frees me up to focus on the end-form of a potential addon, as well as rapidly create anything I can create in HTML5/CSS/JS within Design Studio before implementing a full blown SDK Addon.