Overview
PC developers are being called on to develop ever more complex systems, and in response the established tools for program design are now available on PC. "Clouds" is the colloquial name for the object diagrams that are central to UML. This book is a complete walk-through of the transition from design to development for programmers.Editorials
Phlip Plumlee
Clouds to Code
While the subtitle "A case study in application development with UML, design patterns, and C++" attempts to shelf Jesse Liberty's Clouds to Code with the object-oriented cookbooks, this book really is part of the "software-crisis" genre. As with Steve McConnell's Rapid Development,Clouds to Code presents the software lifecycle rules that make landing on time and under budget look easy.
Per the approach of other software-crisis books, Liberty starts with a heartbreaking post-mortem on a colossal project he took part in (and helped fly into the ground) early in his career. According to Liberty, hundreds of programmers labored on an absurdly complex project that, if it had ever worked, would have looked like today's World Wide Web, e-mail, and Lotus Notes -- all rolled together. Chanting the mantra "nobody thrives on chaos," this over-staffed army painstakingly tried to concoct a network of browsers, formats, hypertext, caches, editors, and search engines -- like the system that we today take for granted. But they planned far too many features for Version 1.0, before the real Web blew them away by decentralizing both its mechanics and sources of creativity.
This book describes how a group of three programmers (yes, three!) planned a huge, multilanguage, client-server, enterprise-level application. They did not submit a deadline estimate until after a great deal of research and planning; they then spent the first quarter of their allotted year testing potential off-the-shelf components, researching, and debating. They made a few mistakes, but none they weren't able to detect and fix later. Their manager did not ask, "Why haven't you coded anything yet?"
Clouds to Code addresses that kind of foolishness by laying down the law -- you design first, and you don't use design tools such as object-oriented methodologies, for instance, to plan every detail, or document existing code. Beginning with a customer's specifications (no matter how wishy-washy these may be), you use the object-oriented tools in order from least to most specific. Starting with the use-case diagrams, you show how agents and actors interact objects, in much the same way as directors set stage instructions or coaches diagram football plays.
The programming team then writes CRC cards, searches for nouns, and finally has an idea what the classes will look like. Analysis does not end until the programmers discuss and agree upon the hierarchy and interface of each globally public class. Without even yet writing a prototype, programmers will know which object owns what rules and behaviors. Readers understand, via narrative, the motivation behind a design, and this brings the UML charts to life -- Liberty does not expect us to read them first and then figure out what they mean.
One of Clouds to Code's major values is a peek into meetings where experienced developers decide, for instance, what the SQL will do and what their own C++ will do -- and where they will lean on the database for things it does best, like committing and rolling back transactions. Liberty then plans several key parts based on tools Microsoft has announced it will release "in a few weeks."
Software-crisis books repeat this wisdom often, "The earlier you catch a design flaw, the cheaper you fix it." The Clouds to Code team stress-tests and crash-tests their ideas long before they have a working program to beat on. Many important design decisions occur long before a body of code exists to require rework.
Ominously, we also learn what we can put off for later. Where I work, we mine data and stuff it into a database. Generally, we can safely assume that the customer's databases will fill up only a long time after we ship a system. Therefore, our projects tend to include a data-purge utility in the second version, not the first. Liberty sums up these practices with the (boxed) admonition "Design for the future, but code for immediate results." Only the set of features that are critical to Version 1.0 ship. If Version 1.0 ships on time, we'll get to code all the toys we dreamed up for Version 2.0.
Half a book of designing leads to a few clean C++ classes without dozens of data members or hundreds of methods -- each amenable to component-level testing. Because the team thought of all the angles first, each object is prepared to do its thing without the familiar spaghetti that a heavily reworked bad design cooks up.
The team of programmers ships a major project on time, and, yes, they cut a few corners, test out a few bugs, and pull 16-hour days towards the end. Been there, done that. But the Clouds to Code's greatest asset is it's all a true story -- not a concoction by a tutorial author trying to prove a point.--Dr. Dobb's Electronic Review of Computer Books