Engineering Software as a Service: An Agile Approach Using Cloud Computing¶
The cover background is a photo of the Aqueduct of Segovia, Spain. We chose it as an example of a beautiful, long-lasting design. The full aqueduct is about 20 miles (32 km) long and was built by the Romans in the 1st or 2nd century A.D. This photo is from the half- mile (0.8 km) long, 92 feet (28 m) high above ground segment built using unmortared granite blocks. The Roman designers followed the architectural principles in the ten-volume series De Architectura (“On Architecture”), written in 15 B.C. by Marcus Vitruvius Pollio. It was untouched until the 1500s, when King Ferdinand and Queen Isabella performed the first reconstruction of these arches. The aqueduct was in use and delivering water until recently.
Visit main page saasbook.info for news, updates and extensive list of resources.
To purchase the hardcopy (and kindle soon too) of the book visit amazon.
About the Authors¶
Armando Fox (pronouns: he, him, él) is a Professor of Computer Science, Diversity and Eq- uity Officer at both the EECS Department level and Campus level, and Faculty Advisor for Digital Learning Strategy at UC Berkeley. He is an ACM Distinguished Scientist and in 2015 received the ACM Karl V. Karlstrom Outstanding Educator Award for his work on software engineering education. During his previous time at Stanford, he received teaching and mentoring awards from the Associated Students of Stanford University, the Society of Women Engineers, and Tau Beta Pi Engineering Honor Society. In 2016 he and co-author David Pat- terson received the Most Promising New Textbook award (“Texty”) from the Textbook and Academic Authors Association for the First Edition of this book. In previous lives he helped design the Intel Pentium Pro microprocessor, founded a successful startup to commercialize his UC Berkeley dissertation research on mobile computing including the world’s first mobile graphical web browser (Top Gun Wingman on Palm Pilot), and co-founded a couple of startups that were artistic successes. He received his BS in electrical engineering and com- puter science from MIT and his MS from the University of Illinois at Urbana-Champaign. He is also a classically-trained musician, freelance Music Director, and bilingual/bicultural (Cuban-American) New Yorker transplanted to San Francisco.
David Patterson (pronouns: he, him) recently retired from a 40-year career as a Professor of Computer Science at UC Berkeley. In the past, he served as Chair of Berkeley’s Computer Science Division, Chair of the Computing Research Association, and President of the Asso- ciation for Computing Machinery. His best-known research projects are Reduced Instruction Set Computers (RISC), Redundant Arrays of Inexpensive Disks (RAID), and Networks of Workstations (NOW). This research led to many papers, 6 books, and more than 35 honors, including election to the National Academy of Engineering, the National Academy of Sciences, and the Silicon Valley Engineering Hall of Fame; being named a Fellow of the Computer History Museum, ACM, IEEE, and both AAAS organizations; and most recently, the ACM A.M. Turing Award, shared with Prof. John Hennessy of Stanford University for their work on RISC and their quantitative approach to computer architecture and design. His teaching awards include the UC Berkeley Distinguished Teaching Award, the ACM Karl V. Karlstrom Outstanding Educator Award, the IEEE Mulligan Education Medal, and the IEEE Undergraduate Teaching Award. Prior to winning the Textbook Excellence Award (“Texty”) for this book, he received one for his pioneering textbook on computer architec- ture. He received all his degrees from UCLA, which awarded him an Outstanding Engineer- ing Academic Alumni Award. He grew up in California, and for fun he enters sporting events with his two adult sons, including weekly soccer games and charity bike rides.
Content¶
The following content is protected under the creative commons license. You may download the authors’ work and share as long as you credit the authors. You may not change the contents of the book in any way or use it commercially.
- 1. Introduction to Software as a Service, Agile Development, and Cloud Computing
- 1.1. Introduction
- 1.2. Software Development Processes: Plan and Document
- 1.3. Software Development Processes: The Agile Manifesto
- 1.4. Software Quality Assurance: Testing
- 1.5. Productivity: Conciseness, Synthesis, Reuse, and Tools
- 1.6. SaaS and Service Oriented Architecture
- 1.7. Deploying SaaS: Cloud Computing
- 1.8. Deploying SaaS: Browsers and Mobile
- 1.9. Beautiful vs. Legacy Code
- 1.10. Guided Tour and How To Use This Book
- 1.11. Fallacies and Pitfalls
- 1.12. Concluding Remarks: Software Engineering Is More Than Programming
- 2. How to Learn a New Language
- 2.1. Prelude: Learning to Learn Languages and Frameworks
- 2.2. Pair Programming
- 2.3. Introducing Ruby,an Object-Oriented Language
- 2.4. Ruby Idioms: Poetry Mode, Blocks, Duck Typing
- 2.5. CHIPS: Ruby Intro
- 2.6. Gems and Bundler: Library Management in Ruby
- 2.7. Fallacies and Pitfalls
- 2.8. Concluding Remarks: How (Not) To Learn a Language By Googling
- 3. SaaS Application Architecture: Microservices, APIs, and REST
- 3.1. Introduction
- 3.2. SaaS Communication Uses HTTP Routes
- 3.3. CHIPS: HTTP and URIs
- 3.4. From Web Sites to Microservices: Service-Oriented Architecture
- 3.5. RESTful APIs: Everything is a Resource
- 3.6. RESTful URIs, API Calls, and JSON
- 3.7. CHIPS: Create and Deploy a Simple SaaS App
- 3.8. Fallacies and Pitfalls
- 3.9. Concluding Remarks: Continuity From CGI to SOA
- 4. SaaS Framework: Rails as a Model–View–Controller Framework
- 4.1. The Model–View–Controller (MVC) Architecture
- 4.2. Rails Models: Databases and Active Record
- 4.3. CHIPS: ActiveRecord Basics
- 4.4. Routes, Controllers, and Views
- 4.5. CHIPS: Rails Routes
- 4.6. Forms
- 4.7. CHIPS: Hangperson on Rails
- 4.8. Debugging: When Things Go Wrong
- 4.9. CHIPS: Hello Rails
- 4.10. Fallacies and Pitfalls
- 4.11. Concluding Remarks: Rails as a Service Framework
- 5. SaaS Framework: Advanced Programming Abstractions for SaaS
- 5.1. DRYing Out MVC: Partials, Validations and Filters
- 5.2. Single Sign-On and Third-Party Authentication
- 5.3. CHIPS: Rails Intro
- 5.4. Associations and Foreign Keys
- 5.5. Through-Associations
- 5.6. RESTful Routes for Associations
- 5.7. CHIPS: Associations
- 5.8. Other Types of Code
- 5.9. Fallacies and Pitfalls
- 5.10. Concluding Remarks: Languages, Productivity, and Beauty
- 6. Mobile and Desktop SaaS Clients: JavaScript Introduction
- 6.1. JavaScript: The Big Picture
- 6.2. Introducing ECMAScript
- 6.3. Classes, Functions and Constructors
- 6.4. The Document Object Model (DOM) and jQuery
- 6.5. The DOM and Accessibility
- 6.6. Events and Callbacks
- 6.7. AJAX: Asynchronous JavaScript And XML
- 6.8. Testing Java Script and AJAX
- 6.9. CHIPS: AJAX Enhancements to RottenPotatoes
- 6.10. Single-Page Apps and JSON APIs
- 6.11. Fallacies and Pitfalls
- 6.12. Concluding Remarks: JavaScript Past, Present and Future
- 7. Requirements: BDD and User Stories
- 7.1. Behavior-Driven Design and User Stories
- 7.2. SMART User Stories
- 7.3. Lo-Fi User Interface Sketches and Storyboards
- 7.4. Points and Velocity
- 7.5. Agile Cost Estimation
- 7.6. Cucumber: From User Stories to Acceptance Tests
- 7.7. CHIPS: Intro to BDD and Cucumber
- 7.8. Explicit vs. Implicit and Imperative vs. Declarative Scenarios
- 7.9. The Plan-And-Document Perspective on Documentation
- 7.10. Fallacies and Pitfalls
- 7.11. Concluding Remarks: Pros and Cons of BDD
- 8. Testing: Test-Driven Development
- 8.1. FIRST, TDD, and Red–Green–Refactor
- 8.2. Anatomy of a Test Case: Arrange, Act, Assert
- 8.3. Isolating Code: Doubles and Seams
- 8.4. Stubbing the Internet
- 8.5. CHIPS: Intro to RSpec on Rails
- 8.6. Fixtures and Factories
- 8.7. Coverage Concepts and Types of Tests
- 8.8. Other Testing Approaches and Terminology
- 8.9. CHIPS:The Acceptance Test/Unit Test Cycle
- 8.10. The Plan-And-Document Perspective on Testing
- 8.11. Fallacies and Pitfalls
- 8.12. Concluding Remarks: TDD vs. Conventional Debugging
- 9. Software Maintenance: Enhancing Legacy Software Using Refactoring and Agile Methods
- 9.1. What Makes Code “Legacy” and How Can Agile Help?
- 9.2. Exploring a Legacy Codebase
- 9.3. Establishing Ground Truth With Characterization Tests
- 9.4. Comments and Commits: Documenting Code
- 9.5. Metrics, CodeSmells, and SOFA
- 9.6. Method-Level Refactoring: Replacing Dependencies With Seams
- 9.7. The Plan-And-Document Perspective on Working With Legacy Code
- 9.8. Fallacies and Pitfalls
- 9.9. Concluding Remarks: Continuous Refactoring
- 10. Agile Teams
- 10.1. It Takes a Team: Two-Pizza and Scrum
- 10.2. Using Branches Effectively
- 10.3. Pull Requests and Code Reviews
- 10.4. Delivering the Backlog Using Continuous Integration
- 10.5. CHIPS: Agile Iterations
- 10.6. Reporting and Fixing Bugs: The Five R’s
- 10.7. The Plan-And-Document Perspective on Managing Teams
- 10.8. Fallacies and Pitfalls
- 10.9. Concluding Remarks: From Solo Developer to Teams of Teams
- 11. Design Patterns for SaaS Apps
- 11.1. Patterns, Antipatterns, and SOLID Class Architecture
- 11.2. Just Enough UML
- 11.3. Single Responsibility Principle
- 11.4. Open/Closed Principle
- 11.5. Liskov Substitution Principle
- 11.6. Dependency Injection Principle
- 11.7. Demeter Principle
- 11.8. The Plan-And-Document Perspective on Design Patterns
- 11.9. Fallacies and Pitfalls
- 11.10. Concluding Remarks: Frameworks Capture Design Patterns
- 12. Dev/Ops
- 12.1. From Development to Deployment
- 12.2. Three-Tier Architecture
- 12.3. Responsiveness, Service Level Objectives, and Apdex
- 12.4. Releases and Feature Flags
- 12.5. Monitoring and Finding Bottlenecks
- 12.6. Improving Rendering and Database Performance With Caching
- 12.7. Avoiding Abusive Database Queries
- 12.8. CHIPS: Exploiting Caching and Indices
- 12.9. Security: Defending Customer Data in Your App
- 12.10. The Plan-And-Document Perspective on Operations
- 12.11. Fallacies and Pitfalls
- 12.12. Concluding Remarks: Beyond PaaS Basics
- 13. Afterword