These are my actions. These are my words.

Flow 1.0.2

I just pushed release 1.0.2 out the door.

Bug fix:

Flow will no longer choke with SWFObject.

Early this morning I received a report about Flow not playing nicely with SWFObject. After debugging, it turned out it was a case of doing too much.

SWFObject correctly cleans up after itself in IE by removing its generated code on unload. The conflict appears because Flow does the same with its code, going as far as eliminating all extended element properties.

So when SWFObject tried to removeChild, it returned null because Flow extends that property, and by the time SWFObject got to it, it was already wiped out.

Flow now merely restores an extended property back to its original implementation, rather than nullifying the property. This will fix the error.

Feature:

dispatchEvent is now implemented in Flow. You can use it to fire events on elements from another element. Confusing? Here’s an example:

var test = document.getById("test");
test.addEventListener("click", function() {
    // console.log(this.id);
}, false);
 
document.getById("dispatcher").addEventListener("click", function() {
    test.dispatchEvent("click");
}, false);

You can pass any event type and it will fire all events coupled with that type.

As usual, you can download the Flow framework at http://flowjs.com

Introducing Flow

This is a post I’ve been wanting to write for months now. For the past several months I’ve been spending my free time toiling over a personal project of mine.

It started with Dean Edwards and his release of the Base2 library. It scratched an itch that I’ve had for years: I wanted the ability to use the DOM API (Level 3) in all modern browsers. Base2 has since seen a second revision and is even more powerful than before. (Aside: Dean Edwards’ is a freaking genius.)

But I wanted more. I wanted a hybrid API that would allow me to use the standard API, but would also contain helper functions, shorthand notation, chainability, etc. So I got to work.

After eight months of development, trials, tears and tribulations I am pleased to announce the initial release of The Flow Framework.

Flow aims to fix and enhance the DOM Level 3 API. Flow extends API functionality to browsers that currently don’t support it. Additionaly, it adds powerful functionality on top for the best bang for your JavaScript buck.

A sample of the functions it implements cross-browser:

  • getElementsByClassName / getElementsByAttribute
  • addEventListener / removeEventListener (with DOMContentLoaded support)
  • preventDefault / stopPropagation
  • addClass / removeClass / replaceClass
  • querySelector / querySelectorAll
  • shorthand notation (getById, getByTag, getByClass, etc)

Here’s a snippet of what can be accomplished with Flow:

Find all: ul.checked li

With Flow Core

var uls = document.getElementsByClassName("checked").filter(function(e) {
  return e.nodeName.toLowerCase() == "ul";
});
var lis = [];
uls.forEach(function(ul) {
  ul.getElementsByTagName("li").forEach(function(li) {
    lis.push(li);
  });
});

With Flow Extend

var lis = document.getByClass("checked").filter(function(e) {
return e.elementName() == "ul";
}).getByTag("li");

With Flow Query

var lis = document.querySelectorAll("ul.checked li");

Want to open external links in new windows via JavaScript?
document.getByAttr("rel", "external").setAttribute("target", "_blank");

Want to return false on those pesky blank-anchor links?
document.getByAttr("href", "#").addEventListener("click", function(e) {
  e.preventDefault();
}, false);

There are more code samples, documentation, unit tests on the official site. Be sure to download a customized Flow build and try it out!

For those that want to take a gander at the code, you can check out the source on Google Code: http://code.google.com/p/flowjs/.

There’s already a website using Flow in the wild. South Park Studios was unveiled a couple of months ago, and it’s been chugging along since. Unfortunately I was under gag order at the time while the final details were being hammered down. Now I can officially state that it’s using Flow and lovin’ it.

Many, many thanks to Schematic for supporting the release of this library, and to the many Schematicans who freely contributed to the library.

Thanks are also in order to the great JavaScript programmers who’ve turned us all on our heads: John Resig, Dean Edwards, Robert Nyman, Tino Zijdel, Sergey Ilinsky and countless others.

Pickleview 1.5

Ahh, smell that? It’s the sultry scent of Major League Baseball returning at last!

After a furious weekend of code, I’ve pushed out Pickleview 1.5. What’s new? I fixed bugs, updated settings, added features and threw on a fresh coat of paint.

The improved Pickleview takes advantage of some minor iPhone goodies, and preps itself for the upcoming 2.0 software. It runs smoother and loads quicker. Good news for those EDGEing along at ballparks.

You can also do this now: http://pickleview.com/?dodgers

Check it out and enjoy!

Footalk

Greetings!

It’s been a while, but you know the drill: Long hours + Longer todo lists = No time to post.

To kick off 2008, myself and fellow blogger/nerd/geek Micah Cambre sat ourselves down and podcasted for the very first time. It was simultaneously thilling and horrifying. You can find our labor of love at Footalk.net. Please enjoy.

Footalk!

Fumble U

So I’ve been hard at work on side projects and regular work, but not busy enough to continue my love affair with iPhone.

Hot on the heels of the Fumbleview beta release comes Fumble U. It suffers from the same quirky bugs as its big brother, but it’s very stable.

I had decided to wait until Fumbleview reached 1.0 before releasing another app, but fortunately for me it only took a fraction of what I thought it would to tie into the college football database. It was still a minor feat, since there are a metric ass-ton of division 1-A teams. Ultimately I had to devise a method to fit all top 25 teams in the limited space I have.

Focus will switch to Fumbleview until I tie up its loose ends. Afterwards it should be a simple process to catch Fumble U up.

Support all mobiles? Start implementing standards and I will.

Prelude.

I’ll keep this short, as this comes down to very simple points.

I don’t block anyone from visiting Pickleview or Fumbleview. You can view it in any browser, mobile or desktop. I don’t sniff for iPhone, and lock out others. I don’t do any special CSS magic to block it from view. Rather, you get a much enhanced experience if you view the apps on iPhone.

My web apps will display and function perfectly in any browser that supports these standardized methods:

  • XMLHttpRequest();
  • addEventListener();

That’s it. Too much to ask for? Apparently.
(Note: Blackberries run IE.)

30 (Yes, thirty) runs on Pickleview

I had to snap a few screenshots of this one. Today the Texas Rangers set a modern-day record by scoring an eye-popping 30 runs in a nine-inning ballgame. Worse news: It was game 1 of a doubleheader.

Whoa, Nelly...

Fumbleview

The absolute #1 most hardcore requested feature for Pickleview wasn’t related to Pickleview at all. I received so many pleas for Pickleview: Football Edition, there really was no way I wasn’t going to do it.

Introducing Fumbleview. I’ve been hard at work on it for a few weeks now, but like its predecessor I am releasing it as beta in order to get community feedback, reviews, and bug submissions. And yes, there are bugs. While the Pickleview framework is rock-solid, the majority of the bugs stem around merging the data source with the Pickleview API.

Like Pickleview there will be lots of updates along the way to release 1.0. I’m determined to hit the 1.0 milestone on opening weekend, bug free and feature-filled. In the meantime, check out Fumbleview and feel free to submit lots and lots of feedback.

NFL games abound later today and through the weekend.

Are you ready for some football?