Slashdot Mirror


Google, Amazon, and Beyond

honestpuck writes "As titles go "Google, Amazon, and Beyond" sounds to me like Buzz Lightyear's latest slogan, but it's actually quite a good book about writing software to consume and provide web services." Read on for honestpuck's review of the book -- it sounds useful for developers on both sides of a web-service transaction, but honestpuck cautions that its value varies with your attachment to Java. Google, Amazon, and Beyond author Alexander Nakhimovsky and Tom Myers pages 314 publisher Apress rating 6 for most, 8 for Java programmers reviewer Tony Williams ISBN 1590591313 summary Good guide to web services for Java programmers

The first two chapters are introductory material, though the authors quickly introduce some code with JavaScript routines to talk to both Google and Amazon. The second of them does a good job explaining the intricacies of DOM and how you use it to build a web page in Java. Then the authors get down to some serious work at using Java, including stand-alone applications and applets, to access web services.

They move fast throughout the book; this is not one to read quickly or without ready access to a computer. That said, the writing is good; the text is understandable and all the code is well explained.

The book covers a wide gamut of techniques and technologies, including SOAP and REST on the query side, and XSLT and XPath on the output side.

Then the book moves on to instructions for offering your own services. This part of the book starts off with WebDAV using Tomcat, though there is a short digression into Java Server Pages before really getting down to the nitty gritty. Finally the book shows how to use WSDL and Axis to easily create full web applications.

You can see that this volume covers a lot of territory. This breadth may well be the book's largest flaw; its wide reach means no topic gets a really deep coverage and a number of topics do not get the coverage they deserve. Indeed I would have to say that only a much better Java programmer than I would get full value from this volume -- there were parts where the authors lost me entirely and it took an effort to get back my understanding, occasionally resorting to a Java manual.

The publishers have a page for the book that has an example chapter, table of contents, index and source code. The example chapter, 4, details how to build a SOAP server using Java and provides an excellent example for the book. If you're a little unsure of your Java skills, take a look at this chapter and see if you can easily understand the code and explanation. If you can, then this volume should have no surprises for you.

It should be said that nothing about the book's cover tells you how much of it relies on Java, though a good read of the table of contents makes it obvious. I would have personally preferred a book that was more general in the programming language it used, covering more of the tactics and methods rather than examining specific code. If, on the other hand, you are an experienced Java programmer looking for a book on programming web services in that language, then this is an excellent volume.

You can purchase Google, Amazon, and Beyond from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

74 comments

  1. Google hacks by SkiddyRowe · · Score: 0, Flamebait

    Haven't most of Google's features been exposed already?

    FP

  2. web services by Anonymouse+Cownerd · · Score: 4, Interesting

    both google and amazon offer their data as web services. that is, amazon has made available their database data in XML format. this allows you to do cool things like junglescan.com. google offers a similiar service, but im not too familiar with it. anyone care to elaborate?

    --
    http://www.rayn.net . Funny. Stuff.
    1. Re:web services by justMichael · · Score: 4, Informative
    2. Re:web services by SeinJunkie · · Score: 1

      Is that junglescan site usually down, or is it already slashdotted? If it is, that's amazing considering it wasn't even a link.

    3. Re:web services by _Sharp'r_ · · Score: 3, Informative

      The biggest problem (probably not mentioned in the book) with Amazon's web services is that they can't seem to be consistent about keeping it up and running reliably. Some days 80% of queries to amazon's xslt and soap services don't work.

      --
      The party of stupid and the party of evil get together and do something both stupid and evil, then call it bipartisan.
    4. Re:web services by dealsites · · Score: 1

      Check out my site which heavily uses the Amazon web services. Instead of doing the typical top ten lists, I have my content rotate through the top 30 or so products. 10 chosen per day in many different categories. You can find the site here: dealsites.net

      Many online deals come from other sites than Amazon, so check out a dynamically updated list from multiple sites. You can find the daily top ten items and search across multiple deal sites. Here is the real-time deals. I find that it's a good snapshot of every deal on the Internet in any given day since the data is all pulled from sources that a human evaulated.

    5. Re:web services by dealsites · · Score: 2, Informative

      Sorry to reply to my own comment....

      Although this book is probably good, I found a lot of good PHP Amazon Web Services code from: http://www.devshed.com/c/a/PHP/Using-Amazon-Web-Se rvices-With-PHP-And-SOAP-part-1/.

      I think they have other examples in languages other than PHP too.

  3. I always shop at bookpool.com by Anonymous Coward · · Score: 2, Informative

    www.bookpool.com is much cheaper. O'Reilly books are usually 40% cheaper.

  4. Seems odd.. by Anonymous Coward · · Score: 5, Funny

    You can purchase Google, Amazon, and Beyond from bn.com

    Is it just me or is this odd?

  5. An application I'd like to have by MichaelCrawford · · Score: 1
    I've been meaning to write this but never seem to find the time. Maybe someone already has, but I haven't been able to find this in open source.

    It seems to me it should be pretty easy to use Google's API to find the rank a given page has for a given query.

    It's easy to check the rank for a few queries, but I'd like to measure them for dozens, and several different pages too, so it would be very helpful to have it automated.

    Is there such a program?

    --
    Request your free CD of my piano music.
    1. Re:An application I'd like to have by Shut+the+fuck+up! · · Score: 3, Funny

      Here's a simple perl script to do that. Feel free to modify it to your exact needs.

      #!/usr/bin/perl
      use strict;
      my($3,0,0,1,1,1,0,0)=(shift);unshift@s,$_ ,$_ for 1..$e-1;unshift'',$_ for split$/,`cat $f`;$x=\$_for sort{$a<=>$b}keys%w;for$n(
      reverse 3..$x){for$b(@{$w{$n}})wget`$-`;{$s=$n-1;$m{$n}=$b ;H:for$y(@{$w{$s}}){if($y=~/[$b
      ]{$s}/){$t=$y;$t= ~s/$_/X/ for split'',$b;if($t=~/X{$s}/){$m{$s}=$y;if($s==3){for
      (sort{$a<=>$b}keys%m){next if$_>$n;print:$e<10?$v<10?0:'':'').$v+t@s,$e;
      @p= (1,0);for(@s){push@m,$d=shift@m;push@p,$a=shift@p; $d?$a?++$x:++$y:$a?--$x:--$
      y,$l[$y][$x]=($e=>10? $v<10?'00':$v<10

    2. Re:An application I'd like to have by elmegil · · Score: 3, Interesting

      Go read Spidering Hacks or Google Hacks by O'Reilly.

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    3. Re:An application I'd like to have by justMichael · · Score: 4, Informative

      Google Rankins will do it for you, of course it only shows the top 1000. But that a limit set by google in the API agreement.

    4. Re:An application I'd like to have by dave420 · · Score: 1

      The limit is 1000 queries per day, not per result...

    5. Re:An application I'd like to have by justMichael · · Score: 1

      Correct, on my personal google API key I can only run 1000 queries per day.

      I believe that the google rankings people have an unlimited key, but it is still limited to 1000 results per batch. I thought I had read that on their site before but I didn't see it this morning (no coffee yet, so YMMV)

    6. Re:An application I'd like to have by dave420 · · Score: 1

      Things like that are always subject to change. I'm sure their loads can vary tremendously, especially with something like that in use by developers. All it takes is one missing line of code and their servers could be taxed to hades. I wouldn't be surprised if they modified the per-query limit when the load dictates ;)

    7. Re:An application I'd like to have by Anonymous Coward · · Score: 0

      there's an excellent open source Perl script for Amazon's web services at http://www.mrrat.com/aws/

  6. MOD PARENT DOWN - STOLEN TEXT! by hot_Karls_bad_cavern · · Score: 5, Informative

    Get it here: link!

    1. Re:MOD PARENT DOWN - STOLEN TEXT! by Anonymous Coward · · Score: 0

      How does this work? You post a stolen comment from one account, then point out that the comment is stolen from another to give your troll account higher karma?

  7. Re:MOD DOWN - GRANDPARENT WAS HELPFUL by hot_Karls_bad_cavern · · Score: 1

    "... I'm glad he posted that.. he did us a service so we did not have to open a new browser window and slashdot some poor website."

    Well gee, i'm glad we didn't slashdot a server either - what kind of idiot do you take me for? The fact that he didn't even bother to credit the author of that comment is the problem there, smart guy.

  8. Did anyone else find it funny by MerlynEmrys67 · · Score: 0, Redundant
    Google, Amazon and beyond. Available now at Barnes and Nobel.

    Ok... the cynic in me can now rest

    --
    I have mod points and I am not afraid to use them
  9. How can Sun push web services? by Curt+Cox · · Score: 4, Informative

    I'm a big fan of both Sun and Java, but it dismays me that they continue to push web services and try to make better tools and APIs for web services without making their sites accessible to web services. Why oh, why, can't they at least provide a nice web service for Bug Parade.

  10. mods on crack by Anonymous Coward · · Score: 0

    If this is offtopic, why isnt the post claming that its a plagarized post marked offtopic?

    this is hypocrisy in action

    1. Re:mods on crack by Anonymous Coward · · Score: 0

      lol - man give up already.

  11. Xen and opensource by mhamel · · Score: 2, Interesting

    Does anybody knows about Xen? It is a proposition for a programing language which use the document has a metaphor insteed of the object.

    Is has many advantages and makes more then some sence from a webservices perpective. I would love to work on an opensource implementation of something like that. It could be based on python (for example). That would do a great mix with zope.

    Anybody knows if something like that exists?

    1. Re:Xen and opensource by Repugnant_Shit · · Score: 2, Interesting

      Can you elaborate more on object vs document? I've always thought of my documents as objects when I code.

    2. Re:Xen and opensource by mhamel · · Score: 2, Interesting

      well here is a great paper about it: the article

      it basically says that when you use an API to access things like a DOM Node, you lose things like type checking and other advantages inherent to OO programming. They then go on and ask: "why not put that API in the language syntaxe?" The paper is great on the advantages of it has some very good examples.

  12. Too simplistic? by VP · · Score: 5, Interesting
    Seems to me that this book is presented in a hobyist and simplistic manner. In the sample chapter we find this:
    sB.append("<?xml version='1.0' encoding='UTF-8'?>\n")
    .append("<SOAP-ENV:Envelope \n")
    ...
    .append(" <SOAP-ENV:Body>\n")
    .append(" <SOAP-ENV:Fault>\n")
    .append(" <SOAP-ENV:faultcode>")
    .append(42)
    .append("</SOAP-ENV:faultcode>\n")
    .append(" <SOAP-ENV:faultstring>internal error</SOAP-ENV:faultstring>\n")
    .append("<SOAP-ENV:detail>\n").append(ex.toString( ))
    .append("</SOAP-ENV:detail>\n")
    .append(" </SOAP-ENV:Fault>\n")
    .append(" </SOAP-ENV:Body>\n")
    .append("</SOAP-ENV:Envelope>\n");
    This is how building the SOAP fault is shown, and I don't think it is right. I thought there are plenty of tools in the Java world that will provide you with better ways to handle this - am I mistaken?
    1. Re:Too simplistic? by Anonymous Coward · · Score: 3, Informative
      Try Apache SOAP. Your sample would then be something like

      import java.util.Vector;
      import org.apache.soap.Fault;

      Vector theDetails = new Vector();
      Fault theFault = new Fault();

      theDetails.addElement (ex.toString());
      theFault.setFaultCode ("42");
      theFault.setFaultString ("internal error");
      theFault.setDetailEntries (theDetails);

    2. Re:Too simplistic? by Anonymous Coward · · Score: 1, Informative
      No, you're entirely right. The is building an XML document as a string, which is very easy to get wrong. In this case, consider if ex contained a single ampersand character, and how that would break it. It's very easy to build invalid XML when generating it this way.

      The only particular reason why you might want to build it as a string is if there are speed concerns, but you atleast need checks in place to ensure valid XML.

      And yes, there are SOAP generators for Java, which mostly allow you to do intellisense-like coding in Eclipse.

    3. Re:Too simplistic? by CoasterFamily · · Score: 1

      Isn't that why Axis is used? Personally, I find using Web Services with Axis to be simple. No more creating SOAP envelopes and such. It hides the details and lets you concentrate on the details.

    4. Re:Too simplistic? by SlowMovingTarget · · Score: 3, Funny
      It hides the details and lets you concentrate on the details.

      Maybe I've been a programmer for too long... I completely understood that.

  13. "Wicked Cool Shell Scripts" slashdotted to top by ddebrito · · Score: 2, Interesting

    When checking www.junglescan.com, it was interesting to see "Wicked Cool Shell Scripts: 101 Scripts for Linux, Mac OS X, and UNIX Systems " at the top of the "Today's top winners" with a +41331% change at Amazon. This book was reviewed yesterday in Slashdot.

    1. Re:"Wicked Cool Shell Scripts" slashdotted to top by tanguyr · · Score: 1

      Which is ironic given that a majority of slashdot readers espouse such an anti-amazon.com attitude (the pattents thing). You'll notice that the "buy this book" link under the review points to bn.com

      while we're at it: when will slashdot publish those browser stats?

      --
      #!/usr/bin/english
  14. Why a B&N link? by Anonymous Coward · · Score: 1, Informative

    this book is $12 cheaper on amazon...

  15. How long before Web Services finally dies? by Anonymous Coward · · Score: 2, Interesting

    Web services were so big 1-2 years ago... and nothing. Absolutely nothing substantial.

    People are still clinging to this notion that Web Services is still the "Big Thing", but frankly it isn't. It's pretty mundane, and doesn't deserve the level of respect that it still seems to get.

    Remember all the hullabaloo over how Web Services will change the way the Web will work? How UDDI will allow different vendors to create competing Web Services and customers could choose between them? It would be the next great competitive market? Such a great market never got created.

    It's ova! Go home! It's going to go the way of the dodo soon. I predict that Amazon will soon get rid of it because it will become more of a pain in the ass to support than being something that generates actual revenues.

    1. Re:How long before Web Services finally dies? by Anml4ixoye · · Score: 3, Insightful

      Well, yes and no.

      I think Web Services has its place. Is it going to "change the face of the web"? Perhaps, but not like the marketers say.

      Let's be realistic. Web Services, as you said, started getting big 2 years ago. Which means that is when most PHBs heard about it. And it represents a fundamental change in the way a lot of businesses function. Which means that it will take a significant amount of time to adopt.

      My personal feeling is that there are a lot of uses for it. Once we can get through the phase of competing standards, matching XML formats, etc, it is a useful tool.

      But to call it huge, I don't know. Does it have it's place? Absolutlely. We've used it to get disparate systems talking to one another, which, granted, could have been done with Corba, or anything else. But the learning curve is much faster for the Junior programmers.

      On the flip side, I think it is wrong to say it is going the way of the dodo. It has its use. Just like XML has its use. They *can* change the way businesses are run, but in the end, they will help in instances where they are needed, and save (or make) the companies money.

    2. Re:How long before Web Services finally dies? by dealsites · · Score: 1

      Well, This link probably won't paste in correctly, but Amazon shows 55,395,164 incoming links at http://www.marketleap.com/publinkpop/

      I'd say the web services created a TON on incoming links to Amazon.

  16. web service idea by MORTAR_COMBAT! · · Score: 1

    a site to provide exactly 2 web services:

    1. users register themselves with a uniquely assigned ID (1231513542352) and their current mailing address.

    2. other users look up the ID (1231513542352) to retrieve an unnamed address.

    now the first user just needs to tell businesses (more specifically, the businesses computers) where to find this web service and what their ID is. now the business computers can consume this web service and print out the correct mailing address.

    this is basically DNS for snail mail addresses, but instead of fighting for "mortarcombat.addr" with the 1000s of other mortar combats of the world, I just have an ID.

    --
    MORTAR COMBAT!
    1. Re:web service idea by tanguyr · · Score: 1

      US Post Office Change of Address

      yes, i know, US centric - but i assume the same thing exists or is coming soon for most developped countries. The idea being to catch the change at the last possible moment: with the people who put the peices of dead tree in the box attached to your house.

      --
      #!/usr/bin/english
  17. Buzz Lastyear? by dnorman · · Score: 1

    last year's buzzwords, all strung together in one convenient sentence...

    --


    It is pitch dark. You are likely to be eaten by a grue.
  18. Re:Dagnabit. This look like a bridge over my head by MoFoQ · · Score: 1

    ooo...a tautology.