Skip to main content

Posts

Showing posts from May, 2013

Think “SOLID”

S  → Single responsibility principle : One class one responsibilityO → Open/closed principle : Open for extension, but closed for modificationL  → Liskov substitution principle : Design by contract [Link: Liskov substitution principle]I   → Interface segregation principle : Many client-specific interfaces are better than one general-purpose interfaceD → Dependency inversion principle : Abstraction on object and their dependency creation


Debugging common errors in ExtJs

If you check ExtJs form, you will find some issues commonly faced by developers. I have seen people spending hours to solve these issues without any clue.
Here is the list of few errors and expected root cause. Hope it will help someone.  this.addEvents is not a functionCheck instantiation of the class. Most probably you forgot to write “new” keywordwhile creating a class object. namespace.MyClass is not a constructorCheck for typo in class definition or class instantiation.Did you forget to include the js file in html page or in jsb configuration?this.el is undefined / this.el is nullIn ExtJs “el” variable hold the reference of DOM element. And DOM element only initialize, when UI render correctly on web browser. If you are getting this error,  then their is major chances of accessing “el” variable before UI component layout or render properly. Component is appearing as gray out or it is hanging somewhere elseIt can happen because of many other issue, but major reason is same id of …