

Book on Third-Party JavaScript from engineers at Disqus (YC 07) - bentlegen
http://thirdpartyjs.com

======
krosaen
Great topic for a book, just ordered it. To support embeddable menus for Real
Time Farms we went with:

\- a script include that is very lightweight and only

\- document.writes an iframe and

\- asynchronously loads a helper script to deal with cross domain
communication so that the frame can change height when the menu tabs change

See it in action here <http://www.northernspyfoodco.com/menus/dinner>

it eventually loads the iframe with this content:

[http://www.realtimefarms.com/restaurant/northern-spy-food-
co...](http://www.realtimefarms.com/restaurant/northern-spy-food-co/iframe)

The benefit of using an iframe so far has been much easier reuse of code for
the widget content. However, we've had a few folks request to use their own
stylesheet which can't be supported (instead we offer a configuration of the
embed snippet to style a few things like menu width, fonts family and colors).

In any case, if we learn even a single helpful trick about embedding rich
content from this book, it will have been money well spent!

~~~
bentlegen
Very cool widget. Integrates really well with the page - if you hadn't told
me, I'd have no idea it was being served externally.

------
jwr
Bought the book immediately, as what we do for a living is third-party
JavaScript (search engine for e-commerce, offered as a service).

But I'm surprised to find that there is no mention of Ajax Crawling and SEO
(see <http://code.google.com/web/ajaxcrawling/>), which is a crucial issue, a
deal-breaker for many customers. I realize this is a MEAP book, but even the
Table of Contents does not hint that search engine indexing will be treated in
any way.

~~~
bentlegen
You make a good point. It isn't addressed in the book as-is, but I'll make
sure it is in a future revision.

------
edanm
Bought the book immediately - I don't think I've ever bought something so
quickly!

This is a book whose value is very clear - if you're working in the field of
embeddable widgets (as I am), you know how "hack-ish" and tricky a field it
is. The Disqus people have managed to make a great product despite this - any
tricks I can learn from them that will make my life easier will be worth tons.

I agree with jwr - SEO is a big topic which I know nothing about, except
feeling vaguely uneasy since I know we're losing a lot of SEO opportunities
with our widget. Definitely a topic that should be covered in the book.

This might be a niche topic, but how about talking about advertising inside
widgets in the book? Advertising is a method that many widgets use to
monetize, but I'm unclear how well the standard Google adwords, etc. solutions
work with embeddable widgets.

------
ChrisArchitect
funny 'cause now the first thing I see is - hey, they used the 'twitter
bootstrap' look on this page

------
Pewpewarrows
Congrats again guys! I've already picked up a bunch of tricks from the first
few chapters that are available, so it's immediately paid for itself in my
mind.

------
hendrik-xdest
Thank you, financial disasters of the past. For the Europeans: If you order
the printed book with the 50% off voucher with the cheaper postage fee, you
still won't pay much more than 25 Euros. Oh, and thank you for making that
book. That's a title that was definitely missing from my bookshelf (yeah, we
still have those in Europe ;)).

------
smhinsey
This is interesting. When I worked at a high traffic news site, we had what
seemed like an unending stream of low-level crises related to 3rd party
scripts of various sorts and it always blew me away, not being someone who
focused on the front end, that there wasn't a more formalized methodology for
dealing with them.

~~~
rhizome31
Nope it's just hacks. The script tag with JSONP and nested iframes is pretty
much all we've got.

~~~
bentlegen
I might be biased, but I disagree that it's "just hacks". Certainly hacks are
involved, but there are a number of best practices and methodologies involved
in proper third-party scripting. Which are covered in the book.

~~~
Tanner
I recently had the pleasure of hearing on of your Engineers, Ben Vinegar,
speak at a Tech Talk in Toronto. My impression from the talk was that the
hacks were perhaps the more interesting subject. I hope you haven't cut them
all out of your book.

~~~
bentlegen
That content is still in there. I just don't want people to think of this book
as a one-trick pony :)

------
aldian
Just impulsively bought it. I am creating web widget in my Last project and
curious how it be done in the 'standard' way.

------
dayjah
fwiw, chrome 15.x has some issues with the voucher input box. Problem doesn't
occur with Firefox.

~~~
bentlegen
Thanks for the tip. I'll pass this on to the folks at Manning.

------
kreek
Great timing! Starting a widget project soon, will this be on O'Reilly's
Safari?

~~~
bentlegen
The book is being published by Manning, so probably not :(

~~~
bentlegen
Okay, I was completely unaware, but Manning books do appear on Safari, and so
will this one once it's 100% finished.

------
frankdenbow
Definitely checking this out, something I definitely want to read more into.

