So on Friday, as a gentle way of trying to get back into work mode after the Rails course had finished, I started
I have just bought 'Pragmatic Ajax (A Web 2.0 Primer)' from The Pragmatic Programmers. It is a very interesting read, and
inspired me to 'get the code out of the view'
functions, which don't really need any variables passed to them (as the function ends up with the paths and div ids hard=coded).
Well, I managed to refactor out most of the functions that we had written, and with a few additions to variables being passed to them, managed to reduce the number of some function (or make them more genericised for future reference). I even discovered a slight problem with my scrumptious.js which I need to tweak and document.
The great thing is that we have now reduced the code in the views. This makes the views easier to read and keep upto date.
There are still a few functions which I should be able to refactor, but I need to find out a couple of extra things first.
My experience of programming books has led me to find the Pragmatic Programmers books are a great way of finding the information in an easy to read style. So far, Pragmatic Ajax is a good book and hasn't let me down in it's style and (most importantly) content.