Saturday, June 16, 2012

TXJS Presentations Remotely


I've never been able to attend a TXJS conference so I've admired the event from afar. It looks like Rebecca Murphey and Alex Sexton hosted another grand event. Here are some great presentations.

Pamela Fox @pamelafox did a presentation on "localStorage: Use It, Don't Abuse It" that is very well documented and a great resource on local storage. The link to Steve Souders case study on Google and Bing is one example that I really appreciated.
http://localstorage-use-not-abuse.appspot.com/
http://www.stevesouders.com/blog/2011/03/28/storager-case-study-bing-google/

Rebecca Murphey @rmurphey presented "A New Baseline for Front-End Developers" which which really helps me know where I should be pushing my limits. For example, I really want to automate a lot of my developement/deployment and it reminded me to study Grunt which was on my todo list from jsconf.
http://frontend-dev-baseline.nodejitsu.com/

"Machine Learning in JavaScript" would not have crossed my mind prior to seeing this presentation by Heather Arthur @harthvader. Perhaps I should be spending a hour per day on node again.
http://harthur.github.com/txjs-slides

Ashley @ClassicallyGeek did a wrap up of TXJS which mentioned a talk by Dave Rupert @davatron5000 on "JavaScript in Responsive Web Design". The fitvids.js jQuery plugin looks very interesting.
http://classicallygeek.com/2012/06/14/txjs-2012/

Finally, I'm looking forward to seeing Jed Schmidt's @jedschmidt presentation on "NPM: Node's Personal Manservant". He always has a interesting way of looking at things so I want to see his latest thinking.
http://www.flickr.com/photos/tr4nslator/7187168459/in/set-72157630065908247

All the videos from last year are here. Maybe the 2012 ones will be there soon.
http://vimeo.com/channels/txjs

Friday, June 01, 2012

415 unsupported media type couchdb jquery

Hate it when I repeat a mistake. Worse when I repeat it.

Adding a new record to couchdb requires a POST and jQuery supports that verb. So I did the simple
    $.post(toc.dbUrl+'techtocs', data, function(data) {
        alert("Data Loaded: " + data);
    },"json");

But this got me the "415 unsupported media type" error. I was sending application/json type but I still got the error. So I finally looked up my old code and did this:
$.ajax({
        type: 'POST',
        dataType: 'json',
 contentType: "application/json",
 data: JSON.stringify(data),
 url: toc.dbUrl+'techtocs',
 success: function(sdata){
     //stuff here+ 
        }
    });

Glad to get it working on this project where techtocs is the database name.