Make your own free website on Tripod.com

Online Resume - VB.Net - C#.Net SQL Server Developer

C# .Net Multi-Tiered Application Example

Home | Tim Levito Resume | C# .Net Multi-Tiered Application Example | DataBase / Stored Proc Example | ADO.Net / DataAccess Example | WinForm / Business Layer Example | ASP.Net / Javascript / Html Web Example | Contact Me

This Example starts the path through which an n-Tiered .Net Application is Comprised.
 

The code, comments, and screen shots are a development product of Tim Levito. They are presented as a sample of skills and knowledge in particular areas of Microsoft's .Net Framework and are not an attempt to display the complete code for a compileable functioning application.
 
The Following considerations were the basic functional requirements influencing the design and implementation of the Library Management Application, the Library Online Management Application, and the underlying DataAccess Database.
 
 
 
 

The Application was designed to perform certain tasks.
 
The five major tasks were:
 
1. Look Up a Members Information
2. Check Out Books
3. Check In Books
4. Add an Adult Member
5. Add a Juvenile Member
 
First Lets look at the Member Lookup page which is the primary page to the front end application. 
 

getmemberinfo.jpg

In this Tab Controlled Form Layout, the user has fast, easy, and intuitive access to any of the five primary transactions provided by the Library Management Application.
 
The Get Member Information page is shown and is the logical starting point for any Library Transaction. This page is used to do the primary lookup on a member before the typical "Check Item IN", "Check Item Out" Library Transaction could occur.
 
The Member ID number is read by the Librarian from the Member ID Card and inserted into the TextBox in the upper left corner.  Next the tab progression navigates you to the "Do Member Lookup" button.
 
The Click Event on the Member ID button Executes the C# code in the
Event Handler Shown below.

eventhandlerdolookupbutton.gif

Before the Button Click Event Handler Method updates the member information into the other textboxes on the form. It checks to ensure that there weren't any Validation offenses contained in the value passed in from the user and that the value being passed is not null.
 
Because looking up a member and populating the appropriate controls is a common activity in the course of completing transactions in the Library Application, the "DoMemberLookUpAndPopulateMethod()" is created as another reusable method which is called upon from several other event handlers through out the form.
 
It's this modular and reusable use that makes object oriented code design so efficient, flexible, and scalable.
 
In the next code example, The validation of the text in the Member Id TextBox is shown.

textboxvalidationcode.gif

To extend on the topic of user input validations, The member's ID number is used in several area's through out the entire application.
 
The validation method for a this value is stored in the Business Layer (tier) and is called to from the Presentation Layer (our form in this case). This type of a modular (plug and use) design allows any application to validate this value regardless of what it was or where it was.
 
For instance, a web client could just as easily validate their MemberID number as the Windows Form did or another process would.
And since all other processes in and using the application use it to validate, if the business rules for validating the MemberID value changed, There would only be one easy to find place in the code to make that change. Next is a second example of user input validation from the Library Management Application's Business Tier.
 
In this example the format and data type for the Zip Code Value is checked for 2 different possible formats with the C# Regex (regular expressions) class and a set of nested IF statements to determine its validity.

validationzipcode.jpg

With every possible call into the database, the Business Layer Validation takes care of providing data validation checks for any number of interfaces which interact with the Library database.
 
In the same respect, the form takes care of proper validation to control the user input at the time of entry by calling the validation method in the business layer.

Both the Business Layer and Presentation layer interface are built with C# in the Visual Studio 2005 Development Interface seen in the design view below.
 

designercheckedoutcopy.jpg

Visual Studio 2005 (C# Designer Veiw).

SQL Server Management Studio 2005 (below)

dataaccessdiagram.jpg

In the next Example, the Data Base and Stored Procedures are examined and described as they relate to the overall .Net Application.

Tlevito@yahoo.com

To Discuss a Current Project Opportunity further please send me an Email with your contact information and a good time to reach you to TLevito@yahoo.com