SanFranciscoTM Life Cycle Programming Techniques, 1st edition
Authors: Maynard Johnson, Randy Baxter, Tore Dahl
Venue:  (1999)

From the Book:Goals In the business world, many processes seem to have natural life cycles. Such processes have a beginning, an intermediate stage (or stages), and an end. A few examples are Document control A hardware service call A sales order A building construction project For all such processes, certain rules must be followed in deciding when the process is ready to move from one phase of its life to another. Software applications that control business process life cycles have traditionally been difficult to maintain and customize because of interdependencies between data and control. Design patterns such as the State pattern (see Design Patterns by Erich Gamma et al., Addison-Wesley) have contributed to an understanding of the problem domain but were limited in their cross-domain applicability. What was needed to enable maximum flexibility and ease of maintenance was complete separation of life-cycle control from state information and business data. This book describes how the IBM SanFrancisco™ Application Business Components has solved the problem of life-cycle control. The overall goal of this book is to provide an in-depth understanding of the SanFrancisco Life Cycle pattern and the mechanisms provided by SanFrancisco that support the pattern. This understanding will enable you to use the SanFrancisco Life Cycle mechanisms to build your own Life Cycle–based applications. We will present the material in a manner that enables you to build your knowledge from novice level to expert level. To achieve this goal, we will Describe the use of life-cycle control in applicationdesign and development Describe in high-level terms what “life cycle” means in the context of the SanFrancisco product Describe the mechanisms provided by SanFrancisco that support the Life Cycle pattern Describe why an application may choose to use the SanFrancisco Life Cycle mechanisms Provide examples (based on SanFrancisco Order Management order types) to illustrate how the Life Cycle mechanisms can be used in application design and development Provide examples to show how an application creates and manages Life Cycle–based objects Describe the nuances of building a Life Cycle–based application for use in a multiclient environment Give tips for relational database configuration for a Life Cycle–based Provide complete examples of extending the Life Cycle–based order types of SanFrancisco Order Management Audience This book is aimed at programmers, designers, and software project managers who are considering application design and development using the Java™– based IBM SanFrancisco product. Most of the material assumes you have some level of experience or familiarity with the following concepts: Java programming language Object-oriented design Rational Rose™ and the Unified Modeling Language (UML) SanFrancisco program model and architecture SanFrancisco design patterns If you think you might not have the appropriate level of experience in one of the areas in the preceding list, you may want to consult our recommended readings. Numerous books exist on the topics of Java programming and object-oriented design. Two of our favorites are Java in a Nutshell by David Flanagan (O’Reilly & Associates) and Object-Oriented Analysis and Design with Applications by Grady Booch (Addison-Wesley). Experience with Rational Rose and UML is, of course, best gained by using that product. For an overview of the SanFrancisco program model and architecture, two good sources of information are the SanFrancisco Evaluation CD provided with this book and SanFrancisco Application Business Components: An Introduction by Paul Monday et al. (Addison Wesley Longman). SanFrancisco design patterns are covered thoroughly in SanFrancisco Design Patterns by Jim Carey et al. (Addison Wesley Longman). Familiarity with design patterns in general will also be helpful. For those interested, we recommend the book Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma et al. (Addison-Wesley). Organization This book is divided into three parts, with Parts 2 and 3 requiring a greater level of expertise in the previously listed concepts. If you already have a basic understanding of SanFrancisco Life Cycle mechanisms, you may wish to simply skim Part 1 to more quickly get at the details covered in Parts 2 and 3. You will find this book valuable to refer to during application development because we’ve organized the book to allow faster reference to specific topics. If at any time you encounter a term you’re not familiar with, check to see if it’s defined in the Glossary. Part 1 introduces you to the SanFrancisco Life Cycle pattern, explaining its purpose and capabilities, and how the mechanisms provided by SanFrancisco can be used to build a Life Cycle–based application. In this first part, a general knowledge of SanFrancisco is assumed; however, the topics are fairly high level, so you need not be an experienced SanFrancisco developer to grasp the general concepts. Part 2 of the book describes how the Life Cycle pattern is used and extended by the SanFrancisco Order Management Core Business Process to construct several different order types. The Order Management Core Business Process is an application framework available with the SanFrancisco product. The Order Management framework includes several constructs called order types (sales order, purchase order, etc.) that developers in the order-management domain can use to facilitate development. These order types are constructed using SanFrancisco Life Cycle mechanisms. We use the order types as real-life examples of designing and building application components using Life Cycle. These concrete examples allow us to more readily describe the general tasks required to design a Life Cycle–based component. The examples are focused on Order Management’s use of the Life Cycle mechanism, not the domain-related aspects of the order types. Because of this focus, a detailed knowledge of order-management concepts is not required. Our goal in Part 2 is to help you interpret and understand the general Life Cycle concepts so you can design and build Life Cycle–based applications of your own. We also provide specific tips to facilitate the deployment of Life Cycle–based applications in a real-world, multiclient, relational database environment. Application developers who have decided to implement a SanFrancisco application using the Life Cycle mechanisms should find the practical, task-oriented approach very helpful. In Part 3 we show you how to use Life Cycle programming techniques in your own applications. Chapters 9 and 10 describe the specific steps SanFrancisco developers must take if they wish to extend the predefined order types provided by SanFrancisco. These chapters go into some detail on domain-related processes such as order planning, picking, and shipping, but with a heavy emphasis on the generic mechanical steps required to extend SanFrancisco framework classes. The ideal reader for Part 3 is an application developer who intends to use the order types supplied in SanFrancisco, but whose application requirements will necessitate modifying some of the default behaviors of those order types. However, even non-order-management programmers should find this material interesting, understandable, and valuable. Chapter 11 describes how Life Cycle programming techniques (and the mechanisms provided by SanFrancisco) can be used in the design of a new application. The example application developed in this chapter is a customer service management system, but the Life Cycle design methodology we use can be applied to the general case. Conventions This book uses a certain style to denote specific patterns, programming constructs, and so on. Knowing what that style is will help you more readily understand some of the more technical parts of the book. The style we followed in this book is as follows: Boldface is used for first references to important SanFrancisco terms, such as Life Cycle pattern. Such highlighted SanFrancisco terms are included the glossary. The Lucida Sans Typewriter font is used for Java keywords, variables in the main body of the text, command-line options in text, and package names; for example, “the instance variable name of the primary extension is ivPrimaryExtension.” The Italic Lucida Sans Typewriter font is used for arguments to methods, variable expressions in command-line options in the main body of the text; for example, “the boolean value true is passed when the method is invoked.” The small Lucida Sans Typewriter font is used for code examples that are separated from the main text and for method names—for example, commit() or commit with no parentheses. Names of Core Business Processes (e.g., Order Management), patterns (e.g. Life Cycle), and so on, are initial capped. References to SanFrancisco business classes or objects are in the regular text font and may be either initial capped single words (e.g., OrderPartner) or lowercase multiple words (e.g., order partner), depending on the context.