August 7th, 2005
As I said in an earlier post:
Whats needed now is way to automatically record events and make a test case skeleton out of it. That would allow for complete automatic browser based tests. How cool is that?
Well, it’s here now, and it’s cool, but still very, very alpha and Firefox only, but the basics are there:
http://script.aculo.us/playground/ghosttrain/test.html
So, what goes on here?
The aptly named Ghost Train script captures events the happen on the page as you click and type your way through. Then, a JavaScript is generated that makes use of simulated events, that is the Browser is told “look, there is a new mouse event” programmatically.
Be sure to have a look at the fleshed out test, where i’ve added some asserts to a script generated via the Ghost Train demo page.
August 5th, 2005
To help getting better documentation on script.aculo.us, I’ve put up a nice new wiki. Help me fill it!
August 4th, 2005
With support for the canvas element coming in Firefox 1.5, the two major alternatives to Internet Explorer (Firefox and Safari) will be one step ahead–of IE 7, that is. Some ideas are floating around how to add support for canvas to IE, however:
So here is the challenge: Write some Javascript that detects lack of support for canvas, and support for DirectAnimation. It then replaces the <canvas …/> element with an <object …/> element which invokes DirectAnimation. The Javascript will then have some wrappers that convert the <canvas …/> Javascript function into DirectAnimation calls.
Btw, the canvas element may also prove to be a great thing for Sparklines.
Be sure to wade through this presentation.
While waiting, read the docs and look at these demos (in Safari, or Firefox DP). Oh, and here’s mine.
August 2nd, 2005
As a follow up to the previous article: with the very latest SVN trunk of script.aculo.us having all sorts of nice unit testing thanks to efforts of Jon Tirsen (and some make-it-look-good additions from Michael Schuerig) a very nice framework for (more or less pragmatic) in-browser unit testing of JavaScript (and HTML!) has come in to place (it’s still to be considered quite alpha, but it basically works).
For some working examples on this fire up test/inplaceeditor_unit.html or test/test.html in Firefox (Safari/IE currently not supported, planned!) and watch the magic. Be sure to do a “view source” for the interesting part.
If you want to be a part of this and have suggestions on this (or patches…), please subscribe to the rails-spinoffs mailling list!
August 2nd, 2005
Besides releasing a two button mouse (whoa) today (so much for “Hell froze over”), there’s a mention of Ruby on Rails on Apple’s developer pages:
If you are considering using Ruby to write web-based applications, you won’t want to miss the Ruby on Rails project. Rails is an open source web programming framework that is rapidly gaining mindshare due to its simplicity and clean design.
August 1st, 2005
The next version(s) of Safari will include all sorts of updates, like:
- Improved Javascript performance: It already runs circles around Mozilla’s implementation, so the Gecko team will have to come up with something here
- Styleable form controls (I wanted this since the days of the Safari Beta. This also means that contenteditable will be supported better!)
- DOM/JavaScript patches (yeah)
- Various other stuff (please implement dispatchEvent!)
What’s also a good thing: There’ll soon be committers from outside Apple–this will definitely speed up development. Can’t wait… 🙂
July 28th, 2005
Yes, this is possible.
A proof of concept (currently Firefox only) is included with the test file for the new AJAX in-place editor
(coming in the next script.aculo.us version).
Excerpt from the test case:
new Test.Unit.Runner({
test_InPlaceEditor: function() { with(this) {
inPlaceEditor = new Ajax.InPlaceEditor($('tobeedited'),
'inplaceeditor_result.html');
Event.simulateEvent('tobeedited','mouseover');
assertEqual("rgb(238, 238, 238)",
Element.getStyle('tobeedited','background-color'));
Event.simulateEvent('tobeedited','mouseout');
assertEqual("transparent",
Element.getStyle('tobeedited','background-color'));
Event.simulateEvent('tobeedited','mouseover');
Event.simulateEvent('tobeedited','click');
assertHidden($('tobeedited'));
(...)
Kudos to Jon Tirsen to coming up with most of this!
What’s needed now is way to automatically record events and make a test case skeleton out of it. That would allow for complete automatic browser based tests. How cool is that?
July 26th, 2005
Loads of bugfixes and some very nice new features, here’s a quick demo page showing some of those.
July 22nd, 2005
Ok, so we had this idea to build a community site to tell the world: Hey look, there are people that care about each other! Let’s tell “the good news”, the small enjoyable moments of life. And get some goodwill going.
Said, done.
With two people (one of them a non-programmer) working one day on this, we did a concept, a design, complete programming with tests and live deployment for a forum/blog crossover type of application. About 3/4 of the day was spend on coming up with the concept and the design. The Implementation itself was silly easy.
The application features a database backend (compatible with MySQL and PostgreSQL), complete user management with email-based registration confirmation, password reset, RSS feeds for articles and comments, ajax-based article commenting, pagable article lists, some administration functions and so on and so forth.
Because of the nice and clean MVC architecture it will be trivial to add additional stuff to it, as we like.
Talk about RAD. Have I said that Rails is great?