Browsed by
Tag: OOP

Who do we write code for?

Who do we write code for?

Recently, while reviewing some code, I came across the snippet below. Now a keen mind can spot many issues with this. The ones I am referring to are something specific and relevant to the business though. The code is supposed to fetch all active clients, loop through, get job specifications from some DataSources defined for those clients, build a config object and return those values to calling function so that those jobs can be fired. Interestingly DataSourceInstance, DataSourceOriginConfig and DataSourceJobConfig…

Read More Read More

Just another object-oriented approach to jQuery plugins

Just another object-oriented approach to jQuery plugins

It has been almost a year since I have been working primarily in JavaScript. During this time I have written three jQuery plugins and loads of other scripts.This is the story of how my approach to writing jQuery plugins has evolved. I was working on my first plugin, which was supposed to be a large (in LOC) and went through the authoring mentioned on the jQuery site. In the beginning- it was great, a few exposed methods, well organized code, private functions,…

Read More Read More