News for hackers. Stuff that matters.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by krosaen on Monday August 29, 2011 @09:32PM (#2939750)
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...

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!

Re:Book on Third-Party JavaScript from engineers at Disqus (... by bentlegen on Monday August 29, 2011 @10:06PM (#2939826)
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.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by jwr on Tuesday August 30, 2011 @02:24AM (#2940359)
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.

Re:Book on Third-Party JavaScript from engineers at Disqus (... by bentlegen on Tuesday August 30, 2011 @03:05AM (#2940434)
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.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by edanm on Tuesday August 30, 2011 @08:00AM (#2941041)
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.

Re:Book on Third-Party JavaScript from engineers at Disqus (... by ChrisArchitect on Monday August 29, 2011 @05:28PM (#2939102)
funny 'cause now the first thing I see is - hey, they used the 'twitter bootstrap' look on this page
Re:Book on Third-Party JavaScript from engineers at Disqus (... by Pewpewarrows on Monday August 29, 2011 @07:53PM (#2939528)
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.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by hendrik-xdest on Tuesday August 30, 2011 @02:45AM (#2940404)
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 ;)).
Re:Book on Third-Party JavaScript from engineers at Disqus (... by smhinsey on Monday August 29, 2011 @05:03PM (#2938977)
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.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by rhizome31 on Monday August 29, 2011 @05:26PM (#2939098)
Nope it's just hacks. The script tag with JSONP and nested iframes is pretty much all we've got.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by bentlegen on Monday August 29, 2011 @07:25PM (#2939457)
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.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by Tanner on Monday August 29, 2011 @08:20PM (#2939586)
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.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by bentlegen on Monday August 29, 2011 @08:55PM (#2939665)
That content is still in there. I just don't want people to think of this book as a one-trick pony :)
Re:Book on Third-Party JavaScript from engineers at Disqus (... by aldian on Tuesday August 30, 2011 @10:12AM (#2941497)
Just impulsively bought it. I am creating web widget in my Last project and curious how it be done in the 'standard' way.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by dayjah on Monday August 29, 2011 @07:41PM (#2939495)
fwiw, chrome 15.x has some issues with the voucher input box. Problem doesn't occur with Firefox.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by bentlegen on Monday August 29, 2011 @07:51PM (#2939525)
Thanks for the tip. I'll pass this on to the folks at Manning.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by kreek on Monday August 29, 2011 @08:27PM (#2939599)
Great timing! Starting a widget project soon, will this be on O'Reilly's Safari?
Re:Book on Third-Party JavaScript from engineers at Disqus (... by bentlegen on Monday August 29, 2011 @08:56PM (#2939666)
The book is being published by Manning, so probably not :(
Re:Book on Third-Party JavaScript from engineers at Disqus (... by bentlegen on Tuesday August 30, 2011 @10:48AM (#2941653)
Okay, I was completely unaware, but Manning books do appear on Safari, and so will this one once it's 100% finished.
Re:Book on Third-Party JavaScript from engineers at Disqus (... by frankdenbow on Monday August 29, 2011 @06:04PM (#2939252)
Definitely checking this out, something I definitely want to read more into.