On the surface, you may think that such a book would have limited appeal. Many of us write JavaScript and many of us may even use such third-party tools, but the percentage of those who need to author such things is probably pretty limited. In my years in web development, I've never had a client ask me for one and I've only built one once. (See this blog entry on a Behance widget I built.)
I cannot stress how wrong I was. While certainly the book does focus in on embedding code in other web sites, the level of detail and coverage of various browser quirks makes this book invaluable to anyone.
Both authors have worked on the Disqus platform, probably the best example there is of third-party JavaScript, and I would have assumed they would have some knowledge of various browser quirks and issues, but my god, I had no idea the level of insanity they had to deal with in terms of supporting multiple browsers.
This book is an incredible way to learn about how the DOM works, how script loading works, and really how the browser works as well. For every problem discussed multiple solutions are covered as well as a deep explanation of why you may choose one particular solution over another.
If you have no plans ever for building a third-party API, this book is still strongly recommended. Hell, the last two chapters alone on performance and debugging are worth the price of the book alone. This is a book I plan on keeping nearby as I feel like I'll be tapping the knowledge inside again and again.
You can read two samples chapters online now: Chapter 1, Chapter 4.
Here is the table of contents:
- Introduction to third-party JavaScript
- Distributing and loading your application
- Rendering HTML and CSS
- Communicating with the server
- Cross-domain iframe messaging
- Authentication and sessions
- Security
- Developing a third-party JavaScript SDK
- Performance
- Debugging and testing
Finally, the book site itself: http://thirdpartyjs.com/
Archived Comments
Awesome, glad you mentioned this book.
I actually built a premium web app that allows users to embed a widget on their website. At the time I was researching ways to do this I ran across this book which was yet to be released.
I ended up going the iframe route because it looked insane to try to detect jquery on the page then load it and deal with various quirks.
I will definitely be looking in to checking out this book.
Hey Raymond - thanks for writing this. I've been searching high and low for some objective feedback since the book was published. It pleases me to know that you found it a good read, and that you found value outside of the book's focus on third-party stuff. Thanks again!
Glad to, Ben, thanks for reading this.