Chapter 4 Flashcards
What is a web page?
document served over world wide web and displayed in web browser. Developed using HTML (Hypertext Markup Language).
What is the World Wide Web?
interconnected hypertext documents and other resources.
Need to distinguish between web and internet. Internet is communication system that provides connectivity among computers. Web is a service available on the internet that allows access to hyperlinked resources.
What is Hypertext Transfer Protocol (HTTP)?
HTTP is the underlying protocol used by WWW, provides common language that web servers and browsers use to communicate.
What is HTTPS?
HTTPS - protocol for secure applications that use encryption before it is transmitted.
What is a Uniform Resource Locator (URL)?
A URL uniquely identifies each resource on the internet.
All documents, images, videos and resources are identified by a URL.
What is Hypertext Markup Langugag (HTML)?
HTML is a language used by web server and browser to describe a web page. Uses markup tags to describe how content is displayed.
Can also embed scripts such as JavaScript to change behaviour and can include Cascading Style Sheets (CSS) to describe formatting of page. Browser reads HTML code and renders it on the screen.
What are the 2 main parts to a HTML document?
Head and body.
What is the function of the header section of a HTML document?
Header - used to provide document title and links to external item such as JavaScript and CSS files.
What is the function of the body section of a HTML document?
Body - provides the complete structure and content of the page.
What is the purpose of a HTML document?
Purpose to provide a standard language for describing Web pages so that different web browsers can understand and display page. Can be edited using any text editor.
Uses tags always inside angle brackets and in pairs -
What are Cascading Style Sheets (CSS)?
CSS - allows you to store web pages style and format separate from HTML code.Visual studio has tool to build and preview style sheets.
CSS becomes useful when trying to making site wide changes. Means can make 1 change and update multiple files across a site rather than changing each individual page.
CSS must always be inside tags in the element.
What is JavaScript?
JavaScript - client side language that runs inside browsers to create more interactive pages than possible with HTML, supported in all modern browsers. Makes websites more responsive and interactive by executing the code in client side (web browser) and minimizes unnecessary round-trips to and from web server.
Where do you place JavaScript?
All JavaScript must be placed in script tags in head element.
Can also place JavaScript in separate file as shown below:
What are the benefits to placing JavaScript in a separate file?
- Improved maintainability - only need to modify code in one area rather than each page.
- Improved performance - reduces size of web page and also allows cached version to be held on client side, does not need to be downloaded every time unless changed.
What is Asynchronous JavaScript and XML (Ajax)?
Asynchronous JavaScript and XML (Ajax) - Ajax uses JavaScript in order to provide responsive web applications, the ASP.NET AJAX framework lets you implement Ajax on ASP.NET web pages.
What is a client side program?
Client-side program - executes on users local computer e.g. javascript, windows forms and do not consume server resources.
What is a server side program?
Server-side programs - execute completely on the server and use computational resources of servers. Only local resources used are those retrieving processing results from server. Usually web applications using technology such as ASP.NET, PHP or Ruby on Rails.
What is a hybrid program?
Hybrid - recent applications make use of both server side and client side. Smart-client applications run locally on client computer and use web services to accomplish certain tasks e.g Ajax.
What is ASP.NET?
ASP.NET - part of the .NET framework that enables to develop web forms and services. Can develop in any .NET language e.g C#, Visual Basic.
What are the 2 main parts to ASP.NET?
- Classes and interfaces that enable communication between browser and server in System.Web namespace.
- Runtime process - ASP.NET worker process (aspnet_wp.exe) that handles web requests for ASP.NET resources.
How is a higher level web application executed?
Higher level web application is executed through HTTP requests and responses between browser and server.
- User requests resource by typing URL in browsers, sent to server.
- Server analyzes HTTP request and finds resource capable of executing request.
- Result of request is sent back to browser (HTTP response)
- Browser reads HTTP response and renders it as web page.
What happens when a web server executes a request for an ASP.NET page?
- Internet Information Service (IIS) receives an HTTP request, it uses file name extension to determine which Internet Server Application Programming Interface (ISAPI) program to run. When an ASP.NET request is received the aspnet_isapi.dll is run.
- The aspnet_isapi.dll passes the request to the ASP.NET worker process (aspnet_wp.exe)
- The ASP.NET worker process compiles an .aspx file into an assembly and instructs Common Language Runtime (CLR) to execute the assembly.
- When assembly executes it takes various .NET classes needed to carry out its work and generate response message to requesting client.
- The ASP.NET worker process collects responses and creates a response packet and passes it to aspnet_isapi.dll process.
- aspnet_isap.dll forwards the response packet to IIS, which passes to requesting client.
What are the stages of the page lifecycle?
- Page request
- Start
- Initialization
- Load
- Postback event handling
- Prerendering
- Rendering
- Unload
What events are associated with various stages of a page lifecycle?
- Start - PreInit
- Initialization - Init
- Load - Load
- Prerendering - PreRender
- Unload - Unload
How do you register a method to handle an event?
To register a method to handle the event, do so using the common event registration pattern used in the .NET framework:
object.event += new EventHandler(eventhandler);
What are the
What is state management?
State management - the process of maintaining state for a page across round trips. Important issue for web applications, there are both client-side and server-side techniques available for preserving state information across page postbacks.
What is client side state management?
Client-side state management uses HTML code and web browser to store state information.
What are the main ways that client side state management is maintained?
- Query strings
- Cookies
- Hidden fields
- ViewState
What are query strings?
Query strings - state is maintained using set of key-value pairs in query string in URL e.g. http://www.google.com/search?q=television.