‘Bulletproof Ajax’ by Jeremy Keith
Aprile 24, 2007
Ajax has been a hot topic for quite a while now, and there seems to be a new book with the eponymous Greek warrior in its title pretty much every week. Coming in at just 207 pages, Jeremy Keith’s new book, Bulletproof Ajax, is the latest to join the fray. With only 200 odd pages how does he plan to cover such a complex subject you may be asking? Well, here’s the secret - Ajax is really quite simple when you get down to it.
Jeremy’s previous book, DOM Scripting, stands as a fantastic introduction to JavaScript in general and DOM Scripting in particular and Bulletproof Ajax follows on from that title to some degree. Although you get a short introduction to the JavaScript language it’s just enough to understand the examples (I’d recommend you have at least a passing knowledge of JavaScript before reading this book). Also if you are coming to Ajax as a server side programmer then this book is probably not what you’re looking for, but worth reading at a later date. Given the client-server nature of Ajax there are server-side code examples (in PHP) but these are generally brief and serve only to support the examples rather than look at real world usage. Again, it would be useful to have at least a passing familiarity with a server side language and to be able to know if you already have a web server handy to experiment with.
The book features plenty of sample projects - for instance a simple address book is built up, showing off how to use XML, JSON and HTML as data sources and introducing the central XMLHTTPRequest object. There’s lots of focus, as you would expect, on making these examples bulletproof, in this case making sure they work even if JavaScript is unavailable using a method called Hijax.
To go from simple inline event handlers through to completely unobtrusive, object-based code and discussions of closures in JavaScript would be pretty good going for a book twice the size. It’s testament to the clear, no-nonsense and eminently readable writing style that this never bogs down the examples. Some people are bound to complain about the use of the proprietary innerHTML property and the minimal coverage of XML and JSON in the larger examples. This seems to be a facet of the scope of the book and a pragmatic approach to the problem rather than an unintentional oversight. If you’re looking for an A-Z of building an enterprise Ajax application then you’re probably looking for another book (but you should read this one first anyway!).
An entire chapter is dedicated to Accessibility and Ajax, a hugely important subject and one I’ve not seen mentioned anywhere else to date. Although the chapter lacks equivocal conclusions (mainly because no one seems to have formed any yet) it raises all the important issues for discussion and debate and provides a solid set of references for further reading. Throughout the book everything is anchored on the importance of user experience, rather than simply using technology for technology’s sake; this makes Bulletproof Ajax stand out from the crowd of more technology-focused tomes on the subject.
As a standards savvy developer if you want to get up to speed quickly with the hows and whys of modern Ajax but don’t have the time to wade through an awful lot of blog posts then Bulletproof Ajax is worthwhile reading. If you already know what you’re up to then it’s a perfect book to recommend to your unenlightened colleagues. A perfectly digestible read for one of those long train journeys!
Book Name: Bulletproof Ajax
Publisher: New Riders
Author: Jeremy Keith
URL: http://bulletproofajax.com
Price: $34.99 USD
Rating out of 5: 3.5
Original post by contact@thinkvitamin.com (Carson Systems Ltd)
Matt Ogle and Anil Bawa Cavia
Aprile 12, 2007
This interview was recorded at the Future of Web Apps conference in London, February 2007.
Watch the video!
Last.fm developers Matt Ogle and Anil Bawa Cavia talk to journalist Bobbie Johnson for Vitamin
Vitamin: Can you tell us a little bit about some of the problems that Last.fm has faced? What can people learn from them?
MO: Early on our biggest hurdles were technical. We had a product called AudioScrobbler that let people send information about what music they were listening to to our servers and wed use it to recommend new music, build up a musical profile and do things like that. The popularity of the service had us spending a good year or two figuring out how to scale it up and how to match the growth that we were getting. Wed been open from the start and that really fostered a community around the product, but as time went by we were getting hundreds of song submissions every second and a lot of our challenges were technical we had to learn how to scale that up to meet demand, so keeping our users happy and feeling like they were part of the project when inevitably we had server downtime and growing pains.
ABC: Later on we had to face issues about scaling the company up internally, about team communication and so on, and we came up with our own processes there. The real lesson we learned is to customise your tools. There are no off-the-self solutions for scaling a company, you have to find your own solutions or customise them.
We also faced challenges in how we design the product: when suddenly its huge and everyone wants a piece of you, you have a lot of affiliate deals to think about. We learned to put our users first, focussing on user feature design and on the product at all times; keeping our APIs open, promote ourselves as a platform and letting people run with it and do what they want to it; atomising aspects of our service and letting people run with those, freeing them up and making aspects of the service syndicable these were other lessons that we learned.
V: Last.fm took funding early in its lifespan and it is in a hugely competitive space. How do you try to remain independent and unique?
MO: I think it comes back to users and listening to them. Were lucky now that we have quite a considerable user community around the product and we let that drive our development and take our feature requests from them. Usually if someone else is doing a better job our users let us know on the forums. We think we can stay lean and small enough to remain nimble, and despite taking on funding weve tried not to lose the start-up hunger and to really keep that spirit alive. I think that will help us stay competitive even though a lot of big players are now muscling into the territory.
ABC: I think in the last twelve months the competition has really heated up. I think what we do very well is focus on socialisation better than most in the market. We socialised our products and have done from the start - so the process of building the product is a social process and thats how you stay ahead of the curve really.
MO: Our users will always be the ones to tell us whats happening in music. We also find that the best way to grow is to ensure that adding more people to the mix makes the experience better for everyone. So as long as we still have a site where the best way to have a great time is to bring all your friends along, we feel like thats a safe growth plan.
V: Are you looking to move into other kinds of content? Could your formula be applied to other kinds of information?
MO: Were quite lucky, were all music lovers but it also works quite well as a unit of attention data. A pop song is three or four minutes long, has an artist and it has a title. You listen to music while you do other things in your life; that makes it an excellent candidate for the kind of service we offer. Videos a bit different; you dont generally watch a movie again and again, so it does change things. But having said that, its an exciting space and I think other companies with other kinds of attention records will emerge.
ABC: Yeah, I think in terms of attention theres a lot of opportunities. Youll see more and more companies capturing attention in more comprehensive ways, because it really becomes the core of your service, and that applies in other areas and not just our market. And socialisation is obviously a huge trend…
V: You call Last.fm myware, not spyware but youre in a unique position though, because although not everyone wants their data tracked they are often quite happy for it to happen with music. Are there problems people will have in that area?
MO: We definitely do need to be aware of privacy considerations, and thats something well be developing a lot this year. You might not want everybody to know what youve been listening to at this precise moment so thats something were thinking about. Privacy these days can be fairly fine-grained you can give people options. With the myware idea it only works if people feel confident that youre safeguarding their data and not using it in ways they dont feel comfortable with. And also providing ways to get it back out again; so people give you their data, you enhance it, they get it back out on the other end and can do other things with it.
ABC: I think youll find that data ownership is something well do a lot with in the future and so youll see a lot on that front from us. Hopefully we can set the trend or the standard for users to really own their own attention data.
V: So is attention data really the building block of hundreds of future web apps?
ABC: Yeah, lets take AdSense for example broad, contextual advertising: thats a step in the direction of concrete attention data. So theres a general trend towards what people actually pay attention to and how can we enhance their experience with related services. Youre seeing this in Google Reader right now; it measures how many articles youve glanced at while youve been in their interface, one by one, based on your scrolling. Theres more attention being paid to these aspects of software by people who are building software in all markets.
MO: As the web keeps exploding and so many Web 2.0 sites are all about user-generated content, its the classic problem when theres more content than ever, how do you filter it, how do you make it relevant and contextual. Attention data is a great solution to that, especially since it says dont change your behaviour, keep doing what youre already doing and well make your experience better. Which is a really great way to do user experience.
V: Outside of your company, where do you think there are interesting things going on? Where else would you like to work?!
ABC: I think most developers in the country will tell you that they want to work on OpenID in some form, because identity on the web is a massive issue how to create interoperable systems that work across social networks is really interesting to me. So, how you can build on Open ID and then attention and trust systems across the board, that applies to most software developers in the world. You could offer me any job you like but Im still staying!
MO: Its hard to think about leaving last.fm once youve been doing it for a while, because theres still so much yet to be done. Especially with the current state of the music industry with regards to digital music none of us are very happy with the status quo and we all believe we can help change that. One thing Ive been interested in lately is the rise of apps such as Twitter, which basically take one single function, do it really well and then try to open it up and syndicate it as much as possible. Youve seen that a lot in individual features on more comprehensive websites. But to me its inspiring to see a single website product like that succeed. I think that means a lot of ideas can have more chance to live on their own in that way then become a useful part of a whole.
Original post by contact@thinkvitamin.com (Carson Systems Ltd)





