13.07.2015 Views

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

with potentially thousands of simultaneous users both reading andwriting to the database. This is the problem that databasemanagement systems (DBMS) were intended to solve.A good way to think about a relational database management system(RDBMS, the most popular type of DBMS) is as a spreadsheetprogram that sits inside a dark closet. If you need to create a newtable you slip a little strip of paper under the door with "CREATETABLE ..." written on it. To add a row of data to that table, you slipanother little strip under the door saying "INSERT...". To changesome data within the table, you write "UPDATE.. " on a paper strip.To remove a row, you send in a strip starting with "DELETE".Notice that we've solved the concurrency problem here. Suppose thatyou have only one copy of Bus Nine to Paradise left in inventory and1000 users at the same instant request Dr. Buscaglia's work. Byarranging the strips of paper in a row, the program in the closet candecide to process one INSERT into the orders table and reject the999 others. This is better than 1000 people fighting over a singlekeyboard and mouse.Once we've sent in<strong>for</strong>mation into the closet, how do we get it backout? We can write down a request <strong>for</strong> a report on a strip of paperstarting with "SELECT" and slide it under the door. The DBMS in thedark closet will prepare a report <strong>for</strong> us and slide that back to us underthe same door.How do we evaluate whether or not a DBMS is powerful enough <strong>for</strong>our application? Starting in the 1960s IBM proposed the "ACID test":AtomicityResults of a transaction's execution are either all committedor all rolled back. All changes take effect, or none do.Suppose that a user is registering by uploading name,address, and JPEG portrait into three separate tables. AWeb script tells the database to per<strong>for</strong>m three inserts aspart of a transaction. If the hard drive fills up after the nameand address have been inserted but be<strong>for</strong>e the portrait canbe stored, the changes to the name and address tables willbe rolled back.ConsistencyThe database is trans<strong>for</strong>med from one valid state to anothervalid state. A transaction is legal only if it obeys user-defined18Scientists measure their results against nature. Engineers measuretheir results against human needs. Programmers ... don't measuretheir results. As a final overarching deep principle, we need to teachstudents to measure their results against the end-user experience.Anyone can build an <strong>Internet</strong> application. The applications that aresuccessful and have impact are those whose data model and pageflow permit the users to accomplish their tasks with a minimum oftime and confusion.What skills do they need to learn?In a world where it seems that every villager in India has learnedJava, we want our graduates to be more than mere coders. Agraduate who can do nothing more than sit in a corner and code Javaclasses from specs is doing a job that is certain to be sent to a lowwagecountry eventually.We'd like our students to be able to take vague and ambitiousspecifications and turn them into a system design that can be builtand launched within a few months, with the most important-to-usersand easy-to-develop features built first and the difficult bells andwhistles deferred to a second version. We'd like our students to knowhow to test prototypes with end-users and refine their applicationdesign once or twice within even a three-month project. We'd like ourstudents to be able to think on their feet and speak up withconstructive criticism at design reviews.These desires translate into some aspects of how we use thistextbook at MIT: real clients so that students are exposed to thevagueness and confusion of real-world problems; user testing builtinto the homework problems; "lecture" time primarily devoted tostudent-student interaction with the instructors moderating thediscussion.Survey courses considered helpful?Suppose that one were convinced that the <strong>for</strong>egoing are the correcttopics to teach a computer science undergraduate. Should we teachthem one at a time, in-depth? Or should we start with a surveycourse that teaches all concepts simultaneously in the context ofbuilding actual applications [this book]?<strong>Student</strong>s in a traditional computer science curriculum will• spend a term learning the syntax of a language331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!