Multiple-Page Web Development Flashcards

1
Q

State Maintanance Summary

A
  • State Maintanance is the process of preserving the state of an end user’s data as he or she navagatres the pages of a Web application.
  • We can maintain state on the client, or on the server, or a combination of the two.
  • Examples of client side state maintinance are: view state, control state, hidden fields, cookies, and query strings.

Examples of server side state maintinance are: session state, profile properties, database support, and application state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 3 options for state maintenance?

A
  • Client-based state maintinence: data is retained on the client side.
  • Server-based state maintinence: data is retained on the server side.
  • Hybrid-state maintinence: a mixture of client and server state maintinence.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the view state method?

A

The view state method automatically preserves the values of the controls on a page (using a structure that resides in the pages source code) so that we can retrieve and use those values after a postback to the server that requests the same page.

View state data is hashed, compressed, encoded, and stored in a structure on the client in the page’s source code.

View state is turned on by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name some of the advantages of using the view state method.

A
  • Since view state data is stored in a page’s source code, it does not require server memory.
  • Since view state does not require any special programming, it is easy to implement.
  • Since view state data is hashed, compressed, and encoded, it is relatively secure.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

16.2 - LIST - Name some of the disadvantages of using the view state method.

A

Since view state data is stored in a page’s source code:

  • large amounts of page data can cause page requests and responses to be relatively slow.
  • large amounts of page data can overwhelm the memory of some mobile devices.
  • it can be accessed directly by viewing the page’s source code and can thus be tampered with.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the cookies state method?

A

Cookies is a state-maintenance method that permits us to programmatically preserve the values of the controls on a page (using the client’s memory or using a file that resides on the client’s hard drive) so that we can retrieve and use those values on subsequent pages of the application.

There are two types of cookies. Nonpersistent cookies and persistent cookies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between persistent and non persistent cookies?

A
  • Persistent cookies are stored in the browser files on a clients hard drive and will not expire when its associated session terminates.
  • Non persistent cookies are stored in the clients memory and expire when its associated session terminates.(when the browser is closed)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Name the advantages of using the cookies state method?

A
  • Since cookie data is stored in the client’s memory or on the client’s hard drive, it does not require server memory.
  • Since a cookie contains a simple text-based key-value pair (or set of simple text-based key-value pairs), little processing overhead is required.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name the disadvantages of using the cookies state method?

A
  • Since most browsers restrict the size of a cookie to between 4,096 and 8,192 bytes, there is a practical limit to how much data can be stored in a cookie.
  • Since some end users configure their browsers so that they won’t accept cookies, an application that relies on cookies for state maintenance will not always work properly.
  • Since persistent cookie data is stored in a file on the client’s hard drive, it can be accessed directly (by the end user or a hacker) by viewing the contents of the file and can thus be tampered with creating a potential security risk or causing an application malfunction.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the query string state method?

A

Query string is a method that permits us to programatically preserve the values of the controls on a page (using a string that is appended to the pages URL) so that we can retreive and use those values on subsiquent pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Name the advantages of using the query string state method.

A
  • Since query string data is passed from one page to another via the page’s URL, it does not require server memory.
  • Since a query string contains a set of simple text-based key-value pairs, little processing overhead is required.
  • Since virtually all browsers support the use of query strings, they can be used with relative confidence.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name the disadvantages of using the query string state method.

A
  • Since query string data is passed from one page to another via the page’s URL, it can be seen by the end user and can thus be tampered with creating a potential security risk or causing an application malfunction.
  • Since query string data is passed from one page to another via the page’s URL, it can be bookmarked or sent to another person, thus creating a potential security risk.
  • Since some browsers restrict the size of an encoded URL, a URL with too much query string data will cause a page malfunction.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the session state method?

A

Session state is a state-maintenance method that permits us to programmatically preserve the values of the controls on a page (using an object that resides in memory on the server) so that we can retrieve and use those values on subsequent pages of the application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Name the advantages of using the session state method.

A

Since session state is class based:

  • It is familiar to .NET developers and is thus easy to use.
  • Session events can be raised and handled during a session.
  • Since session-state data is preserved during an Internet Information Services (IIS) restart, session state is very reliable.
  • Since session-state data can be preserved in multiple processes and/or on multiple servers, session state can be utilized in Web garden and Web farm environments, thus enhancing an application’s scalability and reliability.
  • Since a session ID can be passed via a query string in an encoded URL, session state can work with browsers that do not accept cookies.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Name the disadvantages of using the session state method.

A
  • When a session ID is passed to the server via a query string in an encoded URL, it can be seen by the end user and can thus be tampered with creating a potential security risk or causing an application malfunction.
  • When a session ID is passed to the server via a query string in an encoded URL, the URL can be bookmarked or sent to another person, thus creating a potential security risk.
  • Since session-state data is stored and maintained in RAM on the server, server performance can degrade as more and more sessions require tracking.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
A