Skip to main content

Posts

Showing posts with the label Javascript

The wierd yet awesome world of Javascript!!

Hey, Back, again!! This time we will talk about some weird things which only happen in JavaScript. When I say weird, it means that if you come from a C++ or PHP or JAVA background it will be hard for you to digest that many concepts that we learned for those languages, and then think will apply in all the majority of programming languages out there, don't anymore apply here in JavaScript. A very classical and highly cited example is Objects and Inheritance without Classes, well I never imagined this could be done, but JavaScript does it, that too elegantly. Probably you are already aware that for Class JavaScript uses function(){} and not the conventional OOP Class. Well actually it uses or rather can use function for multiple other uses as well. Lets go through some of the amazing features of JavaScript. Loosely Typed Try this for a function in your browser console - If you look carefully here, func is a variable(in the way it is defined) which is used as a func

UnderscoreJS, a must include library on your single page app, well, otherwise also

Another Javascript library.....Argh!!!!! Please!!! I know guys, that you all have already come across scores of JavaScript libraries by now, but this one, my friends, is the one which you were missing while doing complex calculations and data processing. UnderscoreJS might seem as yet another JavaScript framework, which you might not be interested in learning, when jQuery is almost catering to all your JS needs. However, you might be mistaken here, as frameworks like jQuery/mootools/ExtJs/Ember/Backbone/Angular......are meant to action on the front-end or simply, the DOM. On the other hand, UnderscoreJS primarily focuses on easy handling of Objects and Arrays . Functions like filtering, array/object mapping, grouping, type checking etc, which you always longed for and which don't come along with the vanilla JavaScript, are available at your discretion with underscorejs. If you come from PHP background(like me), you know that PHP provides out-of-the-box functions like ar

D3.js, the most powerful visualization library I came across

Hello Friends!! This post is dedicated to D3.js , which I came across a few months back. Prior to that, I always preferred Google Charts which catered to most of my charting needs. However, since I switched to D3.js I could not find a good reason to move back to Google Chart. If we take a very crude analogy, D3.js would be analogous to an Ubuntu of the OS world, while Google Charts could easily be a Windows 7(just that both of them are free in this case); in the sense that the control and the power the user(in our case the developer) gets from D3.js while working with it, is unmatchable . While Google Charts is simply too cool and simple for a free charting tool, but D3.js is a library which lets you create any chart that you could think and conceptualize, with so much of ease, and it lets you link any kind of interaction/control that you would want to put on events, on any of the elements of the chart. D3.js, like RaphaelJS and PaperJS is a library which is developed to

jQuery plugin for image zoom and rotate..together!!

Well check the following url http://code.google.com/p/jqueryrotatezoom/ Some working examples can be found on jsFiddle http://jsfiddle.net/sandeeprajoria/jGyBZ/3/ contains full fledged working examples http://jsfiddle.net/sandeeprajoria/jGyBZ/1/ contains the most basic implementation First of all, this is a re-implementation of a plugin named jqueryrotate  (URL - http://code.google.com/p/jqueryrotate/ ). The main idea behind this plugin is to provide smooth image zoom feature while rotating them in different angles and speed(or easing functions). So it would seem, like a picture is coming from nowhere, while rotating and zooming itself to its maximum or limited zoom percentage. Now how did this come together? Well it all started with tutsplus.com... Their lead trainer Mr. Jeffery Way gave a fabulous webcast titles 'jQuery in 30 days' . The webcast can still be found on their website tutsplus.com That was when I came to know about