Project Portfolio Library Administration Web Application Introduction: Utilizing Microsoft .NET technologies and object oriented programming techniques create a windows application and a web application that support the principal functions of a book lending library’s day-to-day operations. Audience: Organizations seeking .NET Developers Project Specs: • Two user interfaces: WinForms and ASP.NET • Multiple tier: User Interface, Business Logic, Entity Information and Data Access • Data access and manipulation through ADO.NET and stored procedures • Web application forms-based authentication and authorization • Support the following librarian operations: o Adding new members (adult and juvenile) o Looking up existing members o Checking out books o Checking in books o Adding books to the library Project Goals: • Design user interfaces that are both intuitive and attractive • Encapsulate business logic, entity information and data access • Maximize database flexibility and control while minimizing resource utilization • Validate user input • Provide adequate and centralized error handling • Write code that is easily maintainable • Use standard naming conventions • Comment code thoroughly 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Project Portfolio Library Administration Web Application
Introduction:Utilizing Microsoft .NET technologies and object oriented programming techniques create a windows application and a web application that support the principal functions of a book lending library’s day-to-day operations.
Audience:Organizations seeking .NET Developers
Project Specs:• Two user interfaces: WinForms and ASP.NET• Multiple tier: User Interface, Business Logic, Entity Information and Data Access• Data access and manipulation through ADO.NET and stored procedures
• Web application forms-based authentication and authorization • Support the following librarian operations:
o Adding new members (adult and juvenile)
o Looking up existing members
o Checking out books
o Checking in books
o Adding books to the library
Project Goals:
• Design user interfaces that are both intuitive and attractive• Encapsulate business logic, entity information and data access
• Maximize database flexibility and control while minimizing resource utilization
• Validate user input
• Provide adequate and centralized error handling
• Write code that is easily maintainable
• Use standard naming conventions
• Comment code thoroughly
1
User Interface
Page Layout• Master page sets ContentPlaceHolder controls to simplify and standardize web pages
Implementation and Logic FlowThe implementation of business requirements and the basic flow of logic are illustrated below by extracted code used to add an adult member to the library. As described in the previous section most user input has been validated via server validator controls. Once the user clicks the ‘Add’ button from the ‘Add a Member’ page the User Interface Tier processes that input and makes a call to the Business Logic Tier. The Business Logic Tier applies business rules and makes a call to the Data Access Tier. The Data Access Tier formats the data appropriately and makes a call to the stored procedure. Assuming no exceptions control is passed back up the call chain to the User Interface Tier and the results displayed back to the user.
Add Adult MemberUser Interface Tier
/// <summary>MemberAdd: User interface class for adding a library member</summary>public partial class MemberAdd{
}/// <summary>/// btnAdd_Click: This method is called when the user clicks the ‘Add’ button on /// the ‘Add a Member’ form. By now the data has been validated. /// A BusinessMember instance is created and populated from UI data. /// Note: Expiration date is set by the stored procedure to one year in the future./// </summary>protected void btnAdd_Click(object sender, EventArgs e){
BusinessMember myMem = new BusinessMember(); GenExc myExc = new GenExc();
/// <summary> /// BusMember: This class is a middle tier - called from the Library user interface /// to enforce business rules before passing instructions on to finalize transactions /// in the Library data access tier. /// </summary> public class BusMember {
/// <summary>BusMember: Default constructor</summary>public BusMember(){} /// <summary>/// AddMemberAdult: This method is called to process a new adult /// membership. An instance of the data access class is created to /// update the database. The member id and expiration date are /// set by the stored proc called from the data access tier./// </summary>/// <param name="theExc">Output parm to return exception data</param> /// <returns>void</returns>public void AddMemberAdult(ref GenExc theExc){
namespace Library.DataAccess {/// <summary>/// LibDataAccess: This class contains the methods and properties to commit validated/// business transactions to the library data base. The methods in this class are called /// from the business tier and in turn call library database stored procedures to retrieve /// and/or record data./// </summary>public class LibDataAccess{
/// <summary>Default Constructorsummary>public LibDataAccess() { }/// <summary>/// AddMember:Data access tier routine to add an adult member./// Common routines called: /// FmtParmArray: Formats member data into parameters for stored proc/// CallSP: Makes the call to the stored proc/// </summary>/// <param name="theMem">AdultMember instance to provide member info</param>/// <param name="theExc">Output parm to return exception data</param>/// <returns>void</returns>public void AddMember(AdultMember theMem, ref GenericException theExc){