.NET
  Home arrow .NET arrow The Basics
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

The Basics
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 19
    2005-04-06

    Table of Contents:
  • The Basics
  • Modeling a Logon Process
  • Coding Conventions
  • Generating the VB .NET Code for the Logon Class
  • Generating the C# Code for the Logon Class
  • ER and ORM Diagrams
  • Generating the Database
  • Reverse Engineering a Database

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Basics


    (Page 1 of 8 )

    Have you ever wanted to learn more about Unified Modeling Language models? This article will introduce you to two of them, and then show you how to create code and a database with the models. It is excerpted from Enterprise Development with Visual Studio .NET, UML, and MSF, written by John Erik Hansen and Carsten Thomsen (Apress, 2004; ISBN 1590590422).

    Getting Started: A Modeling Primer

    THIS CHAPTER WILL introduce you to enterprise modeling, enterprise development, and enterprise applications. Because we believe in learning by doing, we’ll also use this chapter to let you get your feet wet. We’ll walk you through two short but useful example models: one that you’ll be able to use to create the skeleton for Visual Basic .NET (VB .NET) and/or C# classes and another that you can use to model the database.

    So, what is it that you’re about to see and learn? Well, as we already mentioned, we give you a fairly easy introduction to two rather simple Unified Modeling Language (UML) models in this chapter. Then we show you how these models are used for creating some “real” code and a database to be used by the code. We’ve written this chapter with the developer in mind, meaning you can generate code directly from the models you create. The UML models presented in this chapter are far from “complete”1 and show only the class diagrams (or static structure diagrams as Visio calls them) and a database model. We assume that you’re acquainted with object-oriented programming (OOP). It’s not that we’ll be going into detail about OOP, but we’ll make use of terms such as class attributes, operations, and so on.

    Basically, the aim of this chapter is to give you a look at what kind of modeling you can do with Visio. There’s plenty of information for you in the upcoming chapters. In Chapter 2, you’ll learn how to design and plan an enterprise solution, and in Chapters 3 through 5, you’ll learn how you can use the various UML models supported by Visio to model your enterprise solution from a very high-level perspective to a very detailed perspective. So, this chapter will primarily serve as an introduction to the following chapters and, as such, the amount of detail in this chapter will vary.

    If you’re fairly new to application or database modeling, or if you’re new to Visio, we suggest you do read this chapter; otherwise, feel free to move on to the next chapter.

    Defining Enterprise Applications, Development, and Modeling

    The word enterprise seems to be the buzzword these days when speaking of software development. You’ll see many things labeled with the word, but it’s rather hard to actually define what it is. In the context of this book, we care about only enterprise applications, development, and modeling, which we describe in the following sections.

    Enterprise Applications

    Enterprise applications are generally defined as applications that are built of many smaller applets, components, or programs. They are typically spread across any number of machines, effectively labeling them n-tier applications, because they consist of more tiers (physically or logically separated machines). Quite often, and ever increasingly so, enterprise applications are also physically separated on different networks across a wide area network (WAN) such as the Internet. Although there is no “proper” definition of enterprise applications, this is a good definition to use.

    Enterprise Development

    So what is enterprise development then? Is it when you’re developing enterprise applications? No, the two are not automatically connected, although they tend to go hand in hand. Enterprise development is when you have a team of developers working on the same solution, mostly on different projects, but sometimes on the same project and sometimes even on the same functionality. Obviously, it takes more to organize enterprise development than other simpler types of development because there are more people involved. All these people must be managed so they don’t perform the same task, or even worse, overwrite changes to the code made by another developer. This is one of those things you can manage by using tools that lock source code, such as Visual SourceSafe (VSS), which is described in Chapter 11.

    On a project with one or two developers, you generally know what your tasks are, but more important, you also know what the other developers’ tasks are. This isn’t so with enterprise solutions, because you don’t have the overview of all the projects that make up an enterprise solution. That is the job of a project manager or someone with a similar role. You can read more about the various roles needed to create enterprise applications in Chapter 20.

    Enterprise Modeling

    Enterprise modeling is when you model your enterprise applications, with modeling literally meaning models of your application and, in most cases, also the enterprise architecture. Enterprise modeling can be a complex task, especially when you factor in everything from working with legacy systems (and legacy people) to politics. However, it isn’t necessarily so. An enterprise task certainly can be a rather large mouthful, but given the right approach, as you’ll learn in the coming chapters, it’s manageable and fairly easy. The keywords are planning and documentation, as you’ll learn in Chapter 2.

    Taking a Quick Look at Visio

    Visio is Microsoft’s modeling tool, and it’s primarily this tool that we’ll be using throughout the book. Visio is different from most other enterprise modeling tools, such as IBM Rational Rose and IBM Rational XDE, because it can be used for many different kinds of modeling, including UML and database modeling, as you’ll see in this chapter. Visio isn’t a new tool, but as a UML modeling tool, it hasn’t been one of the major players in the market, because of its capabilities, or rather, lack of capabilities. However, the latest version of Visio (the one that is bundled with Visual Studio .NET Enterprise Architect Edition) goes a lot further than any previous version of Visio, which is why we’ve chosen to write about it in this book. It’s by no means the best UML modeling tool around, but we do feel that it’s good in many situations.

    The Visual Studio .NET Enterprise Architect (VSEA) edition is the only version of Visual Studio .NET (VS .NET) that comes with the modeling tool Visio for Enterprise Architects (VEA). The other enterprise edition of VS .NET, Visual Studio .NET Enterprise Developer (VSED), doesn’t include Visio. In fact, the modeling tools really separate VSEA and VSED.


    Visio Versions

    The Visio for Enterprise Architects (VEA) 2003 software that comes with VSEA is based on Visio 2002 Professional, which you can buy separately. However, you can’t just buy the VS .NET Enterprise Developer edition and Visio 2002 Professional and hope they will give you the same functionality. VEA has everything that Visio 2002 Professional has, but it also provides integration with the VS .NET integrated development environment (IDE) through the UML add-on. This means that you get added functionality, such as reverse engineering of existing projects to UML models.

    Since the release of VS .NET 2003, Microsoft Office has also been released in a new edition, Microsoft Office 2003. This also means that a new version of Visio has been released, Visio 2003, but only Visio Professional 2003 has some of the software modeling features that the VEA 2003 software has. You can see a Visio 2003 edition comparison at http://www.microsoft.com/office/visio/prodinfo/editions.mspx.

    The latest edition of Visio has more features than VEA and Visio 2002 Professional, as you would expect, but only VEA has the UML add-on that allows code generation and forward engineering from UML diagrams. Visio Professional 2003 allows only reverse engineering of code. So, if you need to create code skeletons from UML diagrams, your only option at the time of writing (early 2004) is to install VEA. However, you can have both VEA and Visio 2003 installed at the same time (but because the installations overlap, Windows Installer is used to configure the active installation when you swap between the two). You can see a version comparison at http://www.microsoft.com/office/visio/prodinfo/compare.mspx.

    Note that the documents produced with Visio 2003 are not compatible with previous versions.


    Although Visio is a stand-alone product in the Microsoft Office family line of software, it’s also a professional tool for software architects, among others, which is really why you’re reading this. If you’re familiar with Visual Basic (VB) 6.0, you might be familiar with Visual Modeler, the rudimentary UML tool that came with VB Enterprise Edition (and was even available as a separate download for VB 5.0). This tool, which was licensed from Rational Software, has been replaced with VEA in VS .NET. Visual Modeler (which we guess, by the best of opinions, was a decent tool) was really just a “lite” version of Rational Rose from Rational Software2 (http://www.rational.com). Chapter 12 will give you a detailed introduction to Visio. We’ll compare Visio to IBM Rational products in Chapter 19.


    NOTE If your customer doesn’t own a copy of Visio, they can download the Visio Viewer that works with Microsoft Internet Explorer 5.0 or later from http://www.microsoft.com/downloads/details.aspx? FamilyID=3fb3bd5c-fed1-46cfbd53da23635ab2df&DisplayLang=en. This also applies for those parts of your organization that only need to read Visio diagrams and not create them. However, they could use the Web Publish facility. You can also download a trial version of Visio 2003 from http://www.microsoft.com/office/visio/prodinfo/trial.mspx.


    This article is excerpted from Enterprise Development with Visual Studio .NET, UML, and MSF by John Erik Hansen and Carsten Thomsen (Apress, 2004; ISBN 1590590422). Check it out at your favorite bookstore today. Buy this book now.

    More .NET Articles
    More By Apress Publishing


     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT