Transfer or REST principle in which each controller action describes a single

Transfer or rest principle in which each controller

This preview shows page 72 - 75 out of 517 pages.

Transfer or REST principle, in which each controller action describes a single self-contained operation on one of the app’s resources . Modern SaaS frameworks such as Rails capture a decade’s worth of developer experience by encapsulating these SaaS design patterns so that SaaS app writers can easily apply them.
Image of page 72
2.1 100,000 Feet: Client-Server Architecture Since the best way to learn about software is by doing, let’s jump in right away. If you haven’t done so already, turn to Appendix A and get this book’s “bookware” running on your own computer or in the cloud. Once it is ready, Screencast 2.1.1 shows how to deploy and login to your Virtual Machine and try an interaction with the simple educational app RottenPotatoes, which aspires to be a simplified version of the popular movie-rating Web site RottenTomatoes . Screencast 2.1.1: Getting Started Once logged in to your VM, the screencast shows how to open a Terminal window, cd (change to) the directory Documents/rottenpotatoes , and start the RottenPotatoes app by typing rails server . We then opened the Firefox web browser and entered into the address bar and pressed Return, taking us to the RottenPotatoes home page. What’s going on? You’ve just seen the simplest view of a Web app: it is an example of the client- server architecture . Firefox is an example of a client: a program whose specialty is asking a server for information and (usually) allowing the user to interact with that information. WEBrick, which you activated by typing rails server , is an example of a server: a program whose specialty is waiting for clients to make a request and then providing a reply . WEBrick waits to be contacted by a Web browser such as Firefox and routes the browser’s requests to the RottenPotatoes app. Figure 2.1 summarizes how a SaaS application works, from 100,000 feet. Figure 2.1: 100,000-foot view of a SaaS client-server system.
Image of page 73
Figure 2.2: Using altitude as an analogy, this figure illustrates important structures in SaaS at various levels of detail and serves as an overall roadmap of the discussion in this chapter. Each level is discussed in the sections shown. Distinguishing clients from servers allows each type of program to be highly specialized to its task: the client can have a responsive and appealing user interface, while the server concentrates on efficiently serving many clients simultaneously. Firefox and other browsers (Chrome, Safari, Internet Explorer) are clients used by millions of people (let’s call them production clients ). WEBrick, on the other hand, is not a production server, but a “mini-server” with just enough functionality to let one user at a time (you, the developer) interact with your Web app. A real Web site would use a production server such as the Apache web server or the Microsoft Internet Information Server , either of which can be deployed on hundreds of computers efficiently serving many copies of the same site to millions of users.
Image of page 74
Image of page 75

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