Fork JavaScript library launch

I'm excited about the launch of my new JavaScript library called Fork at http://forkjavascript.org with the MIT license. Below are snips from the front page of the Fork site...

Fork is a JavaScript library with Ajax, Events, DOM manipulation, etc. Fork is a general purpose library with a few bonus lines in the Ajax library specifically for use with Ruby on Rails however the library can be happily used outside of Rails also.

advantages

  • an aspiration for the highest quality code
  • author documentation
  • in-browser unit/integration tests
  • namespaced code
  • does not augment JavaScript built-in prototypes
  • does not add a layer of sugar on top of JavaScript to make writing JavaScript like writing in another language
  • Is minimizable with jsmin
  • MIT License

There are many JavaScript libraries out there. Why add another one to the list?

I like Ruby on Rails. The Rails default Prototype JavaScript library does not suit many development situations and contains code that makes developing for a wide selection of browsers difficult or impossible. Prototype has some great ideas in it's mix but the implementation quality has been questioned many times. Prototype has influenced many JavaScript libraries and some of Prototype's best ideas have also influenced the Fork API. Because Fork is a namespaced library, you may be able to use both Fork and Prototype simultaneously as you transition from one to the other.

I like the Yahoo! UI library. Of the JavaScript libraries I've used it has the best API. The YUI library has many valuable nuggets of information about browser bugs and workarounds. The code approach of YUI suits browser scripting well. However there are more than a few places in the code where I'm left scratching my head and thinking "why did they do that?" Maybe that is how every developer looks at another developers code. The YUI API is the starting point for much of the Fork API.

Most libraries seem to develop too quickly. API's are fixed from the first alpha version and code is not allowed to morph for the early part of it's life. I like the general debian attitude of careful growth because the browser execution environment is wildly varied and deserves a certain degree of conservatism in the JavaScript we send to it.

Comments

Have something to write? Comment on this article.

reverseblade January 20, 2007

There few glitches in your drag n drop library. When you click apple1, apple2 deflects 2px down due to the space occupied by borders but not vice versa. I found this a bit unnatural. Also alt key is already mapped in gnome desktops to move the window so draging multiple items sample does not work at all

Peter Michaux January 20, 2007

The apple1, apple2 demo works that way so that Netscape 6.0 can run the demo since that browser can't use position:absolute like later versions. If I remove the border change on selection that shift will disappear.

Good to know about gnome. Unfortunately there are many browsers that have trouble with the alt key for multiple selection and I've noted that in the docs. The multiple selection code is still useful if developing for an intranet or admin tool where the set of browsers is controlled. Thanks for the info.

Have something to write? Comment on this article.