Engineering Software as a Service
First Edition 1.0.1
Armando Fox and David Patterson
April 4, 2014
Copyright 2013 Strawberry Canyon LLC. All rights reserved.
No part of this book or its related materials may be reproduced in any form without the
written consent of the copyright holder.
Book version: 1.0.1
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.
Both the print book and ebook were prepared with LaTeX, tex4ht, and Ruby scripts that
use Nokogiri (based on libxml2) to massage the XHTML output and HTTParty to
automatically keep the Pastebin and screencast URIs up-to-date in the text. The necessary
Makefiles, style files and most of the scripts are available under the BSD License at
http://github.com/armandofox/latex2ebook.
Arthur Klepchukov designed the covers and graphics for all versions.
In Praise of Engineering Software as a Service
It is a pleasure to see a student text that emphasizes the production of real useful
software. I also applaud the emphasis on getting results early in the process. Nothing
stimulates student morale and activity more.
—Frederick P. Brooks, Jr., Turing Award winner and author of The Mythical Man-
Month
I’d be far more likely to prefer graduates of this program than any other I’ve seen.
—Brad Green, Engineering Manager, Google Inc.
A number of software engineers at C3 Energy consistently report that this book and its
companion online course enabled them to rapidly attain proficiency in SaaS development.
I recommend this unique book and course to anyone who wants to develop or improve
—Thomas M. Siebel, CEO, C3 Energy, and founder and former CEO, Siebel Systems
(the leading Customer Relationship Management software company)
their SaaS programming skills.
A wide and deep coverage of all you need to get started in the SaaS business.
—Vicente Cuellar, Chief Executive Officer, Wave Crafters, Inc.
The book filled a gap in my knowledge about cloud computing and the lectures were easy
to follow. Perhaps the most exciting part was to write a cloud application, upload, and
deploy it to Heroku.
—Peter Englmaier, University of Zürich, Switzerland
An excellent kickstart into Ruby, Rails and test driven approaches. The fundamentals
have been covered with great depth and experience, it’s the perfect introduction to
modern web development. It should be a requisite for new engineers.
—Stuart Corbishley, Clue Technologies/CloudSeed, South Africa.
An excellent book that will have you up and running building SaaS apps progressively in
a few short days. The screencasts and the Pastebin sections are invaluable. A very
practical approach to Agile software development. You won’t know it but you would
have picked up software engineering techniques without even knowing you are doing it!
—Rakhi Saxena, Assistant Professor, Delhi University, India
The authors have accomplished a very welcome juxtaposition of theory and practice for
any modern beginning to advanced Software Engineering course. On the one hand, they
cover key Software Engineering fundamentals including development processes,
requirements engineering, testing, software architecture, configuration management,
implementation, and deployment. On the other hand, they convey all of this grounded in a
“real-world” approach centered around Ruby/Rails and its rich ecosystem of agile, test-
and behavior-driven development tools and techniques, with a direct avenue to cloud
deployment of running, quality software. I have used the Beta Edition of this book very
successfully in my advanced undergraduate software engineering course, where it
beautifully complements both my lectures and the team project.
—Ingolf Krueger, Professor, University of California at San Diego
A really good introduction book to practical Agile development. All you need is gathered
in one book with lots of practical examples.
—Dmitrij Savicev, Sungard Front Arena, Sweden
About the Authors
Armando Fox is a Professor of Computer Science at UC Berkeley and the Faculty
Advisor to the UC Berkeley MOOCLab. 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. He was named
one of the “Scientific American 50” in 2003 and is the recipient of an NSF CAREER
award and the Gilbreth Lectureship of the National Academy of Engineering. In previous
lives he helped design the Intel Pentium Pro microprocessor and founded a successful
startup to commercialize his UC Berkeley dissertation research on mobile computing,
which included the world’s first graphical web browser running on a mobile device (Top
Gun Wingman on the Palm Pilot). He received his other degrees in electrical engineering
and computer science from MIT and the University of Illinois and is an ACM
Distinguished Scientist. He is also a classically-trained musician and freelance Music
Director, and a bilingual/bicultural (Cuban-American) New Yorker transplanted to San
Francisco.
David Patterson is the Pardee Professor of Computer Science at UC Berkeley and is
currently Director of the Parallel Computing Lab. In the past, he served as Chair of
Berkeley’s CS Division, Chair of the CRA, and President of the ACM. 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 as well as being named a Fellow of the Computer History
Museum, ACM, IEEE, and both AAAS organizations. His teaching awards include the
Distinguished Teaching Award (UC Berkeley), the Karlstrom Outstanding Educator
Award (ACM), the Mulligan Education Medal (IEEE), and the Undergraduate Teaching
Award (IEEE). He received all his degrees from UCLA, which gave him an Outstanding
Engineering Academic Alumni Award. He grew up in California, and for fun he enters
sporting events with his two adult sons, including weekly soccer games, annual charity
bike rides and sprint triathlons, and the occasional weight-lifting contest.
About the Editor
Samuel Joseph is an Associate Professor at Hawaii Pacific University (HPU) and was
previously an Associate Researcher at University of Hawaii at Manoa (UHM). He is a
recipient of the Raymond Hide Prize for Astrophysics and a Toshiba Fellowship. He
teaches fully-online courses on game and mobile programming and design, software
engineering, and scientific research methods, from London, UK. He runs the “funniest
computer ever” competition as part of his research on creating humorous chatbots, which
dovetails nicely with his other research interests in software to support online
collaborative learning, especially remote pair programming. He runs the Agile Ventures
group which coordinates learning developers contributing to open source projects for non-
profit organizations. His degrees in Astrophysics, Cognitive Science and Computer
Science are from the University of Leicester, the University of Edinburgh, and UHM. He
grew up in the UK and lived in Japan and Hawaii before returning to the UK with his
Japanese wife and three Hawaiian born sons. His spare time is taken up biking, jogging
and trying to keep up with his guitar, drum and soccer playing sons.
Dedication
Armando Fox dedicates this book to his wife and best friend Tonia, whose support while
writing it made all the difference, and to Pogo, under whose careful supervision much of it
was written and whose feisty spirit will always inhabit our home and our hearts.
David Patterson dedicates this book to his parents and all their descendants:
—To my father David, from whom I inherited inventiveness, athleticism, and the courage
to fight for what is right;
—To my mother Lucie, from whom I inherited intelligence, optimism, and my
temperament;
—To our sons David and Michael, who are friends, athletic companions, and inspirations
for me to be a good man;
—To our daughters-in-law Heather and Zackary, who are smart, funny, and caring mothers
to our grandchildren;
—To our grandchildren Andrew, Grace, and Owyn, who give us our chance at immortality
(and who helped with marketing for this book);
—To my younger siblings Linda, Don, and Sue, who gave me my first chance to teach;
—To their descendants, who make the Patterson clan both large and fun to be with;
—And to my beautiful and understanding wife Linda, who is my best friend and the love
of my life.