1 Dec 2011 7:51 AM #11
1 Dec 2011 10:28 AM #12
It's curious; I am newcomer to JS scene and this is exactly what got me off guard at first, the encouraged way of copying/pasting large amounts of existing code in order to override it. I still can't understand it though, what is the reason behind monolithic design? Maybe I'm missing something.
Anyway, I think I have found a way to deal with it, of sorts: when I encounter a large method I need to override, I create a buffer class first, refactor that method and split it up into well-defined parts and then extend that buffer class. Sure it adds overhead on maintaining the buffer class but it's largely alleviated with revision control tools, and it keeps my code clean of any Sencha code. In the end it means easier maintenance for me, without actually adding any significant overhead; and if I don't release that code to the public it means no licensing issues whatsoever. Nice and neat.
10 Sep 2012 9:54 PM #13