.NET
  Home arrow .NET arrow Page 2 - 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 - Modeling a Logon Process


    (Page 2 of 8 )

    For the first short, get-up-to-speed-fast, hands-on example in this chapter, we’ve decided to model a process that many people create the code for during their career: a logon process. For the modeling of the logon process, you need VEA 2003. Basically, you model the class in Visio, and later you generate the code in VB .NET or C#. You can then include the generated output in a VS .NET project.

    Creating the VB .NET Class

    Let’s get started with creating the class on the class diagram in our UML model. In Exercise 1-1, you will start a new UML diagram and add a class to it.

    EXERCISE 1-1

    1. Open VEA.

    2. To create a new UML model, select File -> New -> Software -> UML Model Diagram. It doesn’t matter whether you select the UML Model Diagram (Metric) or the UML Model Diagram (US units). It’s only a matter of page settings and it has nothing to do with different models. Note that one of the two might not appear on your system, depending on what you selected during setup.

    3. Create a class by dragging the Class icon from the UML Static Structure tab in the Shapes window, usually located on the left side at the top. VEA should now look like Figure 1-1.


    TIP The diagram view will probably be so small it will be hard to read when you first open it. However, you can change that by selecting a menu command in the View -> Zoom menu. There’s also a list box on the toolbar for this purpose.


    Figure 1-1.  VEA open with a new UML model diagram

    You have the class diagram (static structure diagram) that you’ll be working with. Now it’s time to add attributes (variables and properties) and operations (procedures, event handlers, constructors, and destructors). You also need to give the class a name representing the functionality of the class. Exercise 1-2 shows how to do this.

    EXERCISE 1-2

    1. Open the UML Class Properties dialog box by right-clicking the class (Class1) on the diagram and selecting Properties from the pop-up menu. You can also double-click the class.

    2. Name the class Logon by typing it in the Name text box, as shown in Figure 1-2.    


    Figure 1-2.  The UML Class Properties dialog box         

       3.  Select the Attributes category in the Categories list.

       4.   Create a new attribute by clicking the New button.

       5.   Type m_userID in the Attribute column.

       6.   Select VB::String from the Type list.

       7.   Repeat steps 4 through 6, giving the second new attribute the 
             name m_password. The UML Class Properties dialog box should
             now look like Figure 1-3. Note that attributes are private by
             default.

       Figure 1-3.  The UML Class Properties dialog box showing attributes


    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

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




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