Suggestions For New Book

Well, the ink on Professional JavaScript isn’t yet dry and I’ve already been asked to write another JavaScript book for Wrox. This new book is going to be project-based, showing how to design a particular piece of functionality from start to finish. So the question I’m posing to all of you is this: what sort of projects would you like to see? So far, I’ve come up with the following:

  • Expanding/Collapsing Tree
  • Cascading Menus
  • Toolbars
  • Rich Text Editor
  • Autosuggest Textbox
  • Highlight/Linkify Text (such as highlighting Google search terms on the page)

I need to have between 10 and 15 projects to make this work, so if you have any ideas, please post them to this entry.

Comments

  1. Jeremy McPeak

    Just a quick few ideas:

    RSS Reader using XmlHttpRequest. It could also encompass many previous projects just as the expanding/collapsing tree. Like http://reader.wdonline.com and http://reader.forgetfoo.com. It can also show node traversal of the XML document. Gratned, any real use would need a server-side component, but the front end serves as good learning material (it was for me, at least).

    Animation library: Wipes, fades, slides, all the good stuff. I learned animation from Thomas Brattli&#039s and Erik&#039s code. Of course, I haven&#039t looked for any type of animation tutorial in quite a few years, but when I wanted info on it I couldn&#039t find any.

    Solitare: Incorporates the drag and drop from your first book into a game environment.

  2. Jeremy McPeak

    Wow. I should proof read what I type before hitting the Post button.

  3. Guilherme Blanco

    Hi Nicholas...

    Suggestions about project-based code?!!?!?

    Humm... I think I have a lot them!

    - Commom library, as Jeremy suggested
    - Windows like, using the library code (drag-drop, slide, fade, etc)
    - Chart (using SVG, VML, GD, etc)
    - An AJAX implementation (mine is available, if you want)
    - CMS based on AJAX + any server-side language (you could use my source, if you want... I&#039m just finishing it)
    - Tab Pane
    - Grid (my CMS is using Erik&#039s code of Column List)
    - Custom GUI components (seems useless, but I have a radiobuttons library and a checkbox library, to generate cool user interface without that weird OS-like checkbox/radiobutton)... could be... radiobuttons, checkboxes, spinner boxes, drop-downs (an weird component that it&#039s impossible to change some stylish), list-boxes...
    - Buttons library, providing some functionality, like adding event handler, etc
    - Ahh... talking about event handlers... have you checked Bindows Event Handlers? It seems to be a good stuff to provide to anyone...
    - Calendar
    - RSS reader (as Jeremy suggested)
    - Slideshow (I have some source available)
    - Interactive Drop-downs... a very commom thing... by selecting one item in the first drop-down, the second one is automatically filled by only valid data... example:
    By selecting USA as country, only the USA States are available in the second drop-down (combobox)
    - A basic scroller (a div with some content and a custom scroller anywhere)
    - Extending the previous example... you could add a news scroller
    - Any useless animation, like circles moving around the mouse.
    - Clock (analog, digital, etc)
    - Etc. I&#039ll try to add more in this list! =)

    Cheers,

  4. Paul Whitrow

    Hi Nicholas (and the rest of the gang!),

    I think you should include the Javascript RPC functions that are floating around. I use it all the time and find it invaluable. I did a &#039brief&#039 articale about it for Alphafilter some time ago.. http://www.alphafilter.com/...

    Also, I have loads of javascript heavy scripts on the back of my site (www.pwhitrow.com) in the &#039Other:&#039 section. Take a look and let me know if you want to use any of those. They are mostly IE only as they were written ages ago when I was first starting out and have never gotten around to updating them.

    Hope that helps.

    Paul

  5. Jim Minatel

    Nicholas: Your editor LOVES that you are getting input on these project ideas. My personal favorite so far is the RSS reader. Thanks Jeremy, Guilherme, and Paul!

  6. Shike Maffer

    Hey Nicholas: props on the new book BTW. I&#039m going to be teaching a high school class on Javascript and I&#039m likely to be using it as the text. Nicely done.

    I like the RSS reader idea like Jeremy suggested. I&#039d even think a NetComs like IM like Paul built would be slick to look at. Of course featuring XMLHTTP type of asynchronous rather than typical form posted server side stuff... My hot buttons are Javascript OO stuff. Showing that Javascript is not second class. There is an old Wrox book called Javascript objects that is good but a little long in the tooth. I&#039d also like to highlight something that shows the power of the DOM combined with Javascript like the Bindows stuff that Erik et al have done. Maybe do that all in a combo RSS reader/Blog manager type of project that you build through the whole book.

  7. Nicholas C. Zakas

    So I think one thing I&#039m hearing loud and clear is "RSS Reader". Even though a server-side component is necessary, that&#039ll be a great project in the book. It doesn&#039t have to be completely client-side code, like the autosuggest control will also have server-side logic.

    Shike: Thanks so much. I think one the best compliments is when someone thinks enough of my book to use it to teach others.

  8. Paul Whitrow

    Damn Shike, I didn&#039t think anyone would remember my little netComms app..! [wipes tear from eye].

    In all honesty, I think the scope of the new book would be too narrow for something like that as it includes quite a lot of server side scripting. Maybe something smaller *based* on the technology could work.

    I would like to suggest some more posibilities:

    1. form checking for mandatory fields, correct email address formats, etc (always getting asked about this).
    2. calendar script with updatable events.
    3. a really top notch browser sniffer.

  9. khs

    a javascript function to validate a textarea would be awesome. Or atleast check that all tags are closed.

    And a way to make textarea&#039s work in firefox(and other browsers) like they do in ie when the overflow property is set to visible. Here is one way to do it (http://tuckey.org/textareas... but I didn&#039t like the feel of it.

  10. Les Szklanny

    Great book… I’m looking forward to the next one :)

    Here’s a link to an article that briefly describes Gmail architecture…

    http://ifindkarma.typepad.c...

    See this fragment…

    “As Hwang described in his July 5 write-up, Gmail loads a JavaScript "UI engine" into your browser at the beginning of each session. Oddpost, he noted, was the first Web mail application to perfect this technique. That was a prophetic statement: Just four days later, on July 9, Yahoo acquired Oddpost.
    Because Gmail’s behavior is embedded in the UI engine, all subsequent interaction between the browser and the Gmail service is just an exchange of data. What Hwang calls the DataPack format is not XML, though; it’s JavaScript. When you make a request to the Gmail service, whether to refresh your inbox or to modify the list of labels you can attach to messages, the response is a minimal set of JavaScript function calls and associated data objects that the engine uses to update the display.”

    Would you be able to explain or provide an example in your new book how such a JavaScript UI engine could be built?

  11. Nicholas C. Zakas

    Les,

    I&#039d love to do something like that, but unfortunately, I fear that would take up pretty much all of a book. The title of this book will be something along the lines of "JavaScript Instant Results," and it will contain several self-contained projects. But hey, maybe I&#039ll be able to propose that as my third book. :)

  12. Carl

    I like the idea of an RSS Reader but am puzzled about the need for a server-side component.

    A client-side page could use XMLHttpRequest to retrieve XML/RSS pages (OK, they&#039re "server-side" but we don&#039t have to write them!) parse and display the results appropriately.

    The only thing I&#039m not sure about; I&#039m not a Javascript guru -- that&#039s probably obvious by now ;-) is if client-side Javascript could persist the user&#039s feeds without resorting to server-side code? If so, what server-side component would you need?

  13. Nicholas C. Zakas

    Carl, a server side component is needed due to the cross-domain security restrictions of the XML HTTP Request object. By default, you can only make calls back to the same server from which the page originates, so you need to create a proxy in order to pull in RSS or anything else from a different site.

  14. Carl

    Nicholas,

    Ah, thanks very much. I didn&#039t know about that cross-domain restriction.

    Can I just ask if there is any way client-side Javascript can read/write local files? I&#039ve always wanted to write a clean and simple ToDo-style application, maybe XMLHttpRequest to a client-side page but persisting the ToDo list on the client&#039s machine (if there&#039s no server-side component) appears to be an issue. Am I right in thinking, for security-sakes, it&#039s not possible?

    Thanks again, you provide some great insights into Javascript.

  15. Nicholas C. Zakas

    Carl - the local file system is off limits to JavaScript that lives in Web pages for security reasons.

  16. Carl

    Nicholas,

    Thanks for your advice. Purely by chance I came across a comment posted on the 37 Signals website at http://37signals.com/svn/ar... pointing out a client-side "Getting Things Done" Wiki - just the application I mentioned I&#039d like to write in my earlier comment. The GTD TiddlyWiki can be found at http://shared.snapgrid.com/... and it truly is a very clever piece of HTML, CSS and Javascript.

    They seem to save the edited Wiki information divs within the single HTML file -- very nice.

    Any idea how is it that they are able to save the information to the local file system?

    One things for sure, it&#039s exactly what I was looking for!

  17. Murali Koujala

    Hello Nicholas,

    Good to know you are on to a book. I had an opportunity a while back wth Wrox but decided against due to lack of time.

    I am in the process of implementing Search on one of my client&#039s intranet portal both for google search and corporate phone system. They might be potential candidates for your projects.

    Others I would suggest are simple ones like, simple chat app, local information system for movies, restaurants in one&#039s zip code.

    I am also planning to propose AJAX solution for Learning Management System to inform user of new learning entities available but from a different site which leverages personalization.

    Hope that helps...
    Murali Koujala
    vPerform Inc.

Understanding JavaScript Promises E-book Cover

Demystify JavaScript promises with the e-book that explains not just concepts, but also real-world uses of promises.

Download the Free E-book!

The community edition of Understanding JavaScript Promises is a free download that arrives in minutes.