final project presentation

33
SetFocus .NET Masters Program Framework Project and Library Management System Project Developed By: Zaccheus Roserie

Upload: zroserie

Post on 20-Jun-2015

1.619 views

Category:

Documents


0 download

DESCRIPTION

Final Project completed during SetFocus Training

TRANSCRIPT

Page 1: Final Project Presentation

SetFocus .NET Masters ProgramFramework Project and Library Management System Project

Developed By: Zaccheus Roserie

Page 2: Final Project Presentation

Framework ProjectDeveloper: Zaccheus

RoserieEmail:

[email protected]

Page 3: Final Project Presentation

ObjectiveBuild parts of the business tier for a retail company. To achieve this two Assemblies were created: Foundation and AppTypes.

SummaryThis project demonstrated the use of OOP techniques and the .NET framework. Some of the techniques implemented into this project include:

Exception Handling. (using pre existing exceptions and building custom exceptions). Inheritance, Polymorphism, Encapsulation Abstract Classes and Interfaces Events and Delegates Serialization Generic Collections Creating and implementing custom Enumerators Properties Enumeration Creating and implementing custom attributes

SetFocus Project #1 – Framework Project

Page 4: Final Project Presentation

SetFocus Project #1 – Framework ProjectFoundation Assembly

Page 5: Final Project Presentation

SetFocus Project #1 – Framework ProjectAppTypes Assembly

Page 6: Final Project Presentation

/// <summary> /// Interface details required properties for abstractions with a mailing address. /// </summary> public interface I Address { /// <summary> /// Address Property /// </summary> /// <value>Automatic set used to set the address</value> string Address { get; set; }

/// <summary> ///City Property /// </summary> /// <value>Automatic set used to set the City</value> string City { get; set; }

/// <summary> /// Region Property /// </summary> /// <value>Automatic set used to set the Region</value> string Region { get; set; }

/// <summary> /// Postal Code property /// </summary> /// <value>Automatic set used to set the Postal Code</value> string Postal Code { get; set; } }

SetFocus Project #1 – Framework ProjectAddress Interface

Page 7: Final Project Presentation

/// <remarks> /// Description Attribute created to allow the developer to specify information /// about himself for the newly created class. Developer name, date and title /// are field which can be specified. /// Description can be applied to Assembly, Class, Interface and Enum /// </remarks> [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Interface| AttributeTargets.Enum, AllowMultiple = true)] public class DeveloperInfoAttribute : Attribute { /// <summary> /// Non-Default Constructor /// </summary> /// <param name="name"></param> public DeveloperInfoAttribute(string name) { Name = name; }

/// <summary> /// Name Property /// </summary> /// <value>Automatic set used to assign value</value> public string Name { get; set; }

/// <summary> /// Date Property /// </summary> /// <value>Automatic set used to assign value</value> public string Date { get; set; }

/// <summary> /// Title Property /// </summary> /// <value>Automatic set used to assign value</value> public string Title { get; set;} }

SetFocus Project #1 – Framework ProjectAddress Interface

Page 8: Final Project Presentation

/// <remarks> /// Description Attribute created to allow the developer to specify information /// about himself for the newly created class. Developer name, date and title /// are field which can be specified. /// Description can be applied to Assembly, Class, Interface and Enum /// </remarks> [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Interface| AttributeTargets.Enum, AllowMultiple = true)] public class DeveloperInfoAttribute : Attribute { /// <summary> /// Non-Default Constructor /// </summary> /// <param name="name"></param> public DeveloperInfoAttribute(string name) { Name = name; }

/// <summary> /// Name Property /// </summary> /// <value>Automatic set used to assign value</value> public string Name { get; set; }

/// <summary> /// Date Property /// </summary> /// <value>Automatic set used to assign value</value> public string Date { get; set; }

/// <summary> /// Title Property /// </summary> /// <value>Automatic set used to assign value</value> public string Title { get; set;} }

SetFocus Project #1 – Framework ProjectDeveloper Attribute

Page 9: Final Project Presentation

Library Management SystemDeveloper: Zaccheus

RoserieEmail:

[email protected]

Page 10: Final Project Presentation

ObjectiveCreate a Windows Forms-based front-end application that will provide a librarian with a visual interface through which the librarian may perform the desired functions. Required functionality included checking in and out books from the library as well as adding new members (adult or juvenile).

SummaryThis project demonstrates the use of .NET Windows form based development techniques. Some of the techniques implemented into this project include:

N-tier based architecture for scalability. User input validation and feedback using error providers. User input validation using regular expressions. Exception and Error handling. Implementation of a UI that requires minimal training for Librarians.

SetFocus Project #2 – Library Phase 1

Page 11: Final Project Presentation

SetFocus Project #2 – Library Phase 1Library Manager Application – Main Form

Page 12: Final Project Presentation

SetFocus Project #2 – Library Phase 1Library Manager Application – Member Information

Display Adult Member Information

Page 13: Final Project Presentation

SetFocus Project #2 – Library Phase 1Library Manager Application – Member Information

Display Juvenile Member Information

Page 14: Final Project Presentation

SetFocus Project #2 – Library Phase 1Library Manager Application

Add new Adult Member Add new Juvenile Member

Page 15: Final Project Presentation

SetFocus Project #2 – Library Phase 1Library Manager Application

Checking a Book into of the Library

Page 16: Final Project Presentation

SetFocus Project #2 – Library Phase 1Library Manager Application

Checking a Book into of the Library

Page 17: Final Project Presentation

SetFocus Project #2 – Library Phase 1Library Manager Application

Checking a Book out of the Library

Page 18: Final Project Presentation

ObjectiveIn the Phase 1 project we were given the data access layer and created the presentation layer which interfaced with the Data access layer via the Business logic layer. In Phase 2, we recreated the Data Access Layer which consisted of the various Entities used by the application layers.

SummaryThis project demonstrates the use of ADO.NET, LINQ as well as ORM (Object Relational Modeling). Transact-SQL was also used to access the database, which was managed using SQL-Server 2008. Some of the techniques implemented into this project include:

Recreate the Data Access Layer while keeping existing functionality within all other application layers. Implement error handling in SQL stored procedures. Process errors received from stored procedures in ADO.NET using SQL state codes returned by stored procedures. Creating stored procedures in Transact-SQL on SQL-Server 2008. Using LINQ to retrieve and process result sets (using the entities data context) Retrieve and process result sets returned from SQL stored procedures. Writing comprehensive test scripts for testing stored procedure functionality. Utilize strongly typed datasets based on result sets of stored procedures.

SetFocus Project #3 – Library Phase 2

Page 19: Final Project Presentation

adultmember_no

street

city

state

zip

phone_no

expr_date

copyisbn

copy_no

title_no

on_loan

itemisbn

title_no

translation

cover

loanable

juvenilemember_no

adult_member_no

birth_date

loanisbn

copy_no

title_no

member_no

out_date

due_date

loanhistisbn

copy_no

out_date

title_no

member_no

due_date

in_date

fine_assessed

fine_paid

fine_waived

remarks

membermember_no

lastname

firstname

middleinitial

photograph

reservationisbn

member_no

log_date

remarks

titletitle_no

title

author

synopsis

Data Access Layer - Entities

SetFocus Project #3 – Library Phase 2

Page 20: Final Project Presentation

SetFocus Project #3 – Library Phase 2Transact- SQL : Stored Procedures

-- =============================================-- Author: Zaccheus Roserie-- Create date: 8/14/2009-- Description: Adds a new Adult into the adult table-- Errors-- state 1-- raiserror('firstname, lastname, street, city, state and zipcode can not be null',11,1)

-- =============================================CREATE PROCEDURE [dbo].[spAddAdultMember]

-- Add the parameters for the stored procedure here @firstname varchar(15) = null, @lastname varchar(15) = null, @middleinitial char(1) = null, @photograph image = null, @street varchar(15) = null, @city varchar(15) = null, @state char(2) = null, @zipcode char(10) = null, @phone_no char(13) = null, @member_no smallint OUTPUT

ASBEGIN

-- SET NOCOUNT ON added to prevent extra result sets from-- interfering with SELECT statements.SET NOCOUNT ON;

--validate paramsIF @firstname is null or @lastname is null or @street is null or @city is null or @state is null or @zipcode is null BEGIN raiserror(' firstname, lastname, street, city, state and zipcode cannot be null', 11,1)END

Page 21: Final Project Presentation

--set the expiration date to one year from today's dateDECLARE @expr_date datetimeSET @expr_date = DATEADD(YEAR,1,GETDATE());

ENDBEGIN TRY BEGIN TRAN -- Insert statements for procedure here INSERT INTO [library].[dbo].[member]

([lastname], [firstname], [middleinitial], [photograph]) VALUES (@lastname, @firstname, @middleinitial, @photograph)

set @member_no = scope_identity() INSERT INTO [library].[dbo].[adult]

([member_no], [street], [city], [state], [zip], [phone_no], [expr_date]) VALUES (@member_no, @street, @city, @state, @zipcode, @phone_no, @expr_date) COMMIT TRANEND TRYBEGIN CATCH

-- See if system error arose during Transaction if @@TRANCOUNT > 0 BEGIN ROLLBACK TRAN END

PRINT 'Error(s) Caught' -- Declare local variables DECLARE @ErrorMessage NVARCHAR(4000); DECLARE @ErrorSeverity INT; DECLARE @ErrorState INT; -- Populate variables SELECT @ErrorMessage = ERROR_MESSAGE(),

@ErrorSeverity = ERROR_SEVERITY(), @ErrorState = ERROR_STATE(); -- rethrow goes to front end c# RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState); RETURNEND CATCH

Page 22: Final Project Presentation

ObjectivePhase 3 represented the transition of the User interface from a windows forms application to a web based application using ASP.Net. In addition to the previous functionality implemented in the first 2 phases, new functionality was also implemented in phase 3 and are as follows:

Providing the Librarian with the ability to renew an adult members expired membership card. Automatically updating Juvenile members of the library to adult members if they have encountered or passed their

18th birthday.Providing the Librarian to add new books of additional copies of existing books into the library.

SummaryThis project demonstrates the use of ADO.NET and LINQ but has a core focus on ASP.NET. Some of the techniques implemented into this project include:

Create and use ASP.NET master pages to provide a more organized and consistent look and feel throughout the website.

Databinding gridviews through the use of an ObjectDataSource control. Utilizing various validation controls to validate user input before postbacks. Use of validation summaries to obtain user feedback to deal with input validation Utilizing ViewState and SessionState objects. Use of Membership Roles to restrict user access to pages.

SetFocus Project #4 – Library Phase 3

Page 23: Final Project Presentation

SetFocus Project #4 – Library Phase 3Library Manager ASP.Net Login Page

Page 24: Final Project Presentation

SetFocus Project #4 – Library Phase 3Library Manager ASP.Net Web Application

Display an Adult Member

Page 25: Final Project Presentation

SetFocus Project #4 – Library Phase 3Library Manager ASP.Net Web Application

Display a Juvenile Member

Page 26: Final Project Presentation

SetFocus Project #4 – Library Phase 3Library Manager ASP.Net Web Application

Renew an Expired Membership

Page 27: Final Project Presentation

SetFocus Project #4 – Library Phase 3Library Manager ASP.Net Web Application

Renew an Expired Membership

Page 28: Final Project Presentation

SetFocus Project #4 – Library Phase 3Library Manager ASP.Net Web Application

Renew an Expired Membership

Page 29: Final Project Presentation

SetFocus Project #4 – Library Phase 3Library Manager ASP.Net Web Application

Add a new copy of an existing Book

Page 30: Final Project Presentation

ObjectiveThe main focus of this project was to add another layer to our Library management application as well as implement a WCF service. As the potential to acquire libraries and creating partnerships with others increases, we see the need to take the library system to the next level – allow interoperability with other systems. The web service, once implemented will allow for communication with these different systems but also allowing us to keep the application layers which already exist intact.

SummaryThis project demonstrates the use of the Windows Communication Foundation to implement web services . Some of the techniques implemented into this project include:

WCF services. Authorization using ASP.Net roles. Authentication using ASP.Net membership. Implementing Data Contracts into Data Access Layer Entities to allow Serialization across various application layers. Implementing Fault Exceptions and error handling.

SetFocus Project #5 – Library Phase 4

Page 31: Final Project Presentation

[ServiceContract] public interface ILibraryService { [OperationContract] [FaultContract(typeof(LibraryFault))] Adult AddAdultMember(Adult adltMember);

[OperationContract] [FaultContract(typeof(LibraryFault))] Juvenile AddJuvenileMember(Juvenile jvnMember);

[OperationContract] [FaultContract(typeof(LibraryFault))] Member getMemberInformation(Int16 memberId);

[OperationContract] [FaultContract(typeof(LibraryFault))] ItemsDataSet getItems(Int16 memberId);

[OperationContract] [FaultContract(typeof(LibraryFault))] Item getItem(Int32 isbn, Int16 copyNumber);

[OperationContract] [FaultContract(typeof(LibraryFault))] Member getMemberItemOnLoanTo(Int32 isbn, Int16 copyNumber);

SetFocus Project #5 – Library Phase 4Library Service Interface

Page 32: Final Project Presentation

[OperationContract] [FaultContract(typeof(LibraryFault))] void UpgradeJuvenileMembership(Int16 memberId);

[OperationContract] [FaultContract(typeof(LibraryFault))] void RenewMembership(Int16 member_no);

[OperationContract] [FaultContract(typeof(LibraryFault))] void CheckBookIn(Int32 isbn, Int16 copyNumber);

[OperationContract] [FaultContract(typeof(LibraryFault))] void CheckBookOut(Int16 memberNumber, Int32 isbn, Int16 copyNumber);

[OperationContract] [FaultContract(typeof(LibraryFault))] int AddNewTitle(Int32? isbn, Int16? copy_no, string title, string author, string synopsis, string translation, string cover, char? loanable, char? on_loan, int? title_no); }

SetFocus Project #5 – Library Phase 4Library Service Interface

Page 33: Final Project Presentation

[DataContract] public class LibraryFault { [DataMember] public Int16 OtherMemberID { get; private set; }

[DataMember] public ErrorCode FaultErrorCode { get; set; }

[DataMember] public string FaultErrorMessage { get; set; } }

SetFocus Project #5 – Library Phase 4Library Service Interface