5,603,591 Members 35,753 Now Online
XDA Developers Android and Mobile Development Forum

Trident Sandbox : Sandbox Scripting IDE for Windows RT

Tip us?
 
nazoraios
Old
(Last edited by nazoraios; Yesterday at 03:06 AM.)
#1  
Junior Member - OP
Thanks Meter 8
Posts: 24
Join Date: Jun 2013
Default Trident Sandbox : Sandbox Scripting IDE for Windows RT



This is an effort to make the best out of what Microsoft gave us 'out of the box' with Windows RT as far as on-device scripting and coding.
It is an Internet Explorer based scripting IDE which lets you save programs consisting of HTML and JavaScript into a single .PRG file. Internet Explorer's rendering engine is called Trident (version 7 in IE11), and it is a sandboxed environment, so the 'sandboxing' is at the browser level.

I have about 40 sample programs which you can load by looking in the samples subdirectory. Your programs can do simple file I/O as well (save text files or serialize json objects as text files and load them later)... if you are running hosted or appcached version you can use localstorage and/or indexedDB as well.

Now Hosted on GitHub at :
https://github.com/obeliskos/TridentSandbox

(Updated to version 1.76)
- Cleaned up libraries folder, removed nicEdit and replaced with TinyMCE
- Fixed screen sizing issues within metro IE
- User Interface tweaks/cleanup/finishing.
- Editors now support code folding and offer horizontal as well as vertical split toggle. Folding icons are not visible in all themes so try changing theme if you do not see arrows to expand collapse functions. html tags, etc.
- File Save and Fullscreen should now work on other browsers.
- Added obelisk.js (isometric graphics) and buckets.js (data structures like binary search tree, set, queue, etc) libraries.
- Added shortcut hotkeys for Alt + 1/2/3 window modes (code only, split, output only)

There are two ways to install Trident Sandbox and both offer advantages over the other so you may want both:
(1) Run off Local Filesystem. For this method, you can just download the attached zip, then right click on it and choose properties and unblock it. Then extract it... when its done you can double click the TridentSandbox.htm file or drag and drop the .htm file onto your desktop Internet Explorer and then make it a favorite. Running off local filesystem you have the ability to make web requests to the internet to grab data.
(2) AppCache install. For this method you just visit this page : http://obeliskos.com/TridentSandbox . Wait until the AppCache status changes from 'Downloading' to 'Idle' and then the site will continue to run this 'cached' version indefinitely (even if you have no internet connectivity). Running using this method you cannot make internet request but you can use LocalStorage and IndexedDB... two very useful storage mechanisms.

Upgrading an AppCache version :
If you already have an AppCache for an older version of TridentSandbox, you can upgrade to the latest version using either of the following two methods. (1) go into internet options/settings/caches and databases and delete the old obeliskos.com entry, then revisit the site at link below. If you want to preserve the data you have stored in the TridentDB/IndexedDB, you can visit the site using the desktop Internet Explorer and it will show 'Downloading' and then 'Update Ready', then press F12. This brings up the developer's tools from which you go to the console and type applicationCache.swapCache() and then reload the page... you should be updated.

Additionally (for users of my AppCache site) : When using an appcache website while online it will check for updates by downloading the appcache.mf manifest file... if that file does not exist and the response code is something like file not found, then the appcache will be invalidated. So if you expect/want the appcache site to work even after I may have taken the site down (which I have no intention of doing anytime soon), then you might want to host block the site in your windows hosts file. I believe it would run forever in that mode with no online dependencies (or updates). If you see I have created a new update, you can unblock it to update. The version which is downloaded and run from local filesystem has no such dependencies so this does not apply to the zip download install.

There are also now a few keyboard shortcuts usable within editor controls :
Alt+Q : Toggle Markup Maximize
Alt+W : Toggle Script Maximize
Alt+R : Run Program
Alt+S : Save (File API)
Alt+I : Inspect highlighted object

Hosting your own TridentSandbox Server :
You don't need to do this since I offer my own webserver, but if you want to can can host TridentSandbox on your own website. If you just want to host the files on a server of your own and do not need appcache functionality, then edit the TridentSandbox.htm main page and find (near the beginning of the file) the HTML tag and remove the reference to appcache.mf. If you want to use appcache, then leave the html tag at its default. You might need to register mime types for .mf files (text/cache-manifest) and .prg files (application/json). The newly added Awesome Fonts library may also need mime types configured for a few fonts, you can either add these mime types or remove them from the appcache.mf file (and lose offline support for those). You should be able to use F12 on the desktop IE and monitor the Debugger window as it downloads the appcache and if it fails it will usually tell you the file it had trouble with.

Within TridentSandbox, there are Help pages which provide much better overall information.

TridentSandbox comes with some third party javascript libraries which are made available for you to use in your own scripts.... these include jQuery, jQuery-UI, alertify, jqPlot, jqGrid, fullcalendar, dynatree, highcharts, CryptoJS, Loki.JS (simple JSON object database), Metro.JS, Springy, FontAwesome, Pixi.js, EaselJS, Mathjs. It's structured into a file system hierarchy so you can add your own libraries (local filesystem version only) and register them with the main webpage if you want to extend the environment.

To install local filesystem version :
- Download TridentSandbox.zip to an area like your Documents or Downloads folder.
- IMPORTANT : If you are on Windows RT, Windows 8 or 8.1, right click on the downloaded zip file and choose properties... it may say the file came from the web and give you an option to unblock it... unblock it. Then extract it. If you already extracted it you can right click on the TridentSandbox.htm file choose properties and it will have same option to unblock it... so unblock it.
- Go into the newly extracted directory and run TridentSandbox.htm (it will run in either metro or desktop ie, but I prefer desktop ie, which in that case you might need to drag and drop the htm file onto desktop ie program to load (then bookmark).
- If it asks you to enable scripts, choose yes
- You can load samples which are located in the samples subfolder.
- You can save samples into that folder as well as anywhere else... like SkyDrive. Files manually loaded and saved can be located anywhere but assets referenced as urls within your programs need to be in folder hierarchy (at or below the Trident Sandbox web page you loaded).
Attached Files
File Type: zip TridentSandbox_1.76.zip - [Click for QR Code] (5.79 MB, 2 views)
The Following 3 Users Say Thank You to nazoraios For This Useful Post: [ Click to Expand ]
 
LolitaPlus
Old
#2  
Member
Thanks Meter 5
Posts: 44
Join Date: Oct 2013
Now something really interesting is coming...
 
nazoraios
Old
(Last edited by nazoraios; 15th March 2014 at 10:18 PM.)
#3  
Junior Member - OP
Thanks Meter 8
Posts: 24
Join Date: Jun 2013
deleted
 
nazoraios
Old
(Last edited by nazoraios; 15th March 2014 at 10:18 PM.)
#4  
Junior Member - OP
Thanks Meter 8
Posts: 24
Join Date: Jun 2013
deleted
 
nazoraios
Old
#5  
Junior Member - OP
Thanks Meter 8
Posts: 24
Join Date: Jun 2013
I updated to version 1.6 which you can either download or run from my hosted AppCache version. This appcache version will download all files to allow you to run offline. Running this appcache version will let you use local storage and indexeddb as well as some other options.

See first post for link to AppCache version or download attachment for local filesystem (or both).

Help system also covers this in detail.
 
nazoraios
Old
#6  
Junior Member - OP
Thanks Meter 8
Posts: 24
Join Date: Jun 2013
As far as on-device, in-browser scripting environment for Surface/Windows RT, I consider the latest 1.76 version to be 'Done'. I have opened up a github site where I will host future development at :
https://github.com/obeliskos/TridentSandbox

I will continue to run my AppCache site at http://obeliskos.com/TridentSandbox/ and keep it updated since that is the primary method of distribution still... but at github you can download ZIP of source tree (unblock zip if on Windows 8/8/1/RT), extract, and use the same way as the zip download hosted here.

If you want to contribute to development or make change request you can do that at the github site.

I'll still be around here waiting for announcements by netham
The Following User Says Thank You to nazoraios For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...