jeiden (1) [Avatar] Offline
Hey guys,

I have been trying to navigate through the code examples thus far in Third Party JS, and have reached chapter 3. I am noticing that the "Listing" code examples do not seem to build on each other, but rather stand alone. Ideally, I would like to use this book to create a demo widget, than customize it to my specific needs. Is that the intention?

For example, I created the widget.js main script body covered in Listing 2.2. This included defining the loadSupportingFiles, getWidgetParams, getRatingData, and drawWidget function stubs.

However, after this, I was expecting to see how the next examples helped us build out these function stubs. There hasn't been explicit references to the original main script body since Chapter 2. I have been using my best judgment thus far, but am confused with the proper way to implement the examples in Chapter 3, "Rendering HTML and CSS.."

My question is: Is the book meant to be followed this way? Or is it more of a generic overview of different techniques that you then must put into practice? To me, it seems more like the latter especially as some of the references to images (i.e. to not point to real URLs where content is hosted.

Any clarification would be greatly appreciated.


benvinegar (68) [Avatar] Offline
Re: Recommended way to follow along with this book
Hey Jeff,

I realize this reply is coming super late (I wasn't getting email notifications for replies on this forum), but I thought I'd answer anyways.

The code examples do not 1:1 follow the examples in the book. They're more stand-alone examples that cover the concepts demonstrated in a given chapter. The Camera Stork example is used repeatedly, but it is usually used in an isolated sample.

I think you're right in that it is "more of a generic" overview. This is because there is no real "prototypcal" widget. They can be built in so many different ways, and we wanted to demonstrate as many features/problems/techniques of third-party scripts as we could.

Hope this answers your question. Again, apologies for the lateness.

- Ben