Technology & Me ...

Infinite scrolling in AngularJS

The other day I was discussing different JavaScript frameworks available to build Single Page Application [SPA] with my team. We discussed multiple options including ASP.Net MVC SPA template, Backbone, EmberJS, Durandal + knockout and AngularJS. By comparing different features available in these JavaScript frameworks, team member skillsets, application complexity and project timelines, team decided to go ahead with AngularJS. One of the important points discussed during these brainstorming sessions was how much data load is necessary during application start-up and how pagination can be implemented asynchronously. Business users also wanted team to come up with some cool ideas like fluid…

JavaScript Functions Part 5- Constructor Functions

This is the fifth and final article in JavaScript functions series. Earlier in the series we have covered – Function Declaration Function Expression Anonymous Functions Immediately Invoked Function Expression [IIFE] Today we will focus on constructor functions. JavaScript without a class construct If you are an experienced C++/ Java / C# programmer you already know the importance of class construct in your program. Classes are composed of structural and behavioral elements like fields, properties, methods, events etc. and they are core part of the application. Now as I mentioned in the earlier articles in this series, current version of JavaScript…

JavaScript Functions Part 4 – Immediately Invoked Function Expression [IIFE]

Welcome back to JavaScript Functions series. Earlier in this series we have covered different ways to define a function in JavaScript using Function Declaration, Function Expression and Anonymous Functions. In this article we will cover another aspect of JavaScript language – Immediately Invoked Function Expression [IIFE]. I hope by you now have a clear understanding that JavaScript language provides only two ways to define a function – using Function Declaration or Function Expression. Language features like anonymous functions, IIFE doesn’t provide new syntax to define a new function, rather they provides additional benefits to your program like callback functions, closures,…

JavaScript Functions Part 3 – Anonymous Functions

Welcome to JavaScript Functions series. This is the third article in the series focusing on Anonymous Functions. In the earlier articles, we covered JavaScript Function Declaration and Function Expression and its pros and cons. We will continue to follow similar pattern in this article. Anonymous Functions As the name suggests anonymous functions are functions without any given name. Now, you might be thinking how is it even possible and most importantly useful? If we define a function without any name, how can we even call it? Well, in large scale JavaScript programs anonymous functions plays important role, however we will…

JavaScript Functions Part 2 – Function Expression

Welcome to JavaScript Function series. In part 1, we discussed Function Declaration syntax in JavaScript and few traps associated with it. In this article we will discuss JavaScript Function Expression. Function Expression A function expression has similar syntax as function declaration except that function value is assigned to a variable name. Let’s take a look at an example – var log = function logMessage(message) { console.log(message); } log("This is a function expression"); Once you define a function using this syntax, the function name [logMessage in this case] becomes obsolete and the function can be called only using the assigned variable…

1 of 11
12345