Hi,
I've been noticing for while now that the generator allows obvious typos to
go through unchallenged, and even the "lint" job doesn't seem to do much. I
thought it was because of my setup (dots in the namespace break lint) but
doing some testing with a blank skeleton and I can't trap some pretty basic
errors.
In my test, I created a skeleton named "test" and added this class in
MyTest.js:
qx.Class.define("test.MyTest",
{
extend : qx.blah.Object, // parent class does not exist
mmembers: { // typo on the "members"
}
});
And in my Application.js:
var myTest = new test.MyTest();
myTest.methodThatDoesNotExist(); // No such method
These are three errors which should be easily catchable by the generator,
shouldn't they? At least in a "lint" job, if not during a "source" compile.
OK, I know that you get runtime errors pretty quickly for both the bad
"extend" and typo on "members", but a large app that has to connect via a
server backend has hundreds of requests to satisfy before the getting to the
first error; you fix it, refresh and wait again and get the second error.
Alt-Tab hell, and that's assuming your error pops up straight away and you
don't need to log in etc to get to the code to test.
Coming from a world of JIT compilers and IDEs that do constant builds in the
background to check your code and do code completion, it's another area
where aspects of JavaScript development are like stepping back into the dark
ages - Qooxdoo does a brilliant job of bring OO to JavaScript giving us back
the features (classes, inheritance, etc) that have been "de rigueur"
elsewhere for the last 15 or 20 years and it would be great to see this move
into the toolset too.
How about using the comment annotations to specify the arguments and return
types and check that values are returned or add type validations during
"source" builds?
John
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel