State of the Secrets
I've alluded to it a couple times now but it's probably important to state it definitively: I'm writing a new JavaScript book, to be published by Manning Publishing, called Secrets of the JavaScript Ninja. I published the rough Table of Contentspreviously and the contents of the book will be staying virtually the same (with a couple minor additions).
I wanted to take this opportunity to give a sort of progress update - letting you know what's happening. Not enough is said about the process of writing a book (especially technical ones) so I wanted to try and fill in some of the gaps.
Dec 28th:I first decidedthat I wanted to write a new JavaScript book around the end of last year. While it wasn't, explicitly, a new year's resolution - the timing was rather nice.
Dec 28-30th:I then set about collecting some information, trying to decide if the subject matter was worthwhile:
Jan 9th:I decided that I had enough information on hand to warrant a full book on the subject matter (namely advanced JavaScript techniques and cross-browser scripting). I started work on congealing this into a full outline/table of contents.
It was around this time that I started work on my first (non-introductory) chapter: Functions.
Jan 21st:It was around this time that I started talking with various publishers. Luckily I've been able to accrue a number of contacts in the technical publishing industry, over the past couple years, so I already had some starting points and good references. I also received a few contacts after my post on the profits of my previous book.
Jan 25th:I made the decision to go with Manning Publishingas the publisher of my book. I had the opportunity to have a number of long phone calls with Marjan(the head of Manning) and he had some fantastic ideas for the book and its direction. Hearing his ideas and excitement was a huge reason for me to go with them but in the end there were a number of reasons for choosing them:
- They were very open to trying new techniques with the book - everything from how it was to be published, what the contents were, to even how the writing process worked.
- When we originally started talks we were looking at the idea of having the book be similar, in style, to other books like Why's Poignant Guide to Ruby. We discussed this, at length, for quite some time. After a few weeks of mulling it over I decided that this wasn't the best course-of-action for this book. The mixture of complex material and narrative would not work well, I felt.
- However, we agreed to include a heavier use of illustrations and figures to communicate difficult topics (such as timers or closures). We'll have to see how this works out, but that's the current plan.
- The book will have a companion web site which will be open to those that have purchased a copy of the book. It will behave very similarly to the Django Book, in that you'll be able to comment on any portion of the text - becoming part of the editing and review process.
- I'll be able to write the book using DocBook, which is a huge win over the old pass-Word-documents-around strategy that a lot of publishers use. Many technical publishers are getting better here - I definitely wouldn't want to go with one who didn't support this, or a similar, strategy.
- They have a good level of distribution and their books are widely available in book stores.
- We were able to negotiate a good level of compensation heavily tied to the sale of books, which made me happy.
Feb 3rd: Chapter 2 was completedand submitted on time. I now have an absolute schedule to work against. One chapter every 10 days until the end of August. It's pretty grueling (as is to be expected with book writing) but I'm optimistic. I started with Chapter 2 so that I could get a feel for how an actual chapter would be written (I dislike writing non-code chapters).
Feb. 17th: Chapter 3 (Closures) completed. I also released a portion of this chapter as a blog post: Partially Applying Functions in JavaScript. I fell behind with this chapter because I was traveling to Mountain View, for Mozilla work, during this period. I suspect that this will happen frequently throughout the summer as I'll be traveling a lot more.
Around this time I was assigned an editor for my book, Tom Cirtin. I look forward to working with him more - I'll certainly have plenty of opportunity for that.
Feb. 24th: Chapter 4 (Timers) completed. I'm virtually caught up at this point. However I have to jump back now and finish Chapter 1 (the introductory chapter) before moving on. I released one portion of this chapter as a blog post: How JavaScript Timers Work.
There's a lot that I'm doing differently from my first book and it's already making for a saner experience:
For starters this book is highly specialized, it picks one topic and covers it completely (there's a chapter on closures, on timers, on eval, on with - to name a few). I enjoy giving high-class treatment to obscure topics. Knowing that someone will be able to pick up this book and absolutely see something that they've (probably) never seen before makes for a very invigorating writing experience.
Another thing that I learned from my first book was that I really dislike long chapters. To counter this the book is broken up into 21 "small" 10-12 page chapters. I love it, it's the perfect chapter length, for me. I rarely find that I have more to say on a subject after about 4000 words (which is what 10-12 pages works out to be). With my old book I constantly felt like I had to flush out topics in order to meet page quotas, not so here. This causes me to become much more relaxed, knowing that whatever result I end up with it'll be an ideal length.
While I wouldn't call this book a 'cookbook' it's certainly not a traditional-style technical book. I'd say that it's something of a hybrid between the two. The chapters, thus far, have a structure like: In-depth explanation of topic, simple use of topic, specialized use of topic #1 through #3. For example in the chapter on Timers I dive in to how timers work, look at the minimum timer delays and reliability, explore computationally-expensive processing, build a centralized timer control, and finish up with a look at an asynchronous test suite.
While I don't have a final date for when the book site will be ready (or when the book will be available for pre-order) you can be sure that I'll blog about it here, when that's the case (be sure to subscribeto my blog, if you haven't done so already, to receive more updates).
In short: I'm really excited about this book. Progress is going well, the publisher is friendly, the topics are ideal, and the content is coming out great.
Related Articles
Programming Book Profits
Review of GWT in Action
Book Review: PHP Web 2.0 Mashup Projects
Exclusive iPhone in Action Chapter Downloads
jQuery in Action (w00t)
jQuery in Action (Get 30% Off!)
Secrets of the JavaScript Ninja: A sneak peak for Ajaxians
Having a crush on jQuery
Relatd Projects
What is XSTM?
XSTM is a n open sourcelibrary which enables high performance object replication between processes. It is an object oriented Distributed Shared Memory, or a Distributed Object Cache.
XSTMhas similarities with technologies like Adobe Flex Data Services , JBoss Cache, Terracotta, Tangosol Coherence , ScaleOut , or IBM's ObjectGrid .
Our model is based on object shares, which work like file shares. When an object is added to a share, it appears on the other machines which have the same share opened. Modifications done to the fields of the object are from this point replicated between machines.
Read more in the project overview.
XSTMis made of three projects. The Java implementation is called JSTMand is the base from which
the other versions are derived. An adapted version made with Luciano, the
author of GWM , is available for GWT . It allowsthis library to be used in a browser. NSTM is a .NET port based on IKVM.
All implementations are compatible with each other so object replication can take
place e.g. between a Java server and a .NET Smart Client.
A simple command-line tool to create the folders and helper files for a new JavaScript project/library. As a bonus, you can quickly create a website to promote your project.
When you start a new JavaScript library, how do you layout the source files, the tests, the distribution files? Do you have support scripts to generate distributions from source files? Run your JavaScript unit tests? Generators to create new unit test HTMLfiles?
Just by adding this small JavaScript module to the end of your web pages, you get your form's submissions intercepted and, instead of sending request to the server in the usual way, they are done asynchronously and in an AJAX-style smooth way.
As long as it is a client-side library it will work with any server technology: ASP.NET, PHP, JSP, Classic ASP... and even with local HTM files.
I've included extensibility so that you can add easily your own progress indicators (several included) and show error messages the way you prefer (by default it shows an alert).
It's transparent to your server code and could be used to add AJAX capabilities to some applications without writting a single line of code.
Documentation is included.
Features summary
• No-code AJAXification of web apps
• Supports any server technology, including ASP.NET, JSP, PHP, ASP 3.0...
• In ASP.NET it supports all kinds of postbacks: direct and by code.
• Works in any modern browser that supports AJAX.
• Supports cross-posting of forms, that is, you can send the information to any web page in the same domain. If all your web pages have AJAXInterceptor included (for example, you include it in your master page or template) you can hace
• Respects your custom onsumit event handlers.
• Supports browser history so that your users can hit the previous button and get the last rendered page.
• Two versions of the module:
- AJAXInterceptor.js: full commented one. Useful for debugging purposes.
- AJAXINterceptor_r.js: reduced-size version. It downloads faster as it only is 2.6 kB in size. It's better to use this on production apps.
• Automatically show/hide custom progress indicators.
• Support for cancelling operations.
• Support for custom message displaying.
• Supports any form in your page
Obviously this is not substitute at all of full-fledged APIs like Microsoft's ASP.NET AJAX, PHPLiveX or AJAX.NET, but will let you add AJAX support to your apps in a few seconds and without writing any code. Just give it a try!
In the ZIP you will find teh module, a working sample with ASP.NET and a PDF with the help documentation.
This project is just for fun :-)
I will be very glad if you drop me a line in case you use AJAXInterceptor in any real-world application or if you enhance it with new features.
Visit my .NET blog (Spanish) at http://www.jasoft.organd my e-mail marketing blog (English) at http://www.theemailingexperience.com
Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications like Google Mapsand Gmaileasy for developers who don't speak browser quirks as a second language. Writing dynamic web applications today is a tedious and error-prone process; you spend 90% of your time working around subtle incompatibilities between web browsers and platforms, and JavaScript's lack of modularity makes sharing, testing, and reusing AJAX components difficult and fragile.
GWT lets you avoid many of these headaches while offering your users the same dynamic, standards-compliant experience. You write your front end in the Javaprogramming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML.
- No plugins like Flash or Java required.
- Popup blockers are no problem. The content expands within the active browser window.
- Single click. After opening the image or HTML popup, the user can scroll further down or leave the page without closing it.
- Compatibility and safe fallback. If the user has disabled JavaScript or is using an old browser, the browser redirects directly to the image itself or to a fallback HTML page.
jQuery UI is a set of themable widgets and interactions, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.
Onion ML is an XML template system designed with a bias toward modularity.
Onion ML lets you easily custom XML tags to make modular content design simple and easy to mix with HTML. It is somewhat comparable to XSLT and JSF, but intended to be easier to understand.
You define custom tags either as markup in XML files or as custom JavaScript functions which generate output.
Onion ML also provides several control flow methods necessary for dynamic content. Methods for iterating over data sets and conditionally displaying tags are core to Onion ML's functionality.




