• Coding
  • [Javascript] Meeting material test

Up on my blog is a new post detailing my new forays into Javascript. I take up the task of learning Javascript from different perspectives, and this is but one (from an Actionscript/Javascript language comparison perspective, C#/Javascript, Client/Server use case, User Interface use case).
Please let me know if this kind of material would be of interest to you so that I may prepare it more to be presentable. So far, I am just trying to take the reader on the journey of my own learning experience as it moves forward.
Looks great. So was the train of thought during the development process in JS a direct one to one mapping to your actionscript flow? What was missing? What helped?
This is a very interesting topic, let me know how i can be of assistance in this, javascript for animation is great topic, other interesting topics to tackle too would be closures, object oriented javascript and cross browser techniques

now in your blog, you used setInterval to create animations, it would be great to highlight the differences, not so apparent ones ;), between it and setTimeout.. oops I guess i got ahead of myself

Many poeple won't appreciate the beauty of the topic until after they've been spanked err.. lectured about it
I guess we got ourselves the first presentation for our next meet-up :D
For some reason I cannot access your blog! :/
I actually replied here to your original post :), I will reply on your blog, but Javascript is interesting.

there are alot of libraries that make manipulation and events in javascript fast and easy. Jquery is of course the most famous and there are a lot of plugins (http://code.google.com/p/jloader/).

We can also discuss a lot of web apps that use jquery and build on it for mobile development (jqtouch.com).
Ok apparently the IP address of blogspot.com was blocked in my firewall, now I got it sorted out.

So anyway, that's really awesome. I am very interested in Javascript, but I never used anything other than jQuery (and the many plugins that make use of jQuery).

Why did you plain Javascript instead of jQuery or any other framework? Is it actually easier this way, or it more flexible?
Very interesting read, arithma.

I tried grepping through the jQuery source for setInterval() and setTimeout() and I noticed that they weren't present in the animate() function, but it does call the custom() function which prefers requestAnimationFrame() over setInterval(), but falls back to it if it's the former isn't available.
requestAnimationFrame = window.webkitRequestAnimationFrame ||
	                              window.mozRequestAnimationFrame ||
	                              window.oRequestAnimationFrame;
From the Mozilla Docs:
Tells the browser that you wish to perform an animation; this requests that the browser schedule a repaint of the window for the next animation frame.

You can use this method in two ways:

Specify a callback routine to be called when it's time to update your animation.
Firefox only: Don't specify a callback. In this case, Firefox will deliver a MozBeforePaint event before the repaint that occurs when it's time for your next animation frame, so you can update your animation. The timeStamp property of the event will be the animation sampling time.
I don't actually know any Javascript, but this stuff is awesome. I like the pretty little sinusoidal boxes. :)
saeidw wroteVery interesting read, arithma.

I tried grepping through the jQuery source for setInterval() and setTimeout() and I noticed that they weren't present in the animate() function, but it does call the custom() function which prefers requestAnimationFrame() over setInterval(), but falls back to it if it's the former isn't available.
requestAnimationFrame = window.webkitRequestAnimationFrame ||
	                              window.mozRequestAnimationFrame ||
	                              window.oRequestAnimationFrame;
From the Mozilla Docs:
Tells the browser that you wish to perform an animation; this requests that the browser schedule a repaint of the window for the next animation frame.

You can use this method in two ways:

Specify a callback routine to be called when it's time to update your animation.
Firefox only: Don't specify a callback. In this case, Firefox will deliver a MozBeforePaint event before the repaint that occurs when it's time for your next animation frame, so you can update your animation. The timeStamp property of the event will be the animation sampling time.
I don't actually know any Javascript, but this stuff is awesome. I like the pretty little sinusoidal boxes. :)
what source are you reading?
the latest jquery (1.5)
http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.js
only does setInterval, see my reply to arithma here:
http://mskafi.blogspot.com/2011/05/javascript-explorations.html?showComment=1305013660945#c2526348919506546182
ZeRaW wrotewhat source are you reading?
I was reading through this. It looks like a different version of what you were reading.

I actually went back and read your comment on the blog right after I made my post. You do make an interesting observation, though. I guess RequestAnimationFrame is something new, and traditional jQuery does in fact use setInterval().

It's interesting to know that the details of the animation queue, thanks for the explanation!