PHP Web Services
APIs for the Modern Web
Publisher: O'Reilly Media
Final Release Date: April 2013
Pages: 118

Whether you’re sharing data between two internal systems or building an API so users can access their data, this practical book provides everything you need to build web service APIs with PHP. Author Lorna Jane Mitchell uses code samples, real-world examples, and advice based on her extensive experience to guide you through the process—from the underlying theory to methods for making your service robust.

PHP is ideally suited for both consuming and creating web services. You’ll learn how to use this language with JSON, XML, and other web service technologies.

  • Explore HTTP, from the request/response cycle to its verbs, headers, and cookies
  • Determine whether JSON or XML is the best data format for your application
  • Get practical advice for working with RPC, SOAP, and RESTful services
  • Use a variety of tools and techniques for debugging HTTP web services
  • Choose the service that works best for your application, and learn how to make it robust
  • Learn how to document your API—and how to design it to handle errors
Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyPHP Web Services
 
3.6

(based on 10 reviews)

Ratings Distribution

  • 5 Stars

     

    (4)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (2)

  • 1 Stars

     

    (1)

60%

of respondents would recommend this to a friend.

Pros

  • Easy to understand (8)
  • Concise (5)
  • Helpful examples (5)
  • Well-written (5)

Cons

  • Too basic (4)
  • Not comprehensive enough (3)

Best Uses

  • Novice (8)
  • Student (6)
  • Intermediate (5)
    • Reviewer Profile:
    • Developer (9)

Reviewed by 10 customers

Sort by

Displaying reviews 1-10

Back to top

 
5.0

Straight Forward Dive Into Web Services

By Eric M

from Appleton, WI

About Me Developer, Maker

Verified Buyer

Pros

  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Intermediate
    • Novice
    • Student

    Comments about oreilly PHP Web Services:

    There comes that time in a developer's life where he needs, not the basics of how to use a language, but rather the basics of some of the building blocks which make his business applications sing. Web Services are one of the staples of modern web-based applications which tie the world together. This book is easy to read, parses out all the elements involved into logical chapters, and makes for a great introduction or reference guide; take your pick.

    (1 of 2 customers found this review helpful)

     
    1.0

    Not technical at all.

    By SneakyDave

    from Omaha, NE

    About Me Developer

    Verified Buyer

    Pros

      Cons

      • Not comprehensive enough
      • Too basic

      Best Uses

      • Student

      Comments about oreilly PHP Web Services:

      I was expecting to see some real world solution in this book, but it appears to be just a bunch of theory.

      (0 of 1 customers found this review helpful)

       
      4.0

      Great for those new programmers

      By Tony

      from Mexicali, BC

      About Me Developer

      Verified Reviewer

      Pros

      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Intermediate
        • Novice

        Comments about oreilly PHP Web Services:

        I'm a php-developer since 8 years ago and I already knew how to work with web services.

        I learned a few tips due this book teach you the "basic theory" and good practices to introduce yourself into web services.

        I recommend this book for those who have basic, but strong, knowledge of php.

         
        4.0

        Great overview of web services

        By Eric Hogue

        from Montreal, Canada

        About Me Developer

        Verified Reviewer

        Pros

        • Concise
        • Easy to understand
        • Helpful examples

        Cons

          Best Uses

          • Intermediate
          • Novice

          Comments about oreilly PHP Web Services:

          This book is a nice overview of what developers need to know to start writing web services.

          It touches every aspect of the subject. From the basics of HTML, the usual data format, the type of services to the tools needed for testing and debugging.

          It's concise, so you should be able to get started writing your own services pretty fast.

          (1 of 1 customers found this review helpful)

           
          5.0

          A concise and informative read

          By Tocacar

          from London

          About Me Developer

          Verified Reviewer

          Pros

          • Concise
          • Easy to understand
          • Helpful examples
          • Well-written

          Cons

            Best Uses

            • Intermediate
            • Novice
            • Student

            Comments about oreilly PHP Web Services:

            Web Services was a new topic for me, so I bought this book as my entry point to the subject. I found the chapters sensibly organised and the text well written and easy to follow. It is a short book, but it's jam packed from cover to cover with useful, relevant information. None of the rambling diatribes, or personal rants you needn't go far to discover online when it comes to SOAP or REST. Just straight forward factual information and some helpful, balanced adviced based on personal experience (and at a bargain price too!). Lorna is widely considered an expert in this topic and it shows.

            I had to use a SOAP API for a work project so I picked out the relevant chapters and got stuck in. I didn't find it necessary to read the book from start to finish. The book saved me a few hours I would otherwise have spent googling around for tidbits on how to get started. I used one of the recommended free tools from Chapter 9 when I got stuck and it saved the day.

            A few months later I picked up the book again and this time read it through from the start. The reason begin that I was readying myself to begin contributing to the http://joind.in open source project (run by Lorna incidentally) that is mentioned in the book. They're building a new responsive version of the site that is largely on a REST API so I wanted to be up to speed and feel like I knew what I was doing. I've only made a couple of small contributions so far, but straight away I used some of the things I learned from this book. I understood the concept and was able to familiarise myself with the code base quickly and easily because of what I had learned and I felt confident doing it.

            If you buy the book and want a way to put your new knowledge to good use, I highly recommend joining the friendly joind.in team and helping out (http://joind.in/about). I'm quite baffled by the other luke-warm reviews to be honest.

            (2 of 4 customers found this review helpful)

             
            2.0

            Nice try!

            By Jochen Kirstätter

            from Mauritius

            About Me Developer

            Verified Reviewer

            Pros

            • Easy to understand

            Cons

            • Lots Of Assumptions
            • Too basic

            Best Uses

            • Novice

            Comments about oreilly PHP Web Services:

            Initially, I was astonished that a small book like 'PHP Web Services' would be able to cover all the interesting topics about APIs and Web Services, independently whether they are written in PHP or not. And unfortunately, the title isn't able to stand up to the readers (or at least my) expectations. Maybe as a light defense, there is no usual paragraph about the intended audience of that book, but still I have to admit that the first half (chapters 1 to 8) are well written and Lorna has her points on the various technologies. Also, the code samples in PHP are clean and easy to understand.

            With chapter 'Debugging Web Services' the book started to change my mind about the clarity of advice and the instructions on designing and developing good APIs. Eventually, this might be related to the fact that I'm used to other tools since years, like Telerik Fiddler as HTTP proxy in order to trace and inspect any kind of request/response handling. Including localhost monitoring, SSL certification acceptance, and the ability to debug mobile devices, especially iOS-based ones. Compared to Charles, Fiddler is available for free.

            What really got me off the hook is the following statement in chapter 10 about Service Type Decisions: "For users who have larger systems using technology stacks such as Java, C++, or .NET, it may be easier for them to integrate with a SOAP service." WHAT? A couple of pages earlier the author recommends to stay away from 'old-fashioned' API styles like SOAP (if possible). And on top of that I wonder why there are tons of documentation towards development of RESTful Web Services based on WebAPI. The ASP.NET stack clearly moves away from SOAP to JSON and REST since years! Honestly, as a software developer on the .NET stack this leaves a mixed feeling after all.

            As for the remaining chapters I simply consider them as 'blah blah' without any real value and lots of theoretical advice. Related to the chapter 13 about 'Documentation', I just had the 'pleasure' to write a C#-based client against a Java-based SOAP Web Service. Personally, I take the WSDL as the master reference in the first place and Visual Studio generates all the stub types involved in the communication. During the implementation and testing I came across a 'java.lang.NullPointerException' in various methods and for various method parameters. The WSDL and the generated types were declared as Nullable, so nothing to worry about, or? Well, I logged in a support ticket, and guess what was the response to that scenario? "The service definition in the WSDL is wrong, please refer to the documentation in order to use the methods and parameters correctly" - No comment!

            Lorna's title is a quick read and in some areas she has good advice on designing and implementing Web Services and APIs. But roughly 100 pages aren't enough to cover a vast topic like that. After all, nice try and I'm looking forward to an improved second edition.

            (9 of 11 customers found this review helpful)

             
            2.0

            Way too basic. Not web services.

            By Alan

            from Texas

            About Me Developer

            Verified Reviewer

            Pros

            • Easy to understand
            • Well-written

            Cons

            • Not comprehensive enough
            • Too basic

            Best Uses

            • Student

            Comments about oreilly PHP Web Services:

            I was excited when I bought the book because I was expecting a little bit more of depth when it comes to PHP Web Services.

            I think that if you're going to name a book "PHP Web Services" you should write more than 20 pages on important topics such as RPC, SOAP and REST.

            For example, these are the number of pages for each of the chapters mentioned above:

            RPC Chapter - 2 pages long
            SOAP Chapter - 6 pages long
            REST Chapter - 12 pages long

            Web Services total pages - 20 pages long.

            It has a few snippets of code with very poor coding practices, it's disappointing that the author claims to be a senior and experienced PHP developer, and cannot even create a good and maintainable class.

            The chapter about building a robust services only talks about naming conventions, and finalizes the chapter saying that robustness is the ability to determine how the API will behave under good and bad situations, but doesn't provide any content on the topic.

            Then the author writes about good documentation, but then again it fails to get into any kind of depth on the topic.

            To sum up, while the book is good for novices with 0 knowledge about the HTTP stack. Any developer with a few months of experience will find this book quite boring. The book has potential, I'm looking forward for updates.

            (1 of 1 customers found this review helpful)

             
            5.0

            Great Read

            By @danielgsims

            from Flint, MI

            About Me Developer

            Pros

            • Accurate
            • Concise
            • Easy to understand

            Cons

              Best Uses

              • Novice
              • Student

              Comments about oreilly PHP Web Services:

              This short book is a great introduction to HTTP and Web Services in PHP. It was a quick read and Lorna Jane gives a great overview of HTTP, REST, XML-RPC and SOAP. You're armed with enough information to move your research or development to the next stage. I'd definitely check out this book for anyone who would like to begin writing web services or using existing services and would like to conceptually understand them better.

              (5 of 9 customers found this review helpful)

               
              3.0

              OK, but not great.

              By Nick

              from East Yorkshire, UK

              Pros

                Cons

                • Not comprehensive enough
                • Too basic

                Best Uses

                • Novice
                • Student

                Comments about oreilly PHP Web Services:

                I purchased the Early Release version of this title, as I thought it would help me with my University dissertation, which requires developing a web service which an iOS App will talk to; so was looking for something to help me understand the concepts.

                I am now on Chapter 4, having read 27 of the 182 pages, and feel that the book has not really told me anything I don't already know.

                I may be proved wrong as I continue through the book, however am not holding my breath at this stage.

                This books use of the English language is not that great at times, especially as the author is English "Consider the simple form in Figure 4-1, which simply allows..." - surely you don't need to use "simple" and "simply" in the same sentence?

                (3 of 4 customers found this review helpful)

                 
                5.0

                Well done!

                By Matt Frost

                from Highland, IN

                About Me Developer

                Pros

                • Accurate
                • Concise
                • Easy to understand
                • Helpful examples
                • Well-written

                Cons

                  Best Uses

                  • Intermediate
                  • Novice

                  Comments about oreilly PHP Web Services:

                  I found this book to be very helpful in getting me over a few concepts that were tripping me up when it came to API design and understanding what's happening when I'm consuming web services. Concepts like content negotiation and working with HTTP headers were explained in a way that was easy for me to understand. Very pleased that I bought and read this book, worth every penny!

                  Displaying reviews 1-10

                  Back to top

                   
                  Buy 2 Get 1 Free Free Shipping Guarantee
                  Buying Options
                  Immediate Access - Go Digital what's this?
                  Ebook: $12.99
                  Formats:  DAISY, ePub, Mobi, PDF
                  Print & Ebook: $16.49
                  Print: $14.99