I’m suspicious of people who don’t enable commenting on their blog – that just makes it a book. But this gripe aside, I like what Joel Spolsky has to say about abstraction in modern programming. Well, it pushes one of my buttons; perhaps “like” has nothing to do with it.
Sadly the people I feel need to appreciate his point the most probably won’t get past the second paragraph. That point, or at least the one I took away from it, is best summarized by this quote:
“[…] as we have higher and higher level programming tools with better and better abstractions, becoming a proficient programmer is getting harder and harder.”
I just read this blog article by John Resig, the author of jQuery. The article in general is a criticism of various projects like my very own “JASPA” – A criticism of frameworks that attempt to bring JavaScript into the 21st century by abstracting it into a different language. Continue reading…
In my article about method closures I showed a way to neatly create a portable reference to an object method that doesn’t ‘forget’ the object it belongs to. I have since discovered an aggravating problem on – you’ll never guess – Internet Explorer!
I was further convinced this week that the world needs JASPA when my Flash developer colleague asked me about closures in JavaScript. He’s been knee-deep in AS3 for almost a year, so JavaScript must seem rather weak now.
Unlike JavaScript and AS2, AS3 supports method closures implicitly; so I made sure they were built into the JAS language. Such a thing is not native to JavaScript so the JASPA compiler automatically generates a call to helper function jaspa.closure whenever an object’s method is referenced.
If you’ve ever used Delegate.create in AS2, then you’ve encountered this issue. If you don’t see the problem, consider this example in JavaScript: Continue reading…
Explorer throws an unknown error when you set innerHTML
The bug seems to only occur for certain markup. I’m not 100% sure what the defining problem is, except that markup containing block elements like <div> and <p> seem to invoke the error. Anyway, this drove me up the wall recently so I thought I’d share the work around I came up with.
JASPA is a JavaScript cross-compiler written in PHP.
Write robust object-orientated applications in a strongly-typed language (modelled on AS3) and compile it into regular JavaScript to run in a web page, or any other environment that implements a JavaScript engine.
By popular request I have made my JavaScript minimizer and obfuscator available for download. The jsobf program strips JavaScript source code down to the minimum whitespace required to separate the tokens, and performs automatic semicolon insertion to completely irradiate the need for line breaks. It also offers some obfuscation by renaming identifiers. Continue reading…
This tool is based on a full JavaScript parser that is part of a much bigger plan. I won’t go into that just yet, but along the way I’m going to be releasing useful tools like this as they come about. It’s useful to have some short term goals to keep up morale and ensure that the framework is working well.