Guinnesspig's Blog by tag 'Javascript' (16)
Well, just as I thought i was getting the hang of javascript, I read this article, and Raphael seems to have a little more knowledge that I do. he has a really good go at Google's Developers :p
Google Closure: How not to write JavaScript
At the Edge of the Web conference in Perth last week I got to catch up with Dmitry Baranovskiy, the creator of the Raphaël and gRaphaël JavaScript libraries. Perhaps the most important thing these libraries do is make sophisticated vector graphics possible in Internet Explorer, where JavaScript performance is relatively poor. Dmitry, therefore, has little patience for poorly-written JavaScript like the code he found in Google’s just-released Closure Library.
Having delivered a talk on how to write your own JavaScript library (detailed notes) at the conference, Dmitry shared his thoughts on the new library over breakfast the next morning. “Just what the world needs—another sucky JavaScript library,” he said. When I asked him what made it ‘sucky’, he elaborated. “It’s a JavaScript library written by Java developers who clearly don’t get JavaScript.”
For the rest of the day, to anyone who would listen, Dmitry cited example after example of the terrible code he had found when he went digging through Closure. His biggest fear, he told me, was that people would switch from truly excellent JavaScript libraries like jQuery to Closure on the strength of the Google name.
So i've been working on a client project, and a really awesome project I might add, I crossed a challenge yesterday which was to be overcome by using a carousel to display more information that there was space for :p (I'll blog the site when it's live, hecne the desciptionlessness)
So bearing mind timesframes and me not having enough time to write my own carousel in the alloted time, and the fact that we're already using protoype.js (v1.6.3 with IE8 compat) I thought let me try and find one... I came across Prototype : Carousel (http://code.google.com/p/prototype-carousel/)
It's written by a spanish Gent I think, but damn well written, and really nice to use, although I nearly tore my hair out cause there are certain scenarios that made it now work for me, but now it does :p
Ghkoookay! if ya'll need to use, go ahead and use.
I've been meaning to blog this since 1st september when the newest version of prototype was realeased, greater support for IE8 (thanks microsoft, for releasing something YET AGAIN, different, choppers)..
aaaaaannyyy ways, the release is pretty damn robust, seems they've written the new release in a slightly different way, added support for Chrome as well.
Once really cool thing that came out of this release was a new API documentation, which can be found at http://api.prototypejs.org
I'm very glad to see that my methods of validating are already tending towards what's been written in this articles, using objects and methods that are ALOMOST inline, a really great article if you're a nerd.
Once a bit player, JavaScript increasingly takes center stage. Its footprint—the space it takes up on our servers and in our development schedules—continues to grow. So how can we make our JavaScript more reusable and easier to maintain? Perhaps MVC will offer some clues.
While MVC is a familiar term to those in back-end application development—using frameworks such as Struts, Ruby on Rails, and CakePHP—MVC’s origin in user interface development lends itself to structuring client-side applications. Let’s examine what MVC is, see how we can use it to rework an example project, and consider some existing MVC frameworks.
I was reading this post last last night on modern modal windows in modern web design.
Thank back a while probably only about 4 or 5 years ago, and take a look at some of these modal windows and try image them in a good old fasioned "popup window"
It kind of seems like they never even existed, heh.
Now, I must admit this is a seriously fantastic little function that combine with a few other functions, is most handy to perform a loop through some elements and perform certain parts of code on each of them, I've found it terribly handy!
OK, it goes like this.
$A($$('.loop')).each(function( element, index ){
alert('element: '+element+' index: '+index);
})
So... I spose in plain english this would mean the following...
$A find whatever is in this function and group them into an array
$$ find all elements with the class Name of "loop"
.each loop though all the elements you've just found and send an alert.
Neat innit
As per my previous post, one of the plugins or libraries that I've come accross and thought to myself "why re-invent the wheel" is Nick Stakenburg's lightview viewer, it's a really jacked up version of lightview (which I am sure some are familiar with) I have bought a licence for this webiste (or all non commercial websites) and if it all works out well i'll certainly be purchasing it to use on some of our other work related projects.
Take a look and see for yourself, very powerfull app!
We've been doing some really nice Javascript work as of late, and as most of you know it's been using prototype.js and script.aculo.us a fantastic combination of framework and effects to create really lovely scripts.
I've found however that there are LOADS of people writing plugins to the framework and effects librarys, which, to be honest are REALLY well written and well thought out.
Looking forward to launching our new website, which will certainly make use of these libraries and frameworks, been cracking at it for the past few weeks, so hopefully it'll be soooon!! :)
Been using this new Couldo App this mornig, and I might say, it's pretty damn neat, and a gando superbo concept, virtual machine which looks and works like your computer, it also is accessible via your mobile phone (modern ones) you can syn files and folders on your machine, almost the same concept as microsofts windows live mesh except this is MUCH zootier, and seems to be working much quicker.
Lets not fool ourselves, it's still in BETA, but if this is BETA then we've got something cool to look forward to that's for sure!


