ELABORATION RESTful APIs and Developer Keys Most RESTful APIs require a

Elaboration restful apis and developer keys most

This preview shows page 304 - 306 out of 517 pages.

ELABORATION: RESTful APIs and Developer Keys Most RESTful APIs require a developer key; some provide it free, others make you pay. For example, a free Google API key allows you to use various Google services such as maps and geocoding. In some cases, like TMDb, you simply embed the key in the URL of each call, using SSL to transmit requests securely (Section 12.9 ) so malicious users cannot snoop on the key. However, API endpoints that access user-specific data often require more sophisticated third-party authentication, usually using a scheme such as OAuth, which is introduced in Section 5.2 .
Image of page 304
Self-Check 8.1.1. True or false: in order to use the TMDb API from another language such as Java, we would need a Java library equivalent to themoviedb gem. False: the API consists of a set of HTTP requests and JSON responses, so as long as we can transmit and receive bytes over TCP/IP and have the ability to parse strings (the JSON responses), we can use the APIs without a special library. 8.2 FIRST, TDD, and Red–Green–Refactor Developers “tossing their code over the wall” to Quality Assurance (QA) is not typical for SaaS applications, as are the days of QA engineers manually exercising the software and filing bug reports. Indeed, the idea that quality assurance is the responsibility of a separate group rather than the result of a good process is considered antiquated for SaaS apps. Today’s SaaS developers bear far more responsibility for testing their own code and participating in reviews; the responsibilities of QA have largely shifted to improving the testing tools infrastructure, helping developers make their code more testable, and verifying that customer-reported bugs are reproducible, as we’ll discuss further in Chapter 10 . As we shall see, the Agile lifecycle also expects the QA team to be the developers. Testing today is also far more automated. Automated testing doesn’t mean that tests are created automatically for you, but that the tests are self-checking: the test code itself can determine whether the code being tested works or not, without requiring a human to manually check test output or interact with the software. A high degree of automation is key to supporting the five principles for creating good tests, which are summarized by the acronym FIRST: F ast, I ndependent, R epeatable, S elf-checking, and T imely. F ast: it should be easy and quick to run the subset of test cases relevant to your current coding task, to avoid interfering with your train of thought. We will use a Ruby tool called Autotest to help with this. I ndependent: No test should rely on preconditions created by other tests, so that we can prioritize running only a subset of tests that cover recent code changes. R epeatable: test behavior should not depend on external factors such as today’s date or on “magic constants” that will break the tests if their values change, as occurred with many 1960s programs when the year 2000 arrived .
Image of page 305
Image of page 306

You've reached the end of your free preview.

Want to read all 517 pages?

  • Spring '19
  • Dr.Marcos

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors