Author Archives: Jack Slocum

About Jack Slocum

Creator of Ext JS. Founder of Sencha and Slocum Labs. Travel and food connoisseur. Tampa, FL.

Introducing the Bittman Algorithm

This is a repost of an article recently published on the blog for my new startup, Alta5. Our platform enables investors to automate stock and options trading strategies using JavaScript.

alta5.com/blog/bittman/

In 2012 Jim Bittman, Director of Program Development and a Senior Instructor for The Options Institute at CBOE, gave a presentation that outlined a 2-step strategy for trading the S&P 500 Index (SPX) using weekly options. The strategy is particularly attractive because Mr Bittman supplied very specific entry and exit points, back testing data, probabilities and a detailed comparison vs trading once a month using standard monthly SPX options. This weekly strategy was one of the primary strategies that inspired the creation of altarithm.

read more

Better Declarative Listeners for ExtJS

The most recent post on the Sencha Blog, Declarative Listeners in Ext JS 5, goes over some of the improvements made in the latest ExtJS release to make attaching event listeners to components a little easier. I have been using a small override in ExtJS 4 for a while that offers a similar declarative approach to attaching listeners, but also gives the developer the ability to traverse the component hierarchy or listen to stores. This small override completely changed the way I develop apps using ExtJS.

read more

HTML5 History API

HTML5The Ext JS framework includes the Ext.util.History component for managing the browser history that was first introduced in Ext 2.0 back in 2007. It’s pretty solid, and other than bug fixes it hasn’t changed much since then.

In the reportcaster framework, all state changes while changing reports or drilling within reports is routed through a Navigator component that supports pluggable strategies for how to do that navigation. The default method is to use the browsers history. We were using Ext.util.History to do that and it worked just fine. However, since Ext.util.History doesn’t support the hashchange event or HTML5 History all navigation is slightly delayed by the polling interval of Ext.util.History.  Users found that to be undesirable.

read more

Encapsulate complex logic for cleaner code and reuse

Ext JS provides many reusable components for use in Javascript applications that shield the developer from complex timer and/or asynchronous code. However, you may still find yourself writing timing or asynchronous code directly in your application code that you would be better off encapsulating in a class.

Timer code is generally not pretty, bug prone and is not something I want to look at all the time. Once that logic is available as an object, it’s easy to mask the complexity and make that functionality available transparently to other developers.

read more

Simple Tasks v2 – Multiple lists, NativeWindows and Reminders

In collaboration with Adobe, one of the key additions in Ext 2.0.2 was Adobe AIR 1.0 support for running in the application sandbox. Also, the Simple Tasks AIR application sample was rewritten to take advantage of more of the native functionality in AIR and gained some cool custom Ext components that can be used outside of AIR.

AIR APIs

First, lets cover some of the AIR APIs that were used:

NativeWindow
This was one of the most useful additions to the Ext.air package. It provides an API to create windows, manage those windows, listen for events like standard Ext Observables and automatic state management for the windows.

read more