Simple line graph demo code.
Wednesday, 5 March 2014
Sunday, 17 February 2013
JavaScript: debugging with embedded Rhino in Eclipse
The Eclipse JavaScript Development Tools allow step-through-debugging of JavaScript files using a provided Rhino instance. The Wiki describes how to utilise Eclipse plugins to connect your own embedded Rhino context to Eclipse.
Versions: Java 7; Rhino 1.7R4; Eclipse Juno (4.2) SR1 (Eclipse IDE for Java EE Developers).
Sunday, 10 February 2013
JavaScript: debugging with embedded Rhino
Mozilla's Rhino engine includes a step-through debugger. It is relatively easy to embed this in your own Java application.
Versions: Rhino 1.7R4 on Java 7.
Wednesday, 23 January 2013
Dojo: bootstrapping in an embedded Rhino context
Dojo supports Mozilla's Rhino engine for things like headless DOH tests and builds. This post demonstrates how to bootstrap Dojo using an embedded context.
This information pertains to Dojo 1.7.2, Rhino 1.7R2 and Java 6. Knowledge of JavaScript, Dojo and Java is assumed.
Friday, 18 January 2013
JavaScript: AMD module dependency analysis with the Java Rhino engine
The Asynchronous Module Definition (AMD) API provides powerful modularization options to JavaScript developers. But this introduces its own problems when it comes to dependency management. As this post demonstrates, Mozilla's Rhino engine offers developers a means to analyze these dependencies.
Saturday, 26 May 2012
Dojo: adding your own loader plugins
define(["dojo/text!./path/some.txt"], function(textData) {
Dojo's AMD loader has some useful contextual loading features.
Note the exclamation mark in the dependency.
dojo/text!
can be used to load character data;
dojo/has!
can be used to load different modules based on
environment.
Writing your own plugin is relatively trivial.
Saturday, 7 April 2012
Dojo: mocking dependencies with DOH
This post demonstrates a way to use the Dojo 1.7 AMD loader to provide mock/stub/fake/dummy artefacts in place of the defined dependencies.
Wednesday, 4 April 2012
Dojo: version 1.7 and the AMD loader
Along with a few other JavaScript libraries, Dojo is making the transition to the Asynchronous Module Definition (AMD) API. This post presents a few minimal files written to make use of it.
Friday, 24 December 2010
JavaScript: validating UTF-8 string lengths in the browser
Let's take a JavaScript string: "€100"
. This
is going to be sent from a browser input box and stored in a web
server's database. The database is using the UTF-8 encoding and the
constraint on the column is CHAR(4)
. Spot the problem?