SlideShare uma empresa Scribd logo
1 de 51
SetFocus.Net Project Portfolio Jeriel Mikell 773-995-5418 mailto:jeriel.mikell@yahoo.com
Table of Content Introduction   / Summary                               			3 Projects:  Project 1 FrameWork   Business Project        			5 FrameWork Code Snippets          				6,7 Phase 2 Library Project                                   			10 Windows Front End   Validation                                      				11 - 15                                                Phase 3 Library Project                                   			16 Create  DataAccess Tiers Phase 4 Library Project                                  			28   Integrate into a Web Project    Phase 5 Library Project                                  			44 Integrate into a Web Service
.NET Projects Overviewpage 2 Summary  Project 1 .NET Framework Foundation  Build parts of the business tier for a retail company, consisting of two assemblies; Foundation and AppTypes. The Foundation class library contains various interfaces and base classes. The AppTypes class library contains various entity, collection, and exception classes used by the various business processes.  Project 2 Library Phase 1  Given an ADO.NET data access library to a SQL database that contains Library books, adult and juvenile members, develop an intuitive Windows Forms user interface that requires minimal training. Development of business tier software that isolates the ADO.NET code from the user interface is also required to add members, check books in and out of the database. Additional requirements include validation of all input parameters including regular expression validators, exception handling minimizing resource utilization.  Project 3 Library Phase 2  Using the UI developed in Library Phase 1 project, the requirement here is to convert the ADO.NET data access tier to use LinqToSQL to develop object models and abstract away data provider code and modify the business tier software as required to interface with this new data access tier. Develop code that is easily maintainable and provides adequate error handling.
.NET Projects Overviewcont.  .NET Framework Projects Overview  Project 4 Library Phase 3  Convert the user interface of the Library Phase 2 project to a Web application preserving all of the Windows Forms functionality. Specific requirements include the use of AJAX controls for book check in and implementing a secure login for the librarian to access to the library functions using forms based authorization and authentication. Additional functionality includes the ability to add books or another copy of an existing book to the database, automatically convert juvenile members to adult members when they turn 18, and allow the option to renew a membership that has expired.  Project 5 Library Phase 4  Allow Interoperability of the Library project with other systems by implementing Windows  Communication Foundation (WCF) Web Services called from the web based user interface that provides a secure communication mechanism to the library business layer. Authorization and authentication of the transport channel shall be provided using ASP.NET membership and role permissions.  Project 6 Test Management Application
FrameWork ProjectProject 1 The FrameWork project features parts of the business tier for a retail company, consisting of two assemblies; Foundation and AppTypes. The Foundation class library contains various interfaces and base classes. The AppTypes class library contains various entity, collection, and exception classes used by the various business processes.
FrameWork Interface
Partial FrameWork Code SnippetsDefine the Supplier classApplication Type /// <summary> / Supplier Class     [DeveloperInfoAttribute( "JerielMikell",  "Programmer",  "11072009")]     [CustomDescriptionAttribute("Supplier Class")]     [Serializable]  public sealed class Supplier : Contact     {         //Fields /// <summary> /// HomePage /// </summary>         public string _homePage; /// <summary> /// SupplierType type ///  /// </summary>         public SupplierTypes   _type;         //Properties         /// <summary>         /// public property HomePage         /// </summary>         public string HomePage         {             get             { return _homePage; }             set             {                 if (value.Length < 5 || value.Length > 50)                     throw new InvalidOperationException("HomePage must be between 5 and 50 characters" + _homePage);                 else                     _homePage = value;             }
Supplier Typecont.  /// <summary>         /// Supplier Types can not be null /automatic property for Type         /// </summary>         public SupplierTypes Type          {             get { return _type; }             set             {                if (_type == 0)                     throw new InvalidOperationException(_type +"Supplier Type must not be Empty" );                 else                 _type = value;             }         }                           /// <summary>         /// defalultconstuctor         /// </summary>         public Supplier()         { }         //overload constructor
Supplier Typecont /// <summary> /// Overloaded constructor /// </summary> /// <param name="id"></param> /// <param name="companyname"></param> /// <param name="contactname"></param> /// <param name="contacttitle"></param> /// <param name="address"></param> /// <param name="city"></param> /// <param name="region"></param> /// <param name="postalcode"></param> /// <param name="country"></param> /// <param name="phone"></param> /// <param name="fax"></param> /// <param name="_homepage"></param> /// <param name="_type"></param>         public Supplier(int id, string companyname, string contactname, string contacttitle, string address, string city, string region,              string postalcode, string country, string phone, string fax, string _homepage, SupplierTypes _type)                                      : base(id, companyname, contactname,contacttitle,address,city,region,postalcode,country,phone,fax)           {  this.HomePage = _homepage; this.Type =  _type;                 this.id = id; this.companyName = companyname; this.contactName = contactname; this.contactTitle = contacttitle; this.Address = address; this.City = city; this.Region = region; this.PostalCode = postalcode; this.Country = country; this.Phone = phone; this.Fax = fax;           }
Supplier structure         //DataAccess constructor  //   [DeveloperInfoAttribute("JerielMikell" ,"Programmer","11072009")]     [CustomDescription("DataAccessctor")]         public Supplier(DataAccess.SupplierStructmyStruct)         {              this.ID = myStruct.ID; this.CompanyName = myStruct.CompanyName; this.ContactName = myStruct.ContactName; this.ContactTitle = myStruct.ContactTitle; this.Address = myStruct.Address; this.City = myStruct.City; this.Region = myStruct.Region; this.PostalCode = myStruct.PostalCode; this.Country = myStruct.Country; this.Phone = myStruct.Phone; this.Fax = myStruct.Fax;             // finish assigning all properties         }
Library Project Phase 2 LWindows Front-End Application  Requirements  Design and develop a front end application that satisfies the four basic functionalities: Add Adult, Add Juvenile, Check In a book, Check  Out a book.  Develop code that is easily maintainable.  Provide validation for all required fields (see details below).  Provide adequate error handling.  Produce a user interface that is intuitive, requiring minimal training for users while minimizing resource utilization.  Provisions  Database scripts are provided in order to create the Library database (see APPENDIX A).  An interface that specifies the methods supported by the Data Access tier used for all database access and a class that implements the interface are provided. Classes that represent various “business entities” (e.g., an AdultMember class) are also provided. Detailed information appears in Appendix B.  A reference implementation that illustrates one possible solution for this project is provided. The reference implementation is not intended as a model to be emulated in your solution; rather, it serves only to illustrate how you might implement your solution, rather than how you must implement your solution. If you wish to use the reference implementation as a basis for how your implementation will appear and function, you are free to do so, but you are not obligated to replicate the appearance of the reference implementation.  A database has been created to support the principal functions of a lending library’s day-to-day operations: adding new members (adult and juvenile) and checking books in and out. An assembly has been created that contains classes and interfaces that provide access to the database for these functions. What is needed is a Windows Forms-based front-end application that will provide a librarian with a visual interface through which he or she may perform the desired functions
Shared members within the Library Project
Front end validation If a value is entered into the middle initial field, that field must be validated to ensure that the value entered is a single alphabetic character.  If a value is entered into the phone number field, that field must be validated to ensure that the value conforms to the format (XXX)XXX-XXXX, where X is a digit from 0 through 9. Note there is no space after the right parenthesis; the field in the database for the phone number is thirteen characters long, so including a space at this point would cause the phone number to be truncated.  The adult member ID field must be validated to ensure that it contains only a numeric value in the range 1 through 32767 inclusive.  The birthday field must be validated to ensure that it contains a value in the format MM/DD/YYYY and that the value parses to a date that is no more than eighteen years prior to the current date.  When a member ID is entered to perform a member lookup, that field must be validated according to the same rule specified for the adult member ID field above.  For the ISBN and copy number fields used in the check-in and check-out operations, these fields must be validated to ensure that only numeric values are entered. For the copy number field, the value must be in the range 1 through 32767 inclusive.  Suggested Project Techniques : Use menus instead of buttons to free screen space, when appropriate.  Use combo boxes (drop-down lists) and list boxes instead of free-form textboxes for data entry whenever possible.  Avoid overuse of message boxes and other modal communications to the user. Use other display techniques such as a status bar or a label.  Use standard naming conventions to provide code readability.  Make use of collections to produce concise code.  While calls into the data access class’s methods by the presentation tier (i.e., by the code in your Form’s event handlers) are permitted, you might want to consider creating a middle tier for mediating between your presentation tier and the data access tier. Using a middle tier can simplify the code in your presentation tier considerably.
Validation cont. Enrolling Members  To become a library member, an individual must provide his or her mailing address and, optionally, his or her phone number. A librarian then issues the individual a numbered, machine-readable card. This card is good for one year from the date of issue.  Juveniles are considered to be individuals under the age of eighteen. A juvenile can be a member of the library, but must have an adult member sign for them when they join. The juvenile’s address and phone number information is that of the sponsoring adult member, and the juvenile’s card is valid only until the sponsoring adult member's card expires. The only information that the library keeps on a juvenile member is his or her name, sponsoring adult member card number, and his or her date of birth.  Checking Out Books  Books are checked out for 14 days. Members are allowed to have at most four books checked out at a time. Members bring books to the front desk after they locate the ones that they want to check out. A librarian then enters the card number from the member's card. A screen displays information about the member's account, such as name, address, phone number, and the card's expiration date. Ideally, cards that have expired will be highlighted. The screen also displays information about a member's outstanding loans, including title, checkout date, and due date.  If a member's account is in order (i.e., the card is not expired and fewer than four books are on loan to the member currently), a librarian checks out the books. Librarians check out books by entering the ISBN and copy number of the item, both of which appear in a label on the book’s spine. The ISBN, copy number, title, and author information then appear on the computer screen so that the librarian may verify that the database entry corresponds to the item being checked out. The librarian then can elect to check the book out or to cancel the check-out operation.  Occasionally, books are accidentally re-shelved before librarians check them in. If a librarian tries to check out a book that the database lists as already checked out, the librarian should be alerted and be given the opportunity to check the book in before proceeding with the check-out operation.  Checking In Books  When a book is returned to the library, a librarian checks it in by entering the ISBN and copy number that appears on the book’s spine. The ISBN, copy number, title, and author information then appear on the computer screen, as well as the card number and name of the member to whom the book is checked out, and the book's due date. The librarian can then elect to check the book in or to cancel the check-in operation.
Validation cont. Data Validation  To enroll an adult member, the required fields are:  First name  Last name  Street  City  State  Zipcode Middle initial and phone number are optional fields.  To enroll a juvenile member, the required fields are:  First name  Last name  Adult member ID  Birthday  Middle initial is an optional field.  First name and last name fields must be validated to ensure that the values contained in these fields are alphabetic only and that the first character of each of these fields is uppercase.  The Zipcode field must be validated to ensure that only a five-digit (XXXXX) or a nine-digit (XXXXX-XXXX) value is entered.
Validationcont. Value entered is a single alphabetic character.  If a value is entered into the phone number field, that field must be validated to ensure that the value conforms to the format (XXX)XXX-XXXX, where X is a digit from 0 through 9. Note there is no space after the right parenthesis; the field in the database for the phone number is thirteen characters long, so including a space at this point would cause the phone number to be truncated.  The adult member ID field must be validated to ensure that it contains only a numeric value in the range 1 through 32767 inclusive.  The birthday field must be validated to ensure that it contains a value in the format MM/DD/YYYY and that the value parses to a date that is no more than eighteen years prior to the current date.  When a member ID is entered to perform a member lookup, that field must be validated according to the same rule specified for the adult member ID field above.
Validation cont. For the ISBN and copy number fields used in the check-in and check-out operations, these fields must be validated to ensure that only numeric values are entered. For the copy number field, the value must be in the range 1 through 32767 inclusive.  Suggested Project Techniques : Use menus instead of buttons to free screen space, when appropriate.  Use combo boxes (drop-down lists) and list boxes instead of free-form textboxes for data entry whenever possible.  Avoid overuse of message boxes and other modal communications to the user. Use other display techniques such as a status bar or a label.  Use standard naming conventions to provide code readability.  Make use of collections to produce concise code.  While calls into the data access class’s methods by the presentation tier (i.e., by the code in your Form’s event handlers) are permitted, you might want to consider creating a middle tier for mediating between your presentation tier and the data access tier. Using a middle tier can simplify the code in your presentation tier considerably.
Library Project Phase3 Project Phase 3 consist of building the DataAccess and Business Tiers. Preserving the use of the Stored Procedures, validation and ease of access among other features created in the previous project, like members card has expired.
Add Adult stored procedure /* Methods that can be used in the try catch blocks Function Description  ERROR_NUMBER() Returns the number of the error  ERROR_SEVERITY() Returns the severity  ERROR_STATE() Returns the error state number  ERROR_PROCEDURE() Returns the name of the stored procedure or trigger where the error occurred  ERROR_LINE() Returns the line number inside the routine that caused the error  ERROR_MESSAGE() Returns the complete text of the error message. The text includes the values supplied for any substitutable parameters, such as lengths, object names, or times  */ USE library GO                            /*Drop the Procedure before creating it if it exists.*/ IF OBJECT_ID ('usp_AddAdultMember') IS NOT NULL 	DROP PROCEDURE usp_AddAdultMember; GO                          /*Create the Procedure*/ CREATE PROCEDURE usp_AddAdultMember 	@nlastnamevarchar(15),@nfirstnamevarchar(15),@nmiddleinitial char(1), 	@nstreetvarchar(15),@ncityvarchar(15),@nstate char(2), 	@nzip char(10),@nphoneno char(13), @nexpirationDateDateTime, 	@adultmemberidsmallint OUTPUT AS BEGIN 	BEGIN TRY --IF EXISTS SELECT (@noutput_Adultmemberid ) 		--IF EXISTS (SELECT * FROM member WHERE member_no = @adultmemberid) 		--	RETURN -1
Add Adult stored procedure cont  /*Validation Testing*/                         /*Test each field for null or out of Range values*/          IF (@nfirstname IS  NULL) 			RETURN -1;   		IF (@nlastname IS  NULL) 			RETURN -1; 		IF (@nstreet IS  NULL) 			RETURN -1; 				          /*Validation Testing*/                           /*Test each field for null vaues */ 		IF (@ncity   IS  NULL) 			RETURN -2; 						    /*Validation Testing*/ 						    /*Test each field for null values*/ 		IF (@nstate IS NULL) 			RETURN -3; 						    /*Validation Testing*/                             /*Test each field for null vaues*/ 		IF (@nzip IS  NULL) 			RETURN -4; 						     /*Validation Testing*/                              /*Test each field for null or out of Range values*/ 		IF (@nexpirationDate IS NULL) 			RETURN -5
Add Adult stored procedurecont. --Need to insert values into the Member table as well as the Adult table --memeberno in the member table is IDentity column 		BEGIN TRANSACTION 		INSERT INTO member(lastname,firstname,middleinitial) 		VALUES (@nlastname,@nfirstname,@nmiddleinitial); 		IF (@@ERROR <> 0) 		BEGIN 			ROLLBACK 			RETURN -10; 		END 		Set @adultmemberid = scope_identity(); 		INSERT INTO adult(member_no,street,city,[state],zip,phone_no,expr_date) 		VALUES (@adultmemberid,@nstreet,@ncity,@nstate,@nzip,@nphoneno,@nexpirationDate) 		IF (@@ERROR <> 0) 		BEGIN 			ROLLBACK ;	 			RETURN -11; 		END 		COMMIT TRANSACTION; 		RETURN @adultmemberid;		 	END	TRY				 	BEGIN CATCH 		IF @@TRANCOUNT > 0 			ROLLBACK  		DECLARE @ErrMsgnvarchar(4000), @ErrSeverityint 		SELECT @ErrMsg = ERROR_MESSAGE(), 		   @ErrSeverity = ERROR_SEVERITY() 		RAISERROR(@ErrMsg, @ErrSeverity, 1) 	END CATCH; END GO --END TRANSACTION --END TRAN AddAdultMemberTrans --
Adult Member being added
Add Adult membership interface
Addition completed
Juvenile member being added with adult member on file
Book check in
Book being checked in
Display shows members book limit reachedMaximum of four books
Successful check out for member with less than four books checked out.
Project Phase 4Web Application Web Application
Summary The Web Application utilizes Http binding and MasterPage and ContentPages as the structure for the application. The Interface has changed but preserves the functionality as the previous projects.  The application uses custom user controls hyperlinks to navigate to each page, continues to provide validation and error handling.  The project also features AJAX processing. Extra processing was added in the web application to automatically update a juvenile who's eighteenth birthday has just past or is current and that the member is still active or the members card has not expired. Also extra processing has been added to highlight overdue books. Books that have exceeded the return date.  Other features included; Security for Librarians and authorized users of the system, search feature to find members by member number.
Login screen
Main Menu
Add Adult dialog
Adult member being added
Adult member added
Shows book overdue
AJAX Update Panel at work
Book added to library
Limit reached and button disabled
Highlight “ alert” to Books overdue
Highlight “alert” -Members card has expiredcheckout button disabledOption to renew card!
Updating Member’s card  with AJAX processing
Members card updated / Check out button enabled
Juvenile search
Juvenile and sponsoring adult
Project Phase 5WCFWeb Service WCF web service project uses the same Web application Windows Client interface and processing as project 4 ,  but adds attributes for the web service contracts and data contract objects and methods in the DataAccess Layer of the project. Uses fault exception and LibraryExceptions.  The service was first hosted in a console application and later migrated to a windows application to be hosted in Internet Information Services(IIS).
Web Service
ConsoleHost/WebService
WCF Test Client returns items for member number
End Portfolio

Mais conteúdo relacionado

Mais procurados

C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
cummings49
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1
abdull466
 
Il 09 T3 William Spreitzer
Il 09 T3 William SpreitzerIl 09 T3 William Spreitzer
Il 09 T3 William Spreitzer
wspreitzer
 
Application package
Application packageApplication package
Application package
JAYAARC
 
7) packaging and deployment
7) packaging and deployment7) packaging and deployment
7) packaging and deployment
techbed
 
owb-platform-adapter-cookbook-177344
owb-platform-adapter-cookbook-177344owb-platform-adapter-cookbook-177344
owb-platform-adapter-cookbook-177344
Carnot Antonio Romero
 
Jonathan Terry's Resume
Jonathan Terry's ResumeJonathan Terry's Resume
Jonathan Terry's Resume
jcterry
 
Aspnet architecture
Aspnet architectureAspnet architecture
Aspnet architecture
phantrithuc
 

Mais procurados (20)

.NET Project Manual
.NET Project Manual.NET Project Manual
.NET Project Manual
 
Pa 10 n1 louis decroo jr.
Pa 10 n1 louis decroo jr.Pa 10 n1 louis decroo jr.
Pa 10 n1 louis decroo jr.
 
Microsoft� .NET and Microsoft� Office 2003
Microsoft� .NET and Microsoft� Office 2003Microsoft� .NET and Microsoft� Office 2003
Microsoft� .NET and Microsoft� Office 2003
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1
 
Il 09 T3 William Spreitzer
Il 09 T3 William SpreitzerIl 09 T3 William Spreitzer
Il 09 T3 William Spreitzer
 
Oracle apps online training
Oracle apps online trainingOracle apps online training
Oracle apps online training
 
Matthew Swanger .NET Portfolio
Matthew Swanger .NET PortfolioMatthew Swanger .NET Portfolio
Matthew Swanger .NET Portfolio
 
Asp net
Asp netAsp net
Asp net
 
Portfolio
PortfolioPortfolio
Portfolio
 
Jerry Baldwin's Project Portfolio
Jerry Baldwin's Project PortfolioJerry Baldwin's Project Portfolio
Jerry Baldwin's Project Portfolio
 
AD301: Introducing the Composite Application Container Framework - Lotusphere...
AD301: Introducing the Composite Application Container Framework - Lotusphere...AD301: Introducing the Composite Application Container Framework - Lotusphere...
AD301: Introducing the Composite Application Container Framework - Lotusphere...
 
Application package
Application packageApplication package
Application package
 
Sherry Cuenco .NET Portfolio
Sherry Cuenco .NET PortfolioSherry Cuenco .NET Portfolio
Sherry Cuenco .NET Portfolio
 
Intro To C++ - Class 14 - Midterm Review
Intro To C++ - Class 14 - Midterm ReviewIntro To C++ - Class 14 - Midterm Review
Intro To C++ - Class 14 - Midterm Review
 
7) packaging and deployment
7) packaging and deployment7) packaging and deployment
7) packaging and deployment
 
owb-platform-adapter-cookbook-177344
owb-platform-adapter-cookbook-177344owb-platform-adapter-cookbook-177344
owb-platform-adapter-cookbook-177344
 
Jonathan Terry's Resume
Jonathan Terry's ResumeJonathan Terry's Resume
Jonathan Terry's Resume
 
Aspnet architecture
Aspnet architectureAspnet architecture
Aspnet architecture
 
Portfolio
PortfolioPortfolio
Portfolio
 

Destaque (8)

מכתב לשר הרווחה
מכתב  לשר הרווחהמכתב  לשר הרווחה
מכתב לשר הרווחה
 
Sustainability: The Right Thing To Do?
Sustainability: The Right Thing To Do?Sustainability: The Right Thing To Do?
Sustainability: The Right Thing To Do?
 
a quick look
a quick looka quick look
a quick look
 
מצגת אנשים
מצגת אנשיםמצגת אנשים
מצגת אנשים
 
Janis deck
Janis deckJanis deck
Janis deck
 
מידע שימושי מאוד
מידע שימושי מאודמידע שימושי מאוד
מידע שימושי מאוד
 
מצגת אנשים
מצגת אנשיםמצגת אנשים
מצגת אנשים
 
Dna app2video
Dna app2videoDna app2video
Dna app2video
 

Semelhante a C#Portfolio

Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
 
Oracle9i application server oracle forms services
Oracle9i application server   oracle forms servicesOracle9i application server   oracle forms services
Oracle9i application server oracle forms services
FITSFSd
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
Thomas Conté
 

Semelhante a C#Portfolio (20)

Final Project Presentation
Final Project PresentationFinal Project Presentation
Final Project Presentation
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Ibm
IbmIbm
Ibm
 
Mark Jackson\'s Portfoilo
Mark Jackson\'s PortfoiloMark Jackson\'s Portfoilo
Mark Jackson\'s Portfoilo
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
 
Overview of entity framework by software outsourcing company india
Overview of entity framework by software outsourcing company indiaOverview of entity framework by software outsourcing company india
Overview of entity framework by software outsourcing company india
 
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
 
JavaScript
JavaScriptJavaScript
JavaScript
 
ASP.NET MVC3 RAD
ASP.NET MVC3 RADASP.NET MVC3 RAD
ASP.NET MVC3 RAD
 
Oracle9i application server oracle forms services
Oracle9i application server   oracle forms servicesOracle9i application server   oracle forms services
Oracle9i application server oracle forms services
 
Build Message-Based Web Services for SOA
Build Message-Based Web Services for SOABuild Message-Based Web Services for SOA
Build Message-Based Web Services for SOA
 
Web-Dev Portfolio
Web-Dev PortfolioWeb-Dev Portfolio
Web-Dev Portfolio
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 

C#Portfolio

  • 1. SetFocus.Net Project Portfolio Jeriel Mikell 773-995-5418 mailto:jeriel.mikell@yahoo.com
  • 2. Table of Content Introduction / Summary 3 Projects: Project 1 FrameWork Business Project 5 FrameWork Code Snippets 6,7 Phase 2 Library Project 10 Windows Front End Validation 11 - 15 Phase 3 Library Project 16 Create DataAccess Tiers Phase 4 Library Project 28 Integrate into a Web Project Phase 5 Library Project 44 Integrate into a Web Service
  • 3. .NET Projects Overviewpage 2 Summary Project 1 .NET Framework Foundation Build parts of the business tier for a retail company, consisting of two assemblies; Foundation and AppTypes. The Foundation class library contains various interfaces and base classes. The AppTypes class library contains various entity, collection, and exception classes used by the various business processes. Project 2 Library Phase 1 Given an ADO.NET data access library to a SQL database that contains Library books, adult and juvenile members, develop an intuitive Windows Forms user interface that requires minimal training. Development of business tier software that isolates the ADO.NET code from the user interface is also required to add members, check books in and out of the database. Additional requirements include validation of all input parameters including regular expression validators, exception handling minimizing resource utilization. Project 3 Library Phase 2 Using the UI developed in Library Phase 1 project, the requirement here is to convert the ADO.NET data access tier to use LinqToSQL to develop object models and abstract away data provider code and modify the business tier software as required to interface with this new data access tier. Develop code that is easily maintainable and provides adequate error handling.
  • 4. .NET Projects Overviewcont. .NET Framework Projects Overview Project 4 Library Phase 3 Convert the user interface of the Library Phase 2 project to a Web application preserving all of the Windows Forms functionality. Specific requirements include the use of AJAX controls for book check in and implementing a secure login for the librarian to access to the library functions using forms based authorization and authentication. Additional functionality includes the ability to add books or another copy of an existing book to the database, automatically convert juvenile members to adult members when they turn 18, and allow the option to renew a membership that has expired. Project 5 Library Phase 4 Allow Interoperability of the Library project with other systems by implementing Windows Communication Foundation (WCF) Web Services called from the web based user interface that provides a secure communication mechanism to the library business layer. Authorization and authentication of the transport channel shall be provided using ASP.NET membership and role permissions. Project 6 Test Management Application
  • 5. FrameWork ProjectProject 1 The FrameWork project features parts of the business tier for a retail company, consisting of two assemblies; Foundation and AppTypes. The Foundation class library contains various interfaces and base classes. The AppTypes class library contains various entity, collection, and exception classes used by the various business processes.
  • 7. Partial FrameWork Code SnippetsDefine the Supplier classApplication Type /// <summary> / Supplier Class [DeveloperInfoAttribute( "JerielMikell", "Programmer", "11072009")] [CustomDescriptionAttribute("Supplier Class")] [Serializable] public sealed class Supplier : Contact { //Fields /// <summary> /// HomePage /// </summary> public string _homePage; /// <summary> /// SupplierType type /// /// </summary> public SupplierTypes _type; //Properties /// <summary> /// public property HomePage /// </summary> public string HomePage { get { return _homePage; } set { if (value.Length < 5 || value.Length > 50) throw new InvalidOperationException("HomePage must be between 5 and 50 characters" + _homePage); else _homePage = value; }
  • 8. Supplier Typecont. /// <summary> /// Supplier Types can not be null /automatic property for Type /// </summary> public SupplierTypes Type { get { return _type; } set { if (_type == 0) throw new InvalidOperationException(_type +"Supplier Type must not be Empty" ); else _type = value; } } /// <summary> /// defalultconstuctor /// </summary> public Supplier() { } //overload constructor
  • 9. Supplier Typecont /// <summary> /// Overloaded constructor /// </summary> /// <param name="id"></param> /// <param name="companyname"></param> /// <param name="contactname"></param> /// <param name="contacttitle"></param> /// <param name="address"></param> /// <param name="city"></param> /// <param name="region"></param> /// <param name="postalcode"></param> /// <param name="country"></param> /// <param name="phone"></param> /// <param name="fax"></param> /// <param name="_homepage"></param> /// <param name="_type"></param> public Supplier(int id, string companyname, string contactname, string contacttitle, string address, string city, string region, string postalcode, string country, string phone, string fax, string _homepage, SupplierTypes _type) : base(id, companyname, contactname,contacttitle,address,city,region,postalcode,country,phone,fax) { this.HomePage = _homepage; this.Type = _type; this.id = id; this.companyName = companyname; this.contactName = contactname; this.contactTitle = contacttitle; this.Address = address; this.City = city; this.Region = region; this.PostalCode = postalcode; this.Country = country; this.Phone = phone; this.Fax = fax; }
  • 10. Supplier structure //DataAccess constructor // [DeveloperInfoAttribute("JerielMikell" ,"Programmer","11072009")] [CustomDescription("DataAccessctor")] public Supplier(DataAccess.SupplierStructmyStruct) { this.ID = myStruct.ID; this.CompanyName = myStruct.CompanyName; this.ContactName = myStruct.ContactName; this.ContactTitle = myStruct.ContactTitle; this.Address = myStruct.Address; this.City = myStruct.City; this.Region = myStruct.Region; this.PostalCode = myStruct.PostalCode; this.Country = myStruct.Country; this.Phone = myStruct.Phone; this.Fax = myStruct.Fax; // finish assigning all properties }
  • 11. Library Project Phase 2 LWindows Front-End Application Requirements Design and develop a front end application that satisfies the four basic functionalities: Add Adult, Add Juvenile, Check In a book, Check Out a book. Develop code that is easily maintainable. Provide validation for all required fields (see details below). Provide adequate error handling. Produce a user interface that is intuitive, requiring minimal training for users while minimizing resource utilization. Provisions Database scripts are provided in order to create the Library database (see APPENDIX A). An interface that specifies the methods supported by the Data Access tier used for all database access and a class that implements the interface are provided. Classes that represent various “business entities” (e.g., an AdultMember class) are also provided. Detailed information appears in Appendix B. A reference implementation that illustrates one possible solution for this project is provided. The reference implementation is not intended as a model to be emulated in your solution; rather, it serves only to illustrate how you might implement your solution, rather than how you must implement your solution. If you wish to use the reference implementation as a basis for how your implementation will appear and function, you are free to do so, but you are not obligated to replicate the appearance of the reference implementation. A database has been created to support the principal functions of a lending library’s day-to-day operations: adding new members (adult and juvenile) and checking books in and out. An assembly has been created that contains classes and interfaces that provide access to the database for these functions. What is needed is a Windows Forms-based front-end application that will provide a librarian with a visual interface through which he or she may perform the desired functions
  • 12. Shared members within the Library Project
  • 13. Front end validation If a value is entered into the middle initial field, that field must be validated to ensure that the value entered is a single alphabetic character. If a value is entered into the phone number field, that field must be validated to ensure that the value conforms to the format (XXX)XXX-XXXX, where X is a digit from 0 through 9. Note there is no space after the right parenthesis; the field in the database for the phone number is thirteen characters long, so including a space at this point would cause the phone number to be truncated. The adult member ID field must be validated to ensure that it contains only a numeric value in the range 1 through 32767 inclusive. The birthday field must be validated to ensure that it contains a value in the format MM/DD/YYYY and that the value parses to a date that is no more than eighteen years prior to the current date. When a member ID is entered to perform a member lookup, that field must be validated according to the same rule specified for the adult member ID field above. For the ISBN and copy number fields used in the check-in and check-out operations, these fields must be validated to ensure that only numeric values are entered. For the copy number field, the value must be in the range 1 through 32767 inclusive. Suggested Project Techniques : Use menus instead of buttons to free screen space, when appropriate. Use combo boxes (drop-down lists) and list boxes instead of free-form textboxes for data entry whenever possible. Avoid overuse of message boxes and other modal communications to the user. Use other display techniques such as a status bar or a label. Use standard naming conventions to provide code readability. Make use of collections to produce concise code. While calls into the data access class’s methods by the presentation tier (i.e., by the code in your Form’s event handlers) are permitted, you might want to consider creating a middle tier for mediating between your presentation tier and the data access tier. Using a middle tier can simplify the code in your presentation tier considerably.
  • 14. Validation cont. Enrolling Members To become a library member, an individual must provide his or her mailing address and, optionally, his or her phone number. A librarian then issues the individual a numbered, machine-readable card. This card is good for one year from the date of issue. Juveniles are considered to be individuals under the age of eighteen. A juvenile can be a member of the library, but must have an adult member sign for them when they join. The juvenile’s address and phone number information is that of the sponsoring adult member, and the juvenile’s card is valid only until the sponsoring adult member's card expires. The only information that the library keeps on a juvenile member is his or her name, sponsoring adult member card number, and his or her date of birth. Checking Out Books Books are checked out for 14 days. Members are allowed to have at most four books checked out at a time. Members bring books to the front desk after they locate the ones that they want to check out. A librarian then enters the card number from the member's card. A screen displays information about the member's account, such as name, address, phone number, and the card's expiration date. Ideally, cards that have expired will be highlighted. The screen also displays information about a member's outstanding loans, including title, checkout date, and due date. If a member's account is in order (i.e., the card is not expired and fewer than four books are on loan to the member currently), a librarian checks out the books. Librarians check out books by entering the ISBN and copy number of the item, both of which appear in a label on the book’s spine. The ISBN, copy number, title, and author information then appear on the computer screen so that the librarian may verify that the database entry corresponds to the item being checked out. The librarian then can elect to check the book out or to cancel the check-out operation. Occasionally, books are accidentally re-shelved before librarians check them in. If a librarian tries to check out a book that the database lists as already checked out, the librarian should be alerted and be given the opportunity to check the book in before proceeding with the check-out operation. Checking In Books When a book is returned to the library, a librarian checks it in by entering the ISBN and copy number that appears on the book’s spine. The ISBN, copy number, title, and author information then appear on the computer screen, as well as the card number and name of the member to whom the book is checked out, and the book's due date. The librarian can then elect to check the book in or to cancel the check-in operation.
  • 15. Validation cont. Data Validation To enroll an adult member, the required fields are: First name Last name Street City State Zipcode Middle initial and phone number are optional fields. To enroll a juvenile member, the required fields are: First name Last name Adult member ID Birthday Middle initial is an optional field. First name and last name fields must be validated to ensure that the values contained in these fields are alphabetic only and that the first character of each of these fields is uppercase. The Zipcode field must be validated to ensure that only a five-digit (XXXXX) or a nine-digit (XXXXX-XXXX) value is entered.
  • 16. Validationcont. Value entered is a single alphabetic character. If a value is entered into the phone number field, that field must be validated to ensure that the value conforms to the format (XXX)XXX-XXXX, where X is a digit from 0 through 9. Note there is no space after the right parenthesis; the field in the database for the phone number is thirteen characters long, so including a space at this point would cause the phone number to be truncated. The adult member ID field must be validated to ensure that it contains only a numeric value in the range 1 through 32767 inclusive. The birthday field must be validated to ensure that it contains a value in the format MM/DD/YYYY and that the value parses to a date that is no more than eighteen years prior to the current date. When a member ID is entered to perform a member lookup, that field must be validated according to the same rule specified for the adult member ID field above.
  • 17. Validation cont. For the ISBN and copy number fields used in the check-in and check-out operations, these fields must be validated to ensure that only numeric values are entered. For the copy number field, the value must be in the range 1 through 32767 inclusive. Suggested Project Techniques : Use menus instead of buttons to free screen space, when appropriate. Use combo boxes (drop-down lists) and list boxes instead of free-form textboxes for data entry whenever possible. Avoid overuse of message boxes and other modal communications to the user. Use other display techniques such as a status bar or a label. Use standard naming conventions to provide code readability. Make use of collections to produce concise code. While calls into the data access class’s methods by the presentation tier (i.e., by the code in your Form’s event handlers) are permitted, you might want to consider creating a middle tier for mediating between your presentation tier and the data access tier. Using a middle tier can simplify the code in your presentation tier considerably.
  • 18. Library Project Phase3 Project Phase 3 consist of building the DataAccess and Business Tiers. Preserving the use of the Stored Procedures, validation and ease of access among other features created in the previous project, like members card has expired.
  • 19. Add Adult stored procedure /* Methods that can be used in the try catch blocks Function Description ERROR_NUMBER() Returns the number of the error ERROR_SEVERITY() Returns the severity ERROR_STATE() Returns the error state number ERROR_PROCEDURE() Returns the name of the stored procedure or trigger where the error occurred ERROR_LINE() Returns the line number inside the routine that caused the error ERROR_MESSAGE() Returns the complete text of the error message. The text includes the values supplied for any substitutable parameters, such as lengths, object names, or times */ USE library GO /*Drop the Procedure before creating it if it exists.*/ IF OBJECT_ID ('usp_AddAdultMember') IS NOT NULL DROP PROCEDURE usp_AddAdultMember; GO /*Create the Procedure*/ CREATE PROCEDURE usp_AddAdultMember @nlastnamevarchar(15),@nfirstnamevarchar(15),@nmiddleinitial char(1), @nstreetvarchar(15),@ncityvarchar(15),@nstate char(2), @nzip char(10),@nphoneno char(13), @nexpirationDateDateTime, @adultmemberidsmallint OUTPUT AS BEGIN BEGIN TRY --IF EXISTS SELECT (@noutput_Adultmemberid ) --IF EXISTS (SELECT * FROM member WHERE member_no = @adultmemberid) -- RETURN -1
  • 20. Add Adult stored procedure cont /*Validation Testing*/ /*Test each field for null or out of Range values*/ IF (@nfirstname IS NULL) RETURN -1; IF (@nlastname IS NULL) RETURN -1; IF (@nstreet IS NULL) RETURN -1; /*Validation Testing*/ /*Test each field for null vaues */ IF (@ncity IS NULL) RETURN -2; /*Validation Testing*/ /*Test each field for null values*/ IF (@nstate IS NULL) RETURN -3; /*Validation Testing*/ /*Test each field for null vaues*/ IF (@nzip IS NULL) RETURN -4; /*Validation Testing*/ /*Test each field for null or out of Range values*/ IF (@nexpirationDate IS NULL) RETURN -5
  • 21. Add Adult stored procedurecont. --Need to insert values into the Member table as well as the Adult table --memeberno in the member table is IDentity column BEGIN TRANSACTION INSERT INTO member(lastname,firstname,middleinitial) VALUES (@nlastname,@nfirstname,@nmiddleinitial); IF (@@ERROR <> 0) BEGIN ROLLBACK RETURN -10; END Set @adultmemberid = scope_identity(); INSERT INTO adult(member_no,street,city,[state],zip,phone_no,expr_date) VALUES (@adultmemberid,@nstreet,@ncity,@nstate,@nzip,@nphoneno,@nexpirationDate) IF (@@ERROR <> 0) BEGIN ROLLBACK ; RETURN -11; END COMMIT TRANSACTION; RETURN @adultmemberid; END TRY BEGIN CATCH IF @@TRANCOUNT > 0 ROLLBACK DECLARE @ErrMsgnvarchar(4000), @ErrSeverityint SELECT @ErrMsg = ERROR_MESSAGE(), @ErrSeverity = ERROR_SEVERITY() RAISERROR(@ErrMsg, @ErrSeverity, 1) END CATCH; END GO --END TRANSACTION --END TRAN AddAdultMemberTrans --
  • 23. Add Adult membership interface
  • 25. Juvenile member being added with adult member on file
  • 28. Display shows members book limit reachedMaximum of four books
  • 29. Successful check out for member with less than four books checked out.
  • 30. Project Phase 4Web Application Web Application
  • 31. Summary The Web Application utilizes Http binding and MasterPage and ContentPages as the structure for the application. The Interface has changed but preserves the functionality as the previous projects. The application uses custom user controls hyperlinks to navigate to each page, continues to provide validation and error handling. The project also features AJAX processing. Extra processing was added in the web application to automatically update a juvenile who's eighteenth birthday has just past or is current and that the member is still active or the members card has not expired. Also extra processing has been added to highlight overdue books. Books that have exceeded the return date. Other features included; Security for Librarians and authorized users of the system, search feature to find members by member number.
  • 38. AJAX Update Panel at work
  • 39. Book added to library
  • 40. Limit reached and button disabled
  • 41. Highlight “ alert” to Books overdue
  • 42. Highlight “alert” -Members card has expiredcheckout button disabledOption to renew card!
  • 43. Updating Member’s card with AJAX processing
  • 44. Members card updated / Check out button enabled
  • 47. Project Phase 5WCFWeb Service WCF web service project uses the same Web application Windows Client interface and processing as project 4 , but adds attributes for the web service contracts and data contract objects and methods in the DataAccess Layer of the project. Uses fault exception and LibraryExceptions. The service was first hosted in a console application and later migrated to a windows application to be hosted in Internet Information Services(IIS).
  • 50. WCF Test Client returns items for member number