Skip to main content

Posts

Showing posts with the label Programming

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...