Currently viewing the category: "Tech"

WARNING: This post is all JavaScript, ExtJS, and programming… :) very nerdy. You’ve been warned.

I just want to gush a little bit about this new feature in ExtJS 4. The new Model View Controller architecture is a pure joy to work with. Now we can create components that render the various visual elements of the UI and defer the behavior to something else.

Before (in pre-MVC-land), buttons, form elements, and controls emitted events that you wanted to handle. The only problem was that the quickest, and often shortest, route was to make the owning component deal with the events from its children. This often led to very spaghetti-like code, i.e. Panel B wants to react to Menu Item 2’s click. Panel B would have to get a reference to Menu Item 2 and register a click event handler. Sounds simple, but multiply that by several hundred, or thousand, times and it starts to get a bit unruly.

Thankfully, the geniuses at Sencha have come up with a very beautiful solution: The MVC. With the MVC we can just throw up the UI with all its panels, menus, buttons and what have you and then, once it looks awesome, we create the “Controllers” that stitch it all together. The controller can be as simple as this:

Ext.define('app.controller.Main', {
    extend: 'Ext.app.Controller',

    views: [ 'AccountForm' ],

    init: function() {
        this.control({
            'account-form button[action]':{
                'click':function(){
                    /*do something when a button with a property action is clicked in the account form*/
                }
            }
        });
    }
});

Check out the full documentation on the MVC here.

Over the last several months, I’ve been building up a new application and doing my best to make it true to the MVC. Though, I have to admit, I jumped in with the ExtJS3 mentality so my first set of components did have ‘controller’ code meshed in them, but as I’ve learned the “new way” I’ve been going back and “fixing” those in order to soar in the MVC. :)

Next up: how I setup Unit Testing with Jasmine & the ExtJS MVC.

Enhanced by Zemanta
Tagged with:
 

It was my first public offering to the world of freeware! My high school after-hours project is now on github.  I don’t know why I haven’t done this sooner, but I thought it would be a fun git-to-know git activity.

Just looking through all these files brings back memories — my, how far I’ve come. My first rendition of this project mostly used the MFC classes Microsoft shipped with their Visual C++ 5/6 projects (this was before Visual Studio .NET).  I eventually released this gem as Simply Transparent 6.5, and was the version that was honored as the “Free file of the Day” on TechTV’s “The Screen Savers” with Leo Laporte and Megan Morrone, post Kate Botello era.  Right around that time, I kicked MFC to the curb and rewrote the entire program with nothing but the Windows bare API at my mercy.  I had grown as a programmer and found a new love of strait-up-no-hand-holding raw C++.  Those were the days… learning something new every day, and digging for more — constantly digging — knowledge in software development and the art of UI design.

Continue reading »

To say that this has been a busy year, would be a gross understatement. I began the year as the point-man on a rockin’ team where we developed & maintained RiskManager 4 — a financial risk management application built atop a fantastic platform, an in-house project at RiskMetrics. However, the changing atmosphere at the company (RiskMetrics was acquired by MSCI mid-year in 2010) left much to be desired.  Loyal to the core, I stuck it out and even plowed ahead with re-architecting the user interface; moving from an in-house server-side HTML/Widget generation toolkit to ExtJS.

Around the beginning of the second quarter of this year, I was invited to join a few colleagues that had left the company to start a new company, and I couldn’t resist the opportunity to start something – something BIG.  It was just too enticing.

Continue reading »

Tagged with:
 

Its been bugging me… I’ve had this kick-butt system in the living room for years, but for some strange reason with Windows Vista (now 7) I lost my ability to pass pre-encoded digital audio out my SP/DIF port for anything other than DVDs and Recorded TV… which is a really annoying little hole in the setup.  My wife can attest, that every few months, I’ll interrupt our evenings with a little experiment to try to fix this “problem”… though, its only really a problem to those (like for instance: me) who care/notice the surround sound when its missing/down-mixed to stereo… so, no support for this little quirk. :) Any ways… today, I FINALLY solved my problem. :D

So, what is the solution?

Continue reading »

Tagged with: