net portfolio by maria vivian ting

15
BY: Maria Vivian Ting .NET PORTFOLIO

Upload: mvting

Post on 08-Dec-2014

385 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Net  Portfolio  by Maria Vivian Ting

BY: M a r i a V i v i a n T i n g

.NET PORTFOLIO

Page 2: Net  Portfolio  by Maria Vivian Ting

INTRODUCTION

This portfolio illustrates the basic concepts of object oriented design such as encapsulation, abstraction, polymorphism, and extensibility as well as the features of ADO.NET, ASP.NET, WINDOWS, T-SQL.

To demonstrate these, parts of codes and screen shots of an application are shown.

Page 3: Net  Portfolio  by Maria Vivian Ting

ENCAPSULATION

Figure 1

As demonstrated on Fig. 1, access modifiers implements encapsulation. The variable first, length, and name are declared private by default in firstNameTextBox class, hence can only be accessed by that

class in the context in which they are declared and are non-existent in the other classes.

Page 4: Net  Portfolio  by Maria Vivian Ting

ABSTRACTION

Figure 2

As demonstrated on Fig. 2, accessing a routine associated to an object, in this case GetInformation of the bl object, implements abstraction. At this level, the details incorporated in GetInformation is not visible and

yet implemented.

Page 5: Net  Portfolio  by Maria Vivian Ting

POLYMORPHISM

As demonstrated in these 4 screenshots, polymorphism is implemented through inheritance and the use on interface. ILibraryDataAccess is an interface with a routine GetMember and an overload. The first GetMember has isbn and copy number as parameters. The second GetMember has member number. As ILibraryDataAccess is implemented by LibraryDataAccess, LibraryDataAccess implemented GetMember and its overload. GetMember in the sense came in 2 forms, first with 2 parameters and the second with only one. And Polymorphism by definition means taking many forms.

Page 6: Net  Portfolio  by Maria Vivian Ting

DATA VALIDATION (windows application)

Figure 4

As demonstrated in fig.4, RegEx and textbox have a very effective partnership in data validation. The string variable zipcodeExpression contains the regular expression used to validate the field. Which means that it has to contain 5 digits separated by a dash, after which 4 digits follows, or it can have just 5 digits, or just 9 digits all together without a dash. Masking on the other hand provides a cue or a guide for the users to enter. The errorProvider is set to the appropriate error message and the field where the error occurred.

Page 7: Net  Portfolio  by Maria Vivian Ting

DATA VALIDATION (windows application)

Figure 3

As demonstrated on fig. 3, Masked textbox is a useful feature in data validation. Birthday, Phone No., and Zipcode are the fields where masked textboxes are used. ErrorProvider is also used for error

messages.

Page 8: Net  Portfolio  by Maria Vivian Ting

DATA VALIDATION ( web application)

Figure 5

The use of RequiredFieldValidators come in useful in data entry validation. Error messages can be customized, and the controls associated with the errors are specified at markup not the code. Thus, making validation less intrusive code wise.

Page 9: Net  Portfolio  by Maria Vivian Ting

DATA VALIDATION ( web application)

Figure 6

ValidationSummary is useful in providing a list of errors that occur at data entry process. This gives the users useful information as to how to correct the errors.

Page 10: Net  Portfolio  by Maria Vivian Ting

ADO.NET / T-SQL

Figure 7

After data validation comes the update to the database. In Fig. 7, ADO.NET is used to update the necessary tables required.

Page 11: Net  Portfolio  by Maria Vivian Ting

STRONGLY-TYPED DATASET

As by definition “strongly typed data are variables with assigned types”. A strongly-typed dataset conceptually is just the same. It can be created by creating an XSD file (Fig. 7). The values that are assigned to this dataset must match that of the object it represents. Thus, ensuring data type integrity.

A strongly-typed dataset can also be bound to a grid as demonstrated on Fig. 8.

Figure 7

Figure 8

Page 12: Net  Portfolio  by Maria Vivian Ting

STRONGLY-TYPED DATASET

Figure 9

Fig. 9 demonstrate the result of binding a strongly-typed dataset to a grid. In this example, a grid is used to show the table of books that are checked out highlighted in blue is a grid.

Page 13: Net  Portfolio  by Maria Vivian Ting

AJAX

Figure 10

AJAX allows partial post back. As demonstrated on Fig. 10. The table ITEMS ON LOAN is using UpdatePanel. This is further demonstrated in the next slide.

Page 14: Net  Portfolio  by Maria Vivian Ting

AJAX

Figure 11

Shown in Fig. 11 is the partnership between ScriptManager and UpdatePanel.

Page 15: Net  Portfolio  by Maria Vivian Ting

USER VALIDATION

Figure 12

User validation is an important aspect to consider in any application. As shown in Fig. 12, this web application demonstrates the use of roles and password definition as a way to ensure the user’s validity.