DEV337 Modeling Distributed Enterprise Applications Using UML in Visual Studio.NET David Keogh Program Manager Visual Studio Enterprise Tools
Agenda Why Model? Working with UML Generating Code Reverse Engineering Code Generating Reports
Session Prerequisites Experience developing Desktop or Web Applications on.NET Experience with Visual C# ™, Visual C++ ®, Visual Basic ®, or Visual Basic.NET Level 200
Quick Usage Survey How many of you… 1. Rigorously use models in development? 2. Use model diagrams to understand? 3. Illustrate key parts of software architecture using models? 4. Never use models?
Modeling Why Model? Better understand potential risks prior to building the system Specify structure or behavior of a system, and communicate it to others Template for constructing a system, and guiding others in using the system Document decisions
Visio Enterprise for Architects UML Model ++ Database Model ++ Gantt Chart Org Chart UML Model Database Model.etc Visio Professional Visio for Enterprise Architects Visio Engine Visio Standard Basic Diagram Basic Flowchart Basic Network.etc
Modeling Enterprise Architect Capabilities UML Software Modeling Full Support for the UML 1.2 Modeling Specification Reverse Engineer UML from existing Code Generate customizable code skeletons for Visual Basic, C++ and C# Automatic semantic error checking Customizable UML reports
Working with UML UML Defined UML is a language for: Visualizing Specifying Constructing Documenting the artifacts of a software-intensive system UML is an open standard Building blocks are elements, relationships and diagrams
Modeling using UML Diagram Types Structural Class Behavioral Use Case, State Chart, Activity, Sequence, Collaboration Implementation Component, Deployment
Working with UML Class Diagram «uses»«uses» «uses» «uses» defaultcategoriesbook searchresultssearch
Working with UML Use Case Diagrams Use cases are commonly used to: Model the context of a system Model the requirements of a system Internet Customer Customer Account Management Purchase Books Product Catalog Search
Working with UML Sequence Diagrams Sequence diagrams are commonly used to: Model flows of control by time ordering : Web::book : BusinessFacade::ProductSystem : DataAccess::Books GetBooksByISBN() GetBooksByAuthor() GetBooksByNaturalLanguage() GetBooksBySubject() GetBooksByTitle() GetBookById()
Working with UML Additional Diagrams Collaboration diagrams are commonly used to: Model flows of control by organization State chart diagrams are commonly used to: Model reactive objects Activity diagrams are commonly used to: Model a workflow or an operation Component diagrams are commonly used to: Model source code, executable releases, physical databases, adaptable systems Deployment diagrams are commonly used to: Model embedded systems, client/server systems, fully distributed systems
Working with UML Demo #1 demo demo
Generating Code The Basics Enterprise Architect allows you to: Generate code for specific classes Generate code as part of a new project Windows ® Forms, ASP.NET, Class Library, Web Service, etc. Generates code in a specific language: C# C++ Visual Basic.NET Generate code based on code templates
Generating Code Operations Operations can be generated as: Property Procedure Event Constructor or Destructor Specify location for individual class files that are generated Preview pane to view the code that will be generated Code Templates for Classes, Attributes, Operations, etc.
Generating Code Error Checking UML Diagram are also checked for two types of errors: Semantic Code Semantic errors include missing and incomplete information related to the diagram Code errors include errors that could prevent generated code from compiling successfully
Generating Code Demo #2 demo demo
Reverse Engineering Basics Integrated into Visual Studio ®.NET Enterprise Project | Visio UML | Reverse Engineer Visio UML Add-in toolbar button Specify location and file name New Visio model created Classes ready to be used in diagrams Visio diagram added to Solution Items
Reverse Engineering Demo #3 demo demo
Generating Reports Basics UML | Reports menu Allows you to generate a wide variety of reports Static Structure State Chart Component Deployment Activity Report presentation is customizable
Generating Reports Report Contents You can limit the scope of the report Base the report on: Active diagram Entire UML Model Specify object categories to include Each report has its own categories Each category has its own level of detail Choose custom separators for each new models, packages, components, etc. UML Reports can be customized
Generating Reports Additional Reporting Options Save UML diagrams as a web page HTML frame format Tabs for navigating multiple diagrams Embed diagrams in existing frames Easy to publish information on an Intranet Print or preview UML diagrams
Generating Reports Demo #4 demo demo
Session Summary Model driven development: mechanism to ensure consistent, repeatable architectures in application development UML methodology promotes model driven development Visual Studio.NET Enterprise Architect provides: Semantic model creation Code generation Reverse engineering Report generation
For More Information… Visual Studio.NET Enterprise se/default.aspx XMI Export available from (search on XMI export) MSDN and Visual Studio.NET GotDotNet communities on architecture and design More on Application Modeling: HOL-DEV24
Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide User Groups Meet and learn with your peers
evaluations evaluations
© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.