April 27th, 2006

Writing a Prototype Book for The Pragmatic Programmers

25 comments on 346 words

I’m really excited to report that The Pragmatic Programmers have accepted my proposal for a book on Prototype!

I’ve been working on the book for about a month as a personal side project, but after talking with some friends and weighing my options, I decided to pitch it to Dave and Andy. I feel really grateful to be able to write for a publisher whose books have helped me so much in my career.

I’m also happy to report that I have the support of both Sam Stephenson, the author of Prototype and Thomas Fuchs, the author of Script.aculo.us. Sam obviously knows Prototype better than any other and Thomas is certainly no newcomer to Prototype with the excellent work he’s done on Script.aculo.us.

Most of my readership is familiar with Prototype, so I ask the question: What would you like to see in a book covering Prototype?

How does the book affect this blog?

I obviously will be spending my time writing the book and continuing to work with JadedPixel. I will try to maintain consistency in posting to EncyteMedia, but there is a possibility that post will come less frequent.

I’ll be keeping you posted on the progress of the book, so make sure you grab the feed!

Discussion

  1. Amy Hoy Amy Hoy said on April 27th

    CONGRATULATIONS.

    Please please please make a chapter on “How to Read Prototype.” Prototype’s source is surprisingly complex, and that kind of knowledge will outfit us all for the many changes that will come in the time between when your book is published and when you can update it. :)

  2. zack zack said on April 27th

    YES.

  3. Travis Travis said on April 27th

    This is fantastic news, nice work.

    Covering Object.extend() in some depth (with examples) would be really useful to help others start building more object oriented js code. It’s one of the most useful things i’ve been using recently with prototype, since it lets anyone build nice extensible frameworks.

    Also, when you read through prototype.js, there’s a lot of different syntaxes for the way Object.extend is used, which can be quite daunting – explaining how and why each of these works the way they do would be nice.

    And all the little syntax gotchas collected into one chapter might be good (like the “this” inside iterators syntax you mentioned in your enumerable article).

  4. Jolo Jolo said on April 27th

    Congrats =)

  5. ceejayoz@gmail.com ceejayoz@gmail.com said on April 27th

    I’ve found the unofficial manual to be exceedingly helpful – let’s face it, Prototype’s documentation is… well, nonexistent. I’m very happy to hear there’s a book coming, and I’ll likely be one of your first buyers.

    Congrats!

  6. Andrew Andrew said on April 27th

    Sounds like a great book. Is Prototype alone really something that merits a whole book, though? I assume you’ll have a section on using P with Rails. What about a chapter on libraries built on Prototype like script.aculo.us and moo.fx?

  7. Jan Jan said on April 27th

    Don’t spend too much time with theoretical stuff or go extremely lowlevel. I would like lots of practical examples that I could easily use in my site. Kind of like the Rails Hacks book.

    After reading your book, I should have all sorts of ideas I could do with my site to make it nicer to use. I don’t want to have the feeling “well, interesting book, but I still have no idea how to apply the knowledge”

    A chapter on treating javascript as a real language (unit testing, debugging, useful extensions in firefox,..) would be nice too.

  8. Elliot Larson Elliot Larson said on April 28th

    Awwww… super sweet! I wrote Dave about two weeks ago asking for this book and he said he was considering a proposal. Sooo glad it got the go-ahead.

    I agree with Amy. I totally thought I had a handle on JavaScript until I started walking through the source for Prototype… back to the drawing board, as it were. It would be really helpful if you could include a section explaining the ins and outs of how Prototype is constructed and works.

    In particular, I think Prototype’s approach to creating JavaScript objects is compelling. Would love to see an in depth discussion of creating classes and subclasses with the Prototype methodology.

    Best of luck with the book project! Congrats.

  9. Alex Alex said on April 28th

    Great News!!! I support Travis’ opinion. OOP should be a good part of it.

  10. Ryan Campbell Ryan Campbell said on April 28th

    That’s great news. Congrats! If you keep your writing style similar to your tutorials on this site, I will be satisfied. Plenty of low level examples that assume the readers comes in with little knowledge.

    And just because I’m not a huge Rails users, it would be cool if the book isn’t too Rails centric, but I can understand if it needs to be.

  11. Carson Carson said on April 28th

    Sweet! (and about time!) Can’t wait.

  12. Ben Poweski Ben Poweski said on April 28th

    Thats awesome! They are a great publishing company. I know because i’m currently writing a book on Ruby on Rails security for them.

    http://www.bensblog.com

  13. Maurice Calhoun Maurice Calhoun said on April 28th

    I was trying to write a book, I just a can strap that idea.

  14. Jayant Jayant said on April 28th

    Are you going to base your book on ver 1.4 or 1.5? Any idea when ver 1.5 is expected?

  15. Tobie Tobie said on April 28th

    Can’t believe that… just wrote the lengthiest comment which didn’t get saved…

  16. Tobie Tobie said on April 28th

    Did it again… is there a limited number of links we can put in the comments (to prevent spamming maybe).

    Here’s the stripped down version… the original was full of related resources:

    That’s excellent news!

    Your blog has been my number one resource since I started seriously tackling Prototype, so I can’t wait to get a copy of your book.

    Regarding suggestions:
    • I’d love to have some of your event-selectors goodness in there,
    • and thus more on unobtrusive javascript,
    • as mentionned earlier better insight on OO in JavaScript would be more then welcome, this article by Douglas Crockford has helped a lot but I’m sure it could be expanded quite a bit.
    • more on bind and bindAsEventListener,
    • more on this and self,
    • best practices would be awesome,
    • building a lighter version of Prototype (and of script.aculo.us) for specific needs (in the vein of what moo.fx did),
    • a reference guide,
    • AJAX
    • security issues with AJAX,
    • extending Prototype for specific needs,
    • building a library on top of Prototype, or on top of Prototype and script.aculo.us, such as:
      • an image cropper
      • a JavaScript Textile client-side parser
      • tooltips and Lightboxes
    • cross-browser issues and how Prototype solves them,
    • performance issues,
    • forms and the $F() function,
    • and ahem… what will IE7 change ? Will it induce changes in Prototype ?

    Anyway… really looking forward to read this and congratulations!

    Any idea on when we can expect the first beta book ?

  17. topfunky topfunky said on April 29th

    I need to sit down and learn Javascript correctly.

    It would be great to have one chapter on the basics of Javascript for all those people like me who write it but don’t really know what they are doing (working with hashes, creating objects, parameters, etc.).

  18. Tarellel Tarellel said on April 30th

    Congratulations, Justin. I’ve shrugged JavaScript, AJAX, and the whole Dynamic Client Content, off until reciently. Lately, I’ve been stepping into using Prototype, Rico, and a few others, this is defietnly good news for everyone like me, who could learn by example. I can’t wait.

  19. Scott Becker Scott Becker said on May 3rd

    Excellent! I’m totally losing track of the number of awesome book titles that seem to be on the way. I already own 6 PragProg titles, and you’re not helping! Just kidding.

    What I would like to see: A nice balance between these three styles:

    1. Walkthrough building a full practical application.
    2. Recipes for quickly doing the sorts of tricks you see in today’s AJAX apps.
    3. JavaScript for Prototype (same vein as the “Ruby for Rails” Manning book. Walking through the Prototype library and explaining why it works the way it does, and what JavaScript features make Prototype possible.
  20. Mark Maunder Mark Maunder said on May 7th

    Congrats!! Prototype is awesome and having some printed material out there means it won’t go away.

    I think a good explanation of basic OO Javascript using prototype would be extremely useful and open the door to more complex client side apps. A clear explanation of inheritance using prototype would go a long way.

    I have an interesting code snippet for you. I modified prototype’s ‘Class’ so that all object properties have to be ‘declared’ in the ‘initialize’ method. If a method outside initialize creates or deletes a property, it throws an exception. It wraps all a class’s methods and this concept could be used to create code profiling and code coverage tools with prototype.js

  21. Justin Palmer Justin Palmer said on May 17th

    Sorry for chiming in so late on this, but I do want most of you guys to know that most of what has been suggested will be covered in the book.

  22. Lindsey Simon Lindsey Simon said on June 1st

    One thing I’d like to see is a bit of some analysis and comparison with the other frameworks out there.

  23. Adnan Adnan said on June 5th

    Don’t forget to explain the basic concepts and introduction to so called object-oritented Javascript constrcuts so users who only understand a little about javascript can also find it interesting reading book instead getting frustrated.

  24. Andreas Wahlin Andreas Wahlin said on August 19th

    heh, better late than never? I’d like it somewhat minimalistic, not a beginners book but a book for those who know JavaScript more or less good but are thinking “christ, can you do THAT” when looking at the Prototype code. So basically a good walkthrough of the code, why it works, how you can make it work for you, and of course a quick lookup of the functions and how they work and then perhaps some practical examples to know how to use them.

    Soto sum up, I want to learn advanced JavaScript-fu by understanding the Prototype source. Then I also want an easy reference for when I don’t want to write stuff myself.

  25. Sergio Pereira Sergio Pereira said on August 30th

    Cograts on the book deal. I hope you could add performance considerations of some of the library’s methods (like $$) and indications of what doesn’t work identically (or at all) with the major browsers. Adding script load time speeding tips should help a lot developers using a large library for the first time.

Sorry, comments are closed for this article.