Home > Store > Software Development & Management > UML

Developing Applications with Visual Basic and UML

Register your product to gain access to bonus material or receive a coupon.

Developing Applications with Visual Basic and UML

Book

  • Your Price: $31.96
  • List Price: $39.95
  • Available on demand.

Description

  • Copyright 2000
  • Dimensions: 7-3/8x9-1/4
  • Pages: 592
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-61579-7
  • ISBN-13: 978-0-201-61579-1

An essential resource for Visual Basic (VB) programmers who want to develop applications that are both resilient and robust, Developing Applications with Visual Basic and UML describes a proven development process for designing and implementing object-oriented client/server applications in VB using the Unified Modeling Language (UML).

Guided by his own experiences as a developer applying UML and VB, the author provides clear explanations of the fundamentals of UML while also examining and illustrating the often misrepresented object-oriented properties of Visual Basic. In addition, the book incorporates in-depth information on developing VB applications utilizing DNA concepts, incorporating technologies such as DCOM and MTS, and integrating Web tools such as ASP, VB Script, and JavaScript to Internet-enable Visual Basic applications. A significant case study runs throughout the book, leading the reader through the lifecycle of a projectofrom requirements analysis to modeling and prototyping through finalizing the architecture and generating code. Through this study, the author demonstrates the design benefits of UML and shows how to translate a UML specification into Visual Basic code.

The author includes detailed coverage of the following topics:
  • Uncovering the events for which an application must be responsible
  • Modeling use cases with UML
  • Using Rational Rose to manage UML artifacts
  • Translating the object-based UML class diagram to a relational design supported by SQL Server or Oracle
  • Transitioning from classes and use cases to the UML's dynamic models, the sequence and collaboration diagrams
  • Mapping UML to Visual Basic deliverables
  • Generating code from the UML class diagram
  • Distributed technology solutions based on Distributed Internet Architecture (DNA) using Distributed Component Object Model (DCOM) and Microsoft Transaction Server (MTS)
  • Web-enabling VB applications using Active Server Pages (ASP), VBScript, JavaScript, and Microsoft's Visual InterDev

With the information and expert techniques presented in this book, readers can significantly enhance their Visual Basic programming skills as well as their overall understanding of how an effective development process impacts the quality of the final application.



0201615797B04062001

Downloads

Source Code

Click below for Source Code related to this title:
0201615797.zip

Extras

Web Resources

Click below for Web Resources related to this title:
Author's Web Site

Sample Content

Table of Contents



1. The Project Dilemma.

Goals.

The Project Dilemma.

The Synergy Process Model.

The Unified Modeling Language.

Checkpoint.



2. Visual Basic, Object-Oriented, and the UML.

Goals.

Visual Basic as an Industrial Strength Development Tool.

Visual Basic and the Concept of Object-Oriented.

Why the UML and Visual Basic?

Checkpoint.



3. Getting the Project Started.

Goals.

Establishing the Project Charter.

Checkpoint.



4. Use Cases.

Goals.

The Sample Project.

The Process Model.

Finding the Pathways through the Use Case.

Shadow Use Cases.

Detailing the Happy Path.

Completed Process Orders Use Case.

Preparing the Preliminary Architecture.

Project Charter: Increments and Estimates.

Checkpoint.



5. Classes.

Goals.

Elaboration Phase.

Detailing Pathways.

Identifying and Categorizing Business Rules.

Uncovering Classes.

Relationships.

Creating the Class Diagram.

Identifying Attributes and Operations.

Object Diagram.

Finishing Up: The Analysis Model.

Checkpoint.



6 Building an Early Prototype.

Goals.

Building an Early Prototype.

Requirements Gathering.

Iteration One.

Checkpoint.



7. The Dynamic Elements of the Application.

Goals.

Next Step of the Elaboration Phase.

Dynamic Modeling.

The Sequence Diagram.

The Collaboration Diagram.

The State Diagram.

The Activity Diagram.

Selecting the Right Diagram.

Non-UML Extensions in the Design: Usage Matrices.

Checkpoint.



8. The Technology Landscape.

Goals.

Next Phase of the Elaboration Phase.

Separating Services.

Logical versus Physical Tiering.

Microsoft's Tiering Strategy.

Managing Transaction Scope within the Application and Microsoft Transaction Server.

Incorporating the Internet into the Solution.

Remulak Productions Execution Architecture.

Checkpoint.



9. Data Persistence: Storing the Objects.

Goals.

Construction Phase.

Object-Oriented and Translating to the Physical Design.

Mapping Classes to Tables.

Mapping Simple Associations.

Mapping Inheritance to the Relational Database.

Mapping Aggregation and Composition to the Relational Database.

Mapping Reflexive Associations to the Relational Database.

Key Structures and Normalization.

Using a Visual Modeling Tool to Generate the Data Definition Language.

Stored Procedures and Triggers and the Object-Oriented Project.

Visual Basic Support of Data-Aware Classes.

The Data Translation Services and Data Access Services Layers.

Checkpoint.



10. Applying the Infrastructure.

Goals.

Construction Phase.

Checkpoint.



11. Generating Code from the UML Class Diagram (Part 1).

Goals.

Construction Phase.

Adding Code to Realize a Use Case Pathway.

Data Access Service Layer: DASVC Component.

Data Translation Service Layer: DTSVC Component.

Business Rule Service Layer: BRSVC Component.

Presentation Service Layer: UISVC Component.

Building Blocks for the Future.

Checkpoint.



12. Generating Code from the UML Class Diagram (Part 2).

Goals.

Construction Phase.

Checkpoint.



13. Creating a Distributed Implementation: DCOM and MTS.

Goals.

Construction Phase.

Remote Solutions-Distributed Component Object Model.

Remote Solutions-Microsoft Transaction Server.

Checkpoint.



14 Alternative Interfaces: The Internet.

Goals.

Construction Phase.

Checkpoint.



Appendix A Estimating Project Using Use Cases.

Actors.

Use Cases.

Technical Factors.

Project Participants.

Use Case Points.

The Project Estimate.



Appendix B Adding Additional Functionality to Rational Rose Data Definition.

Language Capability.

Enhancements-Persistent and Transient Attributes.

Modifying Rational Rose-Persistent Attribute Setup.

Modifying Rational Rose-Running the Definition Script.

Modifying Rational Rose-Changing the Script to Recognize the Attribute.

Other Areas of Change.



Appendix C An Object-Oriented Primer.

What Does Object-Oriented Mean?

Object-Oriented-Right in Your Own Backyard.

By-Products of Object-Oriented.

Inheritance.

Encapsulation.

Polymorphism.

No Silver Bullet.



Appendix D Component Object Model and COM+.

COM-The Plumbing.

COM-Infrastructure.

COM at Work.

Visual Basic-Version Compatibility.

COM +.



Appendix E Object-Oriented Project Plan.


Appendix F Sample Project Output.

Use Cases-Use Case Details for Increment I.

Use Cases-Happy Path Task Steps.

Database Support.



Bibliography.


Suggested Readings.


Index. 0201615797T04062001

Preface

Why Buy This Book?

Most software projects undertaken today don't come close to meeting their original goals or their estimated completion dates. My reasoning for this is that most project teams don't have a clue about what a development process is or how to customize one for a project's unique characteristics. In addition, most projects have little in the way of analysis and design artifacts to show how they got where they are. That is, projects traditionally lacked traceability.

Most authors of books on VB never consider it in "the large." Instead, they focus on the small view, filling the pages with nifty routines to load list boxes and call native Windows API functions. Although this view, too, is necessary, unfortunately no one seems to touch on project planning, software process, and the methodology for building enterprise-status VB applications. This is because it is a much more difficult topic to explore and present.

This book focuses on the most powerful approach available today to model and build industrial-strength VB applications: the Unified Modeling Language (UML) adopted in 1997 by the Object Management Group (OMG) as the standard for modeling object-based applications. With the UML, and a sound development lifecycle (which I introduce as the Synergy process in this book), VB projects can move closer toward predictable success, as opposed to the less desirable, luck-of-the-draw chances.

The Sad Truth

My career with computers began in 1979 when I began working on large IBM mainframe applications using technologies such as IBM's IMS and later DB2, what many of you today would call "legacy" applications. However, I prefer "heritage" or "senior" systems to "legacy." Not only did I learn about and work with some really great tools and super sharp people, I also learned the value of project planning and establishing a clear architecture and design of the target application. I saw this pay back in a big way as a sound process established a clear line of communication for the project team. More important, it provided the stepping stones for completing a successful project.

In 1990, I worked on a first-generation client/server application using Smalltalk on the OS/2 platform. This was the start of a new career path for me, and I was shocked by the "process" used to build "production" applications in the client/server environment. The planning was cavalier, as was the delivery of analysis and design artifacts (something that showed why we built what we built).

This pattern of "shooting from the hip" software development continued with my use of PowerBuilder and later VB. The applications delivered with these products worked, but they were fragile. I think that today many applications wear the "client/server" moniker when they are just as legacy as their mainframe counterparts, if not more so. Even worse, these became legacy applications a month or two after they went into production. The fault wasn't with the tool. Rather, it was with the lack of a sound process model and methodology that ensured that what got built was what the users actually wanted and that what got designed didn't fall apart the first time it was changed.

Slowly, I began to apply my own opinions about process and methodology to the applications built in the client/server environment. This worked quite well. The applications were more resilient and accepted change more easily, and the users typically had smiles on their faces.

This book combines all of my experience building client/server applications with the UML, which I feel is the best artifact repository for documenting the analysis and design of an application today. I hope that you will enjoy reading it as much as I enjoyed writing it.

Who Should Read This Book

This book is for anyone who wants to successfully build VB applications that can stand up over time. It provides an accurate road map for anyone to achieve the following goals.

  • Establish a sound project plan (presented in-depth in Appendix E).
  • Estimate projects with confidence, rather than with a hit-and-miss approach.
  • Understand and describe the requirements of the application using the models supported by the UML.
  • Create a sound design based on the models supported by the UML and the architectures supported by the organization.
  • Use the power of Microsoft's Distributed Internet Architecture (DNA) strategy to build location transparency into the application.
  • Use the visual modeling tool, Rose, by Rational Software, not only to create and track UML artifacts but also to generate skeletons for the component code.
  • Effectively use the latest Microsoft technologies, such as Distributed Component Object Model (DCOM), Microsoft Transaction Server (MTS) and the Internet via Active Server Pages (ASP), VBScript, and JavaScript.

Anyone building VB applications today needs this book.

What You Need to Know to Use This Book

Maybe it's best to start out with what you don't need to know to benefit from this book. First, you don't need to know anything about the UML. I present the essential aspects of the UML and, more important, how they relate to VB deliverables. Although the UML is expressed with nine separate diagrams, you will benefit the most from a core set.

Second, you don't need a formal background in object-oriented concepts. I discuss standard object constructs in the text and review many of these in Appendix C.

Third, you don't need to know COM or DCOM. I use both extensively throughout the book and cover some of the "plumbing" issues involved in Appendix D.

Finally, you don't need a formal understanding of the key technologies that surround MTS and the World Wide Web (Web). Each receives detailed treatment in the book.

This book does assume that you have a working knowledge of VB. Both the new VB programmer and the experienced VB programmer will benefit. However, I don't cover the basics of simple VB constructs, assuming that you already know these. If you have had no exposure to VB, buy this book anyway and open it after you have had some initial training in that programming language.

This book also assumes that you have experience with Structured Query Language (SQL) and with relational databases. Some exposure to Data Access Objects (DAO), Active Data Objects (ADO), and Open Database Connectivity (ODBC) would also help. The project used as a model in the book uses ADO exclusively with ODBC drivers.

Structure of the Book

Following is a summary of the book's chapters and contents.

Chapter 1: The Project Dilemma

This chapter reviews the current state of software development and my reasoning regarding why it's in the shape that it is today. It also reviews the concept of iterative and incremental software development and provides an overview of my Synergy methodology used as the guide in the book. It also touches on the primary components of the UML that will be covered in more depth later in the book.

Chapter 2: Visual Basic, Object-Oriented, and the UML

This chapter covers some of the benefits that result from the adoption of VB as a development environment. It presents these in the context of VB's implementation of encapsulation, inheritance, and polymorphism. It then maps the UML to various VB deliverables. Highlights include mapping the UML class to VB class modules; mapping use case pathways to VB entity, interface, and controller types of classes; and mapping component diagrams to VB executables and DLLs and optionally to MTS.

Chapter 3: Getting the Project Started

This chapter explores the case study used in the book, Remulak Productions. This fictional company sells musical equipment and needs a new order entry system. It introduces a project charter, along with a tool, called the event table, to help quickly solidify the application's features. Further, the chapter maps events to the first UML model, the use case.

Chapter 4: Use Cases

This chapter reviews the use case, one of the central UML diagrams. Included is a template to document the use case. Actors and their roles in the use cases are defined. The chapter reviews the concept of use case pathways, as well as the project's preliminary implementation architecture. Also reviewed is an approach to estimating projects that are built by using the use case approach.

Chapter 5: Classes

This chapter explores the UML class diagram, the king of UML diagrams. It offers tips on identifying good class selections and defines the various types of associations. It also covers business rule categorization and how these rules can be translated into both operations and attributes of the class. Finally, it discusses the utilization of the visual modeling tool, Rose, as a means to better manage all UML artifacts.

Chapter 6: Building an Early Prototype

This chapter reviews unique user interface requirements of each use case. It develops an early prototype flow and an eventual graphical prototype. Finally, it maps what was learned during the prototype to the UML artifacts.

Chapter 7: The Dynamic Elements of the Application

This chapter discusses the dynamic models supported by the UML, exploring in depth the two key diagrams, often referred to as the interaction diagrams, sequence and collaboration. These are then directly tied back to the pathways found in the use cases. Other dynamic diagrams discussed include the state and activity diagrams.

Chapter 8: The Technology Landscape

This chapter covers the importance of separating logical services that are compliant with DNA. It explores technology solutions specific to the Remulak Productions case study, including distributed solutions using DCOM, MTS, and the Internet using HTML forms and ASP. Two scripting languages are used for the Internet portion of the applications.

Chapter 9: Data Persistence: Storing the Objects

This chapter explores the steps necessary to translate the class diagram into a relational design to be supported by both Microsoft SQL Server and Oracle databases. It offers rules-of-thumb regarding how to handle class inheritance and the resulting possible design alternatives when translating the class diagramto an RDMBS. It also explores VB's support for data-aware classes, as well as the importance of a separate Data Translation Services layer that contains the SQL logic related to each class.

Chapter 10: Applying the Infrastructure

This chapter finalizes the design necessary to implement the various layers of the application. It also presents the communication mechanism utilized between the layers and possible alternatives. Each class is delegated to one of three types: entity, interface, or control. These are used as the basis for the design implementation and as the solution to providing alternative deployment strategies.

Chapter 11: Generating Code from the UML Class Diagram (Part 1)

This chapter explores the issues of generating VB code directly from the class diagram, again using Rose. It reviews the setup steps necessary to make the process go smoothly and discusses the importance of the entire process of round-trip reengineering, along with a process to ensure that it happens.

Chapter 12: Generating Code from the UML Class Diagram (Part 2)

This chapter fills in the body of the VB class stubs generated in the previous chapter, focusing on a single pathway through a use case. It also presents all of the code necessary to make it a reality, from the user interface to the back-end.

Chapter 13: Creating a Distributed Implementation: DCOM and MTS

This chapter uses the solutions built in Chapters 12 and 13 to explore the necessary steps to deploy it on various server configurations. It covers all of the tasks necessary to ensure a successful DCOM implementation, including using the deployment wizard and using various utilities to ensure that both the client and server are correctly set up.

Chapter 14: Alternative Interfaces: The Internet

This chapter covers one of the hottest areas today: the Internet. This is where all of the design work covered in the previous chapters really pays off. In the chapter, an HTML form-based front-end to the order entry inquiry function is created. ASP is used as the interface between the browser and the layers of the VB application. The chapter explores VBScript as the primary scripting language on the Web server and JavaScript as used on the browser. Microsoft's Visual InterDev is used as the development tool for this part of the project.

Updates and Information

I have the good fortune to work with top companies and organizations not only in the United States, but also in Europe, Asia, and South America. In my many travels, I am always coming across inventive ideas regarding how to use and apply the UML to build more-resilient applications that use not only VB but also C++ and Java. Please visit my Web site at www.jacksonreed.com, where you can get the latest on the training and consulting services that I offer, as well as all of the source code presented in this book. I welcome your input and encourage you to contact me at prreed@jacksonreed.com.



0201615797P04062001

Updates

Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership