I’m migrating from server side development (java, php) to client side – HTML, CSS, javascript.
Though I technically understand (mostly) how javascript works, I have not found a good guide to creating an application – particularly with regards to how to organise functions and objects and setting up a solid test framework for them.
I’m currently half way through the Ruby on Rails tutorial
http://ruby.railstutorial.org/
which is excellent – I now feel confident in understanding the standard structure for arranging all the code in an application, and setup good testing practices as I go.
Plus, the integration with heroku and git make for a really tangible real world example, making for a complete understanding of how to develop and deploy a rails app.
Can anyone recommend a similar kind of guide for JS/AJAX development?
One good way to write JavaScript is to do it in a modular fashion. For dependency loading, you would also need module loaders like RequireJS. As for structure, there are a lots of frameworks out there, I suggest you give BackboneJS a try. You would also want to make your JS scalable so that you won’t ever have to worry about expanding. Here’s more videos about it as well.
There are a lot of frameworks to choose in JS. Test them all out and create a stack which you feel comfortable playing with.