I'd recommend picking a convention and sticking with it. Personally I like doing stuff server side, seems a little more secure as people cannot see the code that's being executed, and you'd eventually need to hit the server to store some data too. So might as well do all of the grafting there.
I think the JavaScript library is more for non native web apps? And other front end focussed development. Though I'm not 100% sure on that