developer.life.com/js/

Lately i’ve been doing alot of javascript development in my spare time. Spikes, little libraries, like HTML validation and logging.  When you’re righting event-driven code, TDD and logging help you quickly track down problems in your code.

The playing field has changed in Javascript and on the frontend over the last few years, and i’d like to share the tools and utilities I now use for my spare-time projects:

XDate : gives you nice decorators over a vanilla Date object (which is pretty basic and outdated) including parsing, formatting and manipulation without all the headaches.

Normalize.css : Best of the CSS resets.

Modernizr: Good for targetting many platforms (especially non-PC eg. mobile and IPad – helps with feature detection)

JQuery + Bootstrap 2: This one is a no-brainer.  Gives you responsive design (*-fluid), thoroughly tested and customisable and using Less or bootstrap-sass, can easily change styles globally.  Becoming a defacto standard.

Underscore.js:  I’ve found most people that have used Ruby like this library, it’s neat and powerful…

Backbone.js + Model.Binder – Backbone is useful even if you are grafting it to a legacy app, since it gives you basic object-oriented grouping of data and methods.  It encourages OO design in javascript, which also encourages a basic separation of DOM and data/functions.  There are some aspects I think are too basic, especially once you get into non-trivial models (toJSON() for example, is not recursive) but for alot of simple stuff it gives you cleaner, testable code and good separation of concerns.

Jasmine: If you are familiar with RSpec or keen to learn, start using Jasmine.  It’s probably the strongest testing suite for javascript and has good integration to both ruby/rails and java.  I use it even on vanilla javascript projects.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s