JavaRanch: Thank you for agreeing to answer our questions, Bear. Before we start, I need to read you your rights. You have right to keep silent, if you don't want to answer some question for whatever reason, or without reason at all, just skip it. You also have the right to write your own questions and answer them – it's a "DIY" kind of interview. Remember that everything you say can and will be used against you.
Bear Bibeault: I have read and understand my rights.
BB Where's the camera? Shouldn't there be a camera or something? Oh wait, this is an online interview. Never mind. What was the question?
BB: Is my tie on straight?
JR: Sigh, you're not wearing a tie. Are you always this way?
BB: No. Sometimes I tend to wander off the subject.
As to why I chose it... Well, I didn't. It chose me!
JR: How is that?
I've proposed a few books on server-side technologies, but none of them have gone anywhere. The general consensus seems to be that "everything that needs to be written about Servlets and JSP has already been written". I don't happen to believe that that's true, but I guess that I haven't been all that convincing as of yet.
But RIAs and Ajax are things that people want to read and learn about, so that's what publishers are interested in. And so the three books I've written to date focus on the client side of things. You gotta write what people want to read!
But I haven't completely given up on my idea for a book on JSP...
BB: Well, obviously the advent of Ajax has had an impact on how the server side is written. While the big, full-page refreshes are still alive and well (despite the predictions of their demise), they are augmented by increasing hoardes of smaller requests made via Ajax to "service" that page until the time comes for it to be replaced.
Which not only brought the concept of HTML fragments to the server side (as opposed to the predominance of full HTML pages), it also brought JSON into the mix.
And now, with the addition of the scripting engine and Rhino to Java 1.6, well, that's a whole 'nuther ball of worms that server-side devos need to figure out how to use to best advantage.
JR: You mentioned JSON. What's that all about?
JR: Why is that?
BB: It's incredibly easy to digest on the client. XML is a bear (in a bad way) to digest with its rather heavyweight API. JSON only requires a simple call to eval() and you're done!
It's also easy to generate and lots of server-side tools for dealing with it are cropping up. It's not going to push XML off its data interchange throne anytime soon, but as far as Ajax is concerned, XML can no longer claim to be King of the Hill.
Do you remember that board game, King of the Hill? It had this plastic mountain with a crown at its peak...
JR: You mentioned wanting to write a book on JSP. Why do you think we need one more?
BB: ... and it had marbles as playing pieces ....
JR: Why do you think we need one more JSP book?
BB: ... and all these traps you could fall into.
JR: Focus! Book! On JSP.
BB: JSP underwent a major revolution with JSP 2.0 and no one seems to have noticed. Oh, people are starting to use the JSTL and the EL (Expression Language) more and more – but a lot of them are still writing web apps the same old way that they used to with JSP 1.x. They're just trying to replace scriptlets line-by-line with JSTL/EL and finding out that that's not really where it's at.
Or worse: mixing scriptlets with JSTL/EL. (shudders)
To really take advantage of the "new JSP way", people need to change some of the ways that they think about using JSP pages. Not a whole lot – but more than I've been seeing happen.
There are also some neat tips and tricks that I've learned along the way, some of which I've written about in previous Journal articles, that I'd like to share with a wider audience.
Ajax in Practice is very different from the other two books in that it shows how to use Ajax to solve real-world problems that web developers face every day. It's perfect for either people who already know some Ajax and want to put it to good use, or people who have heard about Ajax and want to know if it can help them solve some of the issues that they've been encountering.
Now can I ask you a question?
JR: Ask me a question? No, not really.
BB: What is your main goal when interviewing people?
JR: To make them discover something about themselves, something they didn't know?
BB: I didn't know that I was so boring. Thanks for that!
JR: On your blog, The Bear Den, you talk a lot about cooking. Does your programming experience influence your cooking style?
BB: Well, when people ask me for a recipe, I give it to them in XML. Does that count?
JR: Can you think about a case when your cooking experience influenced your programming?
BB: Splashing tomato sauce into the keyboard definitely has an effect.
Seriously, I think that one of the reasons that I like cooking so much (besides because I like to eat) is that it's so completely different from programming. While I feel that programming is as creative as it is an analytical endeavor (at least for me), the sort of creativity that goes into cooking is of a different sort. Besides, my other hobbies are digital photography and videography; both if which involve being plopped in front of a computer. Cooking is the one interest I have that doesn't involve a keyboard.
Unless you count using the iMac in my kitchen to look up recipes, or enter them into a database.
JR: You have an iMac in your kitchen?
BB: Of course, to look up recipes, surf while waiting for a sauce to reduce, stream iTunes from my upstairs PowerMac, and moderate JavaRanch first thing in the morning while my coffee brews. Don't you?
JR: Explain the motorcycle in exactly 42 words.
BB: Riding a motorcycle is as close as you can get to flying while still keeping two wheels to the ground, riding with the wind in my hair. OK, I have no hair and I always wear a helmet, but you get the idea.
JR: That was 43 words.
BB: Bill me for the extra word. Make it the I, that's probably the cheapest.
JR: What's your favorite felony?
BB: Hmm, according to Wikipedia, crimes commonly considered to be felonies include: aggravated assault and/or battery, arson, burglary, embezzlement, grand theft, treason, espionage, racketeering, robbery, murder, rape, kidnapping and fraud.
BB: None of those really suit my style. Can't we stick with misdemeanors?
BB: Dang. Then I'd have to pick espionage. Except that I'd be a double agent! That way, I could still be the good guy and Matt Damon would play me in the movie version. Though they'd probably have to hold him down while they shaved his head.
JR: What would you most like to say in Russian?
BB: "Just show me the way to the blasted bathroom!"
JR: You've done three big projects with Manning. After all the work, does Manning feel more like a Mother or a Father to you?
BB: Neither actually. But the Publisher, Marjan Bace, often likes to chat with the authors by phone. These conversations are always engaging and thought-provoking, but somehow, I always feel like I'm being sent to the Principal's Office when one is scheduled.
JR: Did you get sent to the Principal's Office a lot when you were in school?
BB: Hardly ever! I was a complete goody-two-shoes! I didn't develop my bad boy image until... wait, I never did develop a bad boy image. I'd better get to work on that...