Announcing the jsKata libraries

I’m officially announcing the jsKata librairies.

Why?

I just wanted to write some public code and share it with others. Javascript has a lot of pains in the butt and jQuery is not the answer to every problem. jsKata is the answer to some of the problems that I face everyday while writing javascript.

A manifesto?

I wrote a manifesto because it helps me focusing on what and how I want to achieve with jsKata. This is the manifesto of version 0.2.

  • No internal dependence : every library can be used independently “as is”.
  • No external dependence : don’t depend on external libraries.
  • Everything is public : you know what you’re doing
  • Avoid objects : use closures
  • No unnecessary validation : if something goes wrong, an error will pop
  • No error catching : if an error pop, it goes all the way up
  • No DOM : jQuery already exists
  • No plugins : if a developer wants to add something, he will find a way around
  • Write good documentation : document as I code
  • Promote : a good library is nothing without users

What are the libraries available?

I don’t consider jsKata to be a library but more a set of libraries because each one can be used independently (see #1 in manifesto). For the moment, there are two librairies.

Undo & redo
I wrote about undo and undo & redo before. I took the code and put it in jsKata. You can look at the code or try the demo.

No freeze
This librairy is to avoid unresponsive script warning when you have a really long loop. It cuts a loop to create digestible chunks without a warning. I’ll write more about this one in the future but meanwhile, you can look at the code or try the demo.

GitHub

All the code is hosted on GitHub. I hope you will enjoy it!

  • Frank

    Hey, this is great Dan. I had a look at the code and this is some well written javascript. The kind of javasript I am unable to write. Congrats barnak!

    I think your default namespace could be jsKata instead of javascriptkatadotcom. The chances that someone already have a namespace called jsKata in his application is almost non existent.

    That would save you the pain of writing javascriptkatadotcom everytime in your own library. That's no big deal but I wanted to say something about the code and this is all I could find.

  • http://www.javascriptkata.com Dan Simard

    Yeah, javascriptkatadotcom is a bit of an overkill… but it's done now and anyway, I just copy/paste that code at the bottom so…

    But thanks for the coment!

  • http://www.javascriptkata.com/2010/08/10/nofreeze-a-library-that-avoids-freezing-in-javascript/ NoFreeze : a library that avoids freezing in javascript » Javascript Kata

    [...] launched jskata not a long time ago and mostly talked about the undo feature. Now, I will talk about the jskata [...]

  • Adam

    This is fairly old but i just came across your site and feel your libraries will be useful. I just wondered; why avoid objects in favor of closures. I'm kind of fuzzy still on the nature and use of closures, so maybe this answer will help my understanding. Thanks for making your code public :)

  • http://www.javascriptkata.com dsimard

    Thanks!It's a design decision mostly led by my own taste.

    Too often, objects create a rigid structure that can be hard to understand, use and modify as time goes by.

    By using closures, the scope of each method is reduced and it's more simpler to test and modify each of them separately.