the singularity of being and nothingness
Archive for December, 2013
2013 Year in Blogging
Dec 31st
Well, it’s that time of year. WordPress today gave me a nice little infographic about my year in blogging. Check it out!
On the whole, it was one of my more active years, but not nearly as active as I’d like. I often get caught up in doing “big” blog posts, but in 2014, I’m going to endeavor to do more in quantity as well. I’ve got a lot of exciting stuff coming in the new year, so there should be plenty of fodder for writing.
I do appreciate everyone who takes the time to check out what I blog about. I hope it’s interesting to you, and hope that the stuff I post in the next year will be even better.
Hope that your 2013 was a great year, and best wishes in 2014!
Share this:Ext JS: Custom Event Domains and Complex Controller Event Selectors
Dec 15th
A while back, I did a post on creating a custom Event Domain in Ext JS. If you’re new to the concept, Event Domains in Ext JS are simply classes that fire events which your controllers can listen to. The awesome part about domains, however, is that the “domain” of the events getting fired within your application are grouped together by type (read domain). This allows for very granular control over the event listeners that you construct in your controllers.
For example, the boilerplate for your controller since Ext JS 4.2.1 should now look something like this:
Ext.define('CustomController', { extend: 'Ext.app.Controller', init: function() { this.listen({ controller: {}, component: {}, direct: {}, global: {}, store: {} }) } })
Ext JS comes with the 5 domains bolded above, and as we saw in the last post that you can create your own rather easily. In the example I shared, I created a custom event domain for “proxy”. With this custom domain setup, Ext JS will now monitor all events fired by the Ext.data.proxy.Proxy class, and our controllers can easily listen to those events and do whatever we need them to do. Pretty slick.
A Little FancierAs nice as this works, I recently came across a scenario where I wanted a bit more More >