Win a copy of Spring Boot in Practice this week in the Spring forum!

Brett McLaughlin

author
+ Follow
since Sep 01, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brett McLaughlin

Gustavo-

We're definitely working on expanding our presence -- and therefore our offerings -- in the educational space. Right now, we're quite close to releasing our first set of academic supplements to a title (I won't mention which until I have a firm release date). In this case, we're including over a hundred additional questions, about 20 to 25 shorter, week-style or (for the ambitious) classroom homework projects, and even a few extensions for some longer 6-week or semester projects.
And, everything is tied directly in with the book, from page references to building on examples and scenarios in the book. So it's an attractive package.
We intend to build from there, adding slides and lecture notes, so a professor or teacher has everything they need to teach the book, except for students, expertise, and potentially tests (although we're exploring options for test banks there, too).
We expect to have something before year's end; Head First Labs (http://www.headfirstlabs.com) always has the latest on those sorts of things.

And, to be clear, we want to move the supplement release closer and closer to book release, until (one day!) they coincide. Hope that helps.

-Brett
Distribution is tricky, because we (the publisher) aren't in control. We sell our books through sales channels, and then stores make them available according to all the laws of the land. I'm not sure about import laws and the like for Romania, but your best bet would be to ask your local book store to order the book; they can usually do that more easily than any other realistic option.

Or, you can wait for a translation, although that often takes a bit, and we have even _less_ control over that :-(

Hope that helps (at least a little)
Brett

Series Editor, Head First
Thanks for the kind words. I do think there are some key differences between Head Rush Ajax and the other Ajax books -- just as I think there are key differences between all Head First books, as compared to other "traditional" books.

But before I say anything else, let me be clear that I think that the other Ajax books are good, and important. So this isn't some sort of "My book is bigger than your book." :-)

But, the focus of all Head First/Head Rush books is on concept. We believe -- "we" being the Head First authors and team -- that concept is king. Lots of code examples are great, wonderful, but not nearly as important as really learning what's going on. So you'll read a -lot- about what the web browser really is in Head Rush Ajax. That might seem pretty basic, but it's core to really understanding Ajax. You'll learn a ton about asynchrony, and then spend a whopping two chapters on the DOM (that's almost 100 pages, which is way more than anything else I've ever seen). That's because we believe that if you can really wrap your head around these core concepts, then putting them together in specific and interesting ways is pretty easy.

So if you have lots of Ajax code, but really aren't sure how to come up with a new combination of technologies, or a new spin on the samples you have, Head Rush Ajax can really ground you. If all you're looking for is specific applications, and you think (even though most people don't) you really do understand the core principles in Ajax apps, then you might want to look at Ajax in Action, or Ajax Hacks.

That's my $0.02. Keep in mind I'm biased, though... but I think the consistent comments we get about Head First and Head Rush bear out that we emphasize concept heavily.

Thanks
Brett
OK, I can't resist... if you really are coming to Ajax completely new, then Head Rush Ajax is an ideal book. It takes you from ground zero to a well-rounded Ajax developer, and you'll get a really strong grounding in asynchrony, the role of the browser, data formats, etc. Check it out...

Sorry, self-promotion. But that was too much of a softball to resist :-)

Thanks
Brett
Hmmm... this actually isn't a message I've seen. If it's the browser, it's obviously something controllable on an individual user's machine. From the sound of it, it's not something that you're going to get much information about in your JavaScript. For example, since it's on the browser, you won't get a ready state or error code.

The same thing happens at times with browser time-outs. If they are set really low, errors can result, and you really don't have much recourse. Welcome to client-side programming :-)

Brett
Yeah, you have to realize that Ajax is simply JavaScript with some other bits tossed in. So there aren't a lot of "new" security issues; there are just issues that might be more obvious when writing asynchronous apps as opposed to "traditional" JavaScript apps.

And, to be even simpler, you just need to chant: "Never trust the client." If you're writing code on the server, don't assume the client sends you valid data; don't assume it sends you secure data; don't even assume it's sending you data. If you always take that stance, you'll find that security in Ajax apps is pretty simple. There are obviously issues to worry about, but if you take the big picture, "the client isn't safe" approach, you'd be amazed at how little you have to worry about patterns, and how much you can simply focus on securing your scripts.

Hope that helps some
Brett
Hey everyone. Head Rush is essentially a little brother to Head First. The style is very similar, but most of the elements are different. For instance, we have a "Just Do It" instead of "Exercise", and "Frequently Asked Questions" instead of "No Dumb Questions". You'll feel very comfortable if you've ever read Head First, though -- and of course you'll love it if you haven't :-)

Head Rush is a little more focused in topic, too. You won't ever read Head Rush C++, but you might read (ahem) Head Rush UML. Head Rush really drills down on exactly what you need to get the job done, while Head First is a little more comprehensive. Both are important, but the topic really guides us to which format and approach makes the most sense.

Hope that helps!
Brett
As several have said, the only significant difference between browsers is in creating a request object: using XMLHttpRequest in Mozilla, Firefox, Opera, Safari, et. al., versus using ActiveXObject in Microsoft. But that is pretty easy to encapsulate and work around.

Other than that, there really aren't issues, assuming you're careful in your code. For instance, in Head Rush Ajax, some fairly complex DOM interactions, DHTML, XML parsing, JSON parsing, and CSS manipulation are performed, all without any browser-specific code. So it's mostly just being careful about what properties you use.

Thanks
Brett
I have mixed feelings about JSON, to be honest. I don't particularly love it as a data format for Ajax, because I don't feel it's that readable. It's arguably less verbose -- and therefore, also in theory, faster to send across the network -- than XML, but marginally so. And I don't think it's very intuitive.
That said, there are a ton of people who really like JSON, and I'm not religious about what data format you use, so it's covered. In fact, I really treat it in the book as a competitor to XML (they have a boxing match, so to speak), and compare and contrast them heavily.
In terms of depth of coverage, I think you'll find that once you get the basics on how JSON looks and is formatted (which is covered), it's a piece of cake. So I think most people looking for anything but the most extreme, advanced, unusual use-cases for JSON will find everything they need for JSON in the book.
But then again, I'm biased :-)

Thanks
Brett
Yeah, I was gonna add the same thing. IE has some quirks that aren't too bad to deal with -- as long as you know what they are. setAttribute() doesn't work, and neither does addEventHandler() and the like. A bit of a pain, until you get used to using the properties that work across all modern browsers.

Thanks
Brett
Hi there-

Yeah, the book really focuses on the client-side. All the server-side examples are in PHP, simply because PHP is one of the most "readable" languages. But, as you'll read in the intro to Head Rush Ajax, all the applications are written with a clean separation between the client-side and server-side. So you could easily replace all the examples with Java servlets or Ruby with little effort at all.
The PHP code is all in the book, and it's all heavily annotated; and because PHP is so readable, I think you don't need to know much PHP at all (assuming you know -some- programming language, even if it is just JavaScript) to follow along.
To be honest, I actually started by using a Java servlet in Chapter 1, and it was just too confusing. If you didn't really know servlets, you got lost; and that distracts from the core message, which is Ajax, not server-side programming.
Also, all the code is both running online, and downloadable, at http://www.headfirstlabs.com/books/hrajax/, so you can check it out ahead of time.

Enjoy!
Brett
Interesting question, and it's one I'd like to answer a little more fully than you might expect.
A lot of the books -- and material online -- about Ajax assumes that you really fundamentally understand what Ajax is about. I'm not just talking about knowing how to code JavaScript or JSON, but about really getting the Ajax programming paradigm. Unfortunately, I think most people -don't- really get that paradigm.
Ask most people what a web browser is, and they'll tell you it's the program you use for viewing web pages. But it's far more -- it's an entire execution environment for displaying, rendering, and running several different languages (HTML, CSS, JavaScript). And until you really get a hold of the browser, and its role in web applications, most of what you can learn about patterns and usage of Ajax is really sort of useless; you'll use the right pattern without understanding why.
So the long-winded answer is that in some ways, Head Rush Ajax is an introduction to Ajax. But, it's the introduction that most programmers never got. So we spend a ton of time on asynchrony, because -- and this is the truth -- most programmers know what asynchrony means, but don't really understand the issues involved. Google Maps, for example, uses Ajax, but isn't at all asynchronous in any real sense. Ditto for apps like Flickr that we've long held up as Ajax poster-childs. They're great apps, killer, interactive, very Web 2.0, but not asynchronous. Read Chapter 3 of Head Rush Ajax, and you'll thoroughly understand why -- and how you could change them to be asynchronous.
So that's the philosophy of Head Rush Ajax. We want you to get these "basic, intro" concepts (terms that I hate in this context) in a way that means you really understand them. And along the way, you'll obviously pick up lots of patterns and watch-out's. There's a chapter that deals extensively with using two request objects, managing multiple requests in JavaScript, and multiple asynchronous calls at one time. But we don't call it a pattern, because it's just a natural thing you have to know in asynchronous programming.
We spend tons of time in Chapter 6 talking about when XML makes sense, and especially when it doesn't; that's a pattern, but it's presented in an unusualy way (the server sitting on a couch with his shrink, believe it or not!).
So I think you'd be pleased and challenged. A cursory review might make the book seem basic, but a thorough reading will leave you with a strong understanding of Ajax, and you often won't need patterns from other books -- they'll be obvious to you because you understand the core Ajax paradigm so well. Then, if you pick up some other books on Ajax (which you should!), you'll see beyond the surface details. And that's a good thing :-)

Thanks
Brett
Hey, thanks all.

Sorry for the delay in getting on; in true author fashion, I had a login issue. Anyway, fire away, I'll be checking in several times each day and trying to answer as many questions as possible without just saying, "Hey, go buy the book!"

:-)

Thanks
Brett
Well, you caught us. I mean, we weren't really trying to hide anything, but we also weren't exactly announcing anything either. Head Rush is neither a Head First book in disguise, nor a totally new series. It's -- to a large degree -- sort of a little brother to Head First. Or maybe a faster brother. Or a brother without a weight problem... umm... well... ok, the metaphors aren't working, so let's try another tack.

Head First is, simply put a learning guide. Head Rush is more of a "Your plane crashed, landed on a deserted island, and realize that only Ajax (or whatever else) will save you from the monster..." (or is that from a TV series? Maybe a few of them, actually...)

So Head Rush Ajax will get you up and running on Ajax in an unbelievably short time. These aren't 600 page books; they're 250 or so, fast attack, Head First with about three espressos. Plenty of Head First elements appear, but you'll also see loads of new ideas, a slightly edgier look and feel -- 50s landscapes replaced by Breakneck pizza, old world sensibility replaced by pop culture and 80s rock, Norman Rockwall replaced by Neal Stephenson. But have no fear; you'll find the same amazing Head First sensibilities, exercises, puzzles, and approaches to brain-friendly learning, just at a faster pace. Honestly, we're all thrilled about the spin-off, and think you'll love it...

...coming soon to a store near you!

Thanks
Brett McLaughlin
Head First Managing Editor
Head Rush Ajax Co-Author
16 years ago
Enums are, in terms of usage, a third construct, in addition to classes and interfaces. At an implementation level, that's not quite true -- but at an implementation level, an interface is treated as a class as well, so this is nothing new to Java folks.

In terms of what I cover, I treat Enums pretty thoroughly. It was actually the first chapter I wrote, and was pretty exhaustive. Here's what the labs deal with:

Creating an Enum
- What is an enum?
- How does it work at an implementation level?
- How is it similar/different from constants like public static final SOME_CONST = 28?

Inline Enums vs. "Standalone" Enums (where the Enum is its own class file)

Iterating over Enum values
- Using enums with the new Tiger for/in loop

Switching on Enums (using case and switch)
- Handling added values with the default case

Collections and Enums
- EnumMap
- EnumSet
- Bitwise operations

Building out Your Enums
- Adding methods
- Value-specific method bodies

Implementing interfaces with Enums

I also cover some of the "can't do"s, like extending an enum or trying to create one "manually". So I think the coverage is pretty throrough -- of course, I'm biased :-)

Thanks
Brett
17 years ago