Objective 4

¡Supera tus tareas y exámenes ahora con Quizwiz!

You are developing a web page that enables students to manage races. The web page will display two lists: past races and upcoming races. The page also contains a sidebar with contact information and a panel with social media settings that can be edited. Race results can be shared on social media. How many components will be on the webpage?

4 Explanation Four components: 1. Two lists - past races and upcoming races 2. Sidebar with contact info 3. Panel to edit social media settings 4. Component to share results on social media

You want to display values of the C# expressions in an ASP.NET page. Which of the following types of code blocks should you use to enclose the expression?

<%= ... %> Explanation --The characters <% and %> are used to embed code blocks in the HTML markup of a page. --The code inside these embedded blocks is executed during the page's rendering stage. --Within the embedded code blocks, the syntax <%=expression> is used to resolve an expression and return its value into the block. --For example, consider the following block of code: <% = DateTime.Now.ToShortDateString() %> When executed, this code will display the current date in the following format: 12/01/2019.

Which function does Simple Object Access Protocol (SOAP) provide when using Web services?

A Communication Protocol Explanation SOAP is the protocol that defines how remote computers exchange messages as part of a Web service communication. SOAP relies on XML as its message format and uses HTTP for message transmission. Using SOAP to communicate has two major benefits: 1. Because Web service messages are formatted as XML, they're easier for non-compatible systems to understand. 2. Because these messages are transmitted over the pervasive HTTP, they can normally reach any machine on the Internet without being blocked by firewalls.

You have developed a timesheet application that will be used by all employees in your company. You used ASP.NET to develop this application and have deployed it on the company's Web server. What must all employees of the company install on their computers before they can access the timesheet application?

A Web browser Explanation ASP.NET is an open-source server-side web application framework designed for web development to produce dynamic web pages which can be accessed through a Web Browser on the client computer. It does not need the .Net Framework installed on client computers to run.

What is displayed when you attempt to access a Web Service by using a Web browser?

A list of methods which are available in the web service

What is displayed when you attempt to access a Web service by using a Web browser?

A listing of methods that are available in the Web service Explanation The server, in response to this request, displays the Web service's HTML description page. The Web service's HTML description page shows you all the Web service methods supported by a particular Web service. Link to the desired Web service method and enter the necessary parameters to test the method and see the XML response.

You are creating an application that presents users with a graphical interface. Users will run this application from remote computers. Some of the remote computers do not have the .NET Framework installed. Users do not have permissions to install software. Which type of application should you choose?

ASP.Net Web Application Explanation You need to present the users with a graphical interface - only Window Forms and ASP.Net will be able to. The .Net Framework cannot be installed from user computers but you need the .Net Framework on the client computer to run a Windows Forms Application. The correct answer will then be and ASP.Net Application - ASP.NET is an open-source server-side web application framework designed for web development to produce dynamic web pages. It does not need the .Net Framework installed on client computers to run.

How should you configure an application to consume a Web service?

Add a reference to the Web service in the application Explanation Right click your Web Application and select Add->Service Reference.

You have a Microsoft ASP.NET web application. You need to store a value that can be shared across users on the server. Which type of state management should you use? ​ Session

Application Explanation ASP.NET supports server-side state management at two levels: Session state & Application state. Application state: Application state is used to store data that is used throughout an Application - it can be shared across users on the server. Session State: Session state stores user information, e.g. username, form when the user session starts up to when it ends. ViewState and Cookies are client-side state management techniques.

The ASP.NET MVC page lifecycle is shown in the following graphic: Which event determines which action method is needed, and then calls that method?

Controller Explanation The Controller The Controller orchestrates between the Model and the View, and sends the output back to the user, e.g: 1. The user types the URL in the browser. 2. Based on the pattern of the URL, the routing engine selects the appropriate Controller. 3. The Controller talks to the Model to get any relevant data through its action methods. Action methods are methods within a controller class. 4. The Controller then passes the data to the View to present it in a viewable format, typically as HTML elements.

Which term is used to describe small units of text that are stored on a client computer and retrieved to maintain state?

Cookie Explanation --Cookies are small packets of information that are stored by a Web browser locally on the user's computer. --Cookies are commonly employed to store user preferences and shopping cart contents and to give users a personalized browsing experience on subsequent visits to a Web page. --The HttpCookie class represents a cookie in your code.

A piece of text that is 4096 bytes or smaller and is stored on and retrieved from the client computer to maintain state is known as a __________.

Cookie Explanation Cookie --A cookie is simply a text file which is stored on the user's computer. --The maximum size of a cookie is 4096 Bytes (4Kb). --Most browsers allow 20 cookies per server in a client's hard disk folder.

You are creating a Web application. The application will be consumed by client computers that run a variety of Web browsers. Which term is used to describe the process of making the application available for client computers to access?

Hosting Explanation A website or application is hosted on a Web server, like IIS, to make it available to client computers to access using web browsers.

You are developing a Web form to display currency information. When a user requests the Web form, the form needs to perform some initialization to change its appearance and assign values to some controls. Where should you put the code?

In the LOAD event handler of the Page class

Which service can host an ASP.NET application?

Internet Information Services Explanation An ASP.Net application needs IIS installed on the web server which hosts the application.

Which programming language is characterized as client-side, dynamic and weakly typed?

JavaScript Explanation 1. JavaScript JavaScript is characterized as a dynamic, weakly typed, prototype-based language with first-class functions. It is primarily used in the form of client-side JavaScript for the development of dynamic websites. 2. HTML Hypertext Markup Language (HTML) is the language used by Web servers and browsers to describe a Web page. 3. ASP.NET ASP.NET is the server-side part of the .NET Framework that enables you to develop programmable Web forms and Web services. 4. C# C# can be used as ASP.Net programming language.

Which language allows you to dynamically create content on the client side?

JavaScript Explanation 1. XML XML stands for eXtensible Markup Language. XML was designed to store and transport data. 2. XAML XAML is a declarative markup language. As applied to the .NET Core programming model, XAML simplifies creating a UI for a .NET Core or Framework app. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files that are joined to the markup through partial class definitions. 3. CSS CSS (Cascading stylesheets) is a language that describes the style of an HTML document. CSS describes how HTML elements should be displayed. 4. HTML HTML is the standard markup language for Web pages. 5. JavaScript - correct answer JavaScript is used to make Web sites more responsive and Web pages more interactive. JavaScript accomplishes this by executing the code on the client side (the Web browser) and by minimizing unnecessary round-trips to and from the Web server.

You are developing a mapping Web site that allows users to interactively explore maps using actions such as panning and zooming. You want the Web site to be responsive and accessible in most modern Web browsers. However, you do not want users to need to install additional plug-ins in order to use your Web site. Which of the following technologies should you use to display maps?

JavaScript Explanation JavaScript is used to make Web sites more responsive and Web pages more interactive. JavaScript accomplishes this by executing the code on the client side (the Web browser) and by minimizing unnecessary round-trips to and from the Web server.

Where must Internet Information Services (IIS) be installed in order to run a deployed ASP. NET application?

On the computer that hosts the application Explanation IIS is run on the web server. The web server is hosting the application.

In the life cycle of an ASP. NET Web page, which phase follows the SaveStateComplete phase?

Render Explanation Know the ASP.Net Page life Cycle - Read this article for an insightful explanation:

The ASP.NET MVC page lifecycle is shown in the following graphic: During which event is the URL Pattern matched?

Route Explanation Route --The entry point for every MVC application begins with routing. --After the ASP.NET platform has received a request, it figures out how it should be handled through the URL Routing Module. --Modules are .NET components that can hook into the application life cycle and add functionality. --The routing module is responsible for matching the incoming URL to routes that we define in our application.

You are reviewing the architecture for a system that allows race officials to enter the results of 5K race results. The results are then made available to students using a web application. The architecture is shown below: To minimize the time between when a race official records the race results and when the results are available on the web browser, which part of the system is critical?

Satellite links Explanation Satellite links would be a crucial part in the performance of the system.

You are writing a Web application that processes room reservation requests. You need to verify that the room that a guest has selected is not already reserved by another guest. Which type of programming should you use to determine whether the room is still available when the request is made? ​ batch processing

Server Side Explanation For room availability we need to check a database located on a server, so you need to use server side programming.

The ____________________ method is used to transfer processing of the current page to a new page, and then return processing back to the calling page once processing of the new page has completed.

Server.Execute Explanation Response.Redirect Sends an HTTP request to the browser, then the browser sends that request to the web server, then the web server delivers a response to the web browser. Full round trip. Server.Transfer In ASP.Net only - send a request directly to the web server and the server delivers a new page. Execution of code is done on the new page and stops at the new page. **Correct: Server.Execute When Server.Execute is used, a URL is passed to it as a parameter, and the control moves to this new page. Execution of code happens on the new page. Once code execution gets over, the control returns to the initial page. meta http-equiv="refresh" tag The http-equiv attribute provides an HTTP header for the information/value of the content attribute. The http-equiv attribute can be used to simulate an HTTP response header. http-equiv syntax - Attributes: --Content-type specifies the character encoding for the document --Default-style specifies the preferred style sheet to use. --Refresh defines a time interval for the document to refresh itself.

You are developing a Web application for an online bank. Your application enables users to access their account information and transactions from within a Web browser. When a user logs onto the Web application, you want to show the username and account balance on all pages of the application until the user logs off. You also want this application to be safe from malicious users. Which of the following state-management techniques should you use?

Session State Explanation Session state, in the context of .NET, is a method to keep track of a user session during a series of HTTP requests. --Session state allows a developer to store data about a user as he/she navigates through ASP.NET web pages in a .NET web application. --A session starts when the user logs in, and ends when the user logs out of the application.

Question 10: Correct You need to group all the style settings in a website into a separate file that can be applied to all the pages. What should you do?

Use a Cascading Style Sheet (CSS) Explanation CSS (Cascading Style Sheets) CSS is a style sheet language used for describing the look and formatting of a document written in a markup language. CSS is designed primarily to enable the separation of document content from document presentation, including elements such as the layout, colors, and fonts.

Your ASP.NET page contains a page-level variable of Customer type. You want to preserve the value of this variable across page postbacks, but you do not need this variable in any other page in the application. Which of the following state-management techniques is the best way to achieve this?

ViewState Explanation ViewState is the mechanism ASP.NET uses to maintain the state of controls across page postbacks. --To facilitate this, when ASP.NET executes a page, it collects the values of all nonpostback controls that are modified in the code and formats them into a single encoded string. --This string is stored in a hidden field in a control named __VIEWSTATE. --By default, ViewState is enabled in an ASP.NET application. --You can disable ViewState at the level of a control by setting the EnableViewState property of the control to false.

You are reviewing the architecture for a system that allows race officials to enter the results of 5K race results. The results are then made available to students using a web application. The architecture is shown below: To increase the number of students using the application, which element should be added to the system?

Web Application Servers Explanation In this scenario, Web application servers can be added to accommodate more users and incoming requests and outgoing responses. Assuming this is a .Net framework ASP.Net or ASP.Net MVC application, more students and requests can lead to IIS server bottlenecks. These bottlenecks can be prevented by Load balancing with more IIS servers.

You create an application that uses Simple Object Access Protocol (SOAP). Which technology provides information about the application's functionality to other applications?

Web Service Description Language (WSDL) Explanation Web services are described using the Web services description language (WSDL) WSDL stands for Web services description language, and it provides a standard by which a Web service can tell its client what kind of messages it will accept and what results will be returned. A WSDL file acts as the public interface of a Web service and includes the following information: • The data types it can process • The methods it exposes • The URLs through which those methods can be accessed.

What are two possible options for representing a Web application within Internet Information Services (IIS)? Each correct answer presents a complete solution. ​ Application Directory ​ Application Server ​ Website ​ Web Directory ​ Virtual Directory

Website Virtual Directory Explanation Internet Information Services (IIS) is a Web server for hosting Web applications on the Windows operating system. An IIS server uses the concepts of web sites, applications, and virtual directories. A Web site is a container of applications and virtual directories. A virtual directory is an alias that points to a physical directory containing web application files on the Web server.

XHTML: Select all the statements which are true: ​ Within an XHTML document, the XHTML DOCTYPE declaration is mandatory (Correct) ​ Within an XHTML document, the XML namespace attribute in the HTML tag is mandatory (Correct) ​ Within an XHTML document, the xmlns attribute in <html> is mandatory (Correct) ​ Within an XHTML document, the html, head, title, and body tags are mandatory

Within an XHTML document, the XHTML DOCTYPE declaration is mandatory ​ Within an XHTML document, the XML namespace attribute in the HTML tag is mandatory Within an XHTML document, the xmlns attribute in <html> is mandatory ​ Within an XHTML document, the html, head, title, and body tags are mandatory Explanation About XHTML Document Structure: -XHTML DOCTYPE is mandatory -The xmlns attribute in the HTML tag is mandatory

XHTML: Select all of the statements which are true. Each correct selection is worth one point ​ XHTML attribute names must be in uppercase ​ XHTML attribute values must be in quotation marks ​ XHTML attribute minimization is forbidden

XHTML attribute values must be in quotation marks XHTML attribute minimization is forbidden Explanation About XHTML Attributes: -Attribute names must be in lower case -Attribute values must be quoted -Attribute minimization is forbidden

When a web service is referenced from a client application in Microsoft Visual Studio, which two items are created? (Choose two.) ​ a .wsdl file ​ a stub ​ a .disco file ​ a proxy

a .wsdl file a .disco file Explanation A .wsdl file that references the Web service is created, together with supporting files, such as discovery (.disco and .discomap) files, that include information about where the Web service is located.

Internet Information Services (IIS) must be installed on the ________________ in order to run a deployed ASP.NET application.

computer that hosts the application Explanation Internet Information Services (IIS) must be installed on the computer that hosts the application in order to run a deployed ASP.NET application.

You have a website that includes a form for a usemame and password. You need to ensure that users enter their username and password. The validation must work in all browsers. Where should you put the validation control?

in the client-side code only Explanation ASP.Net has a very useful set of controls for validation on the client side. You can use the RequiredFieldValidator control on an ASP.Net form.

When creating a site to utilize message queuing, the __________ must be configured to MSMQ.

protocol Explanation MSMQ is a messaging protocol that allows applications running on separate servers/processes to communicate in a fail-safe manner.

You are creating an ASP. NET Web application. Which line of code should you use to require a control to process on the computer that hosts the application?

runat="server" Explanation runat="server" - correct This attribute indicates that an element should be treated as a server control. defaultRedirect="ServerPage. htm" If you want to display a CustomError page, you can set the defaultRedirect property to point to your Custom page (in the web.config file). redirect="HostPage. htm" Response.Redirect is used to transfer a user from one web page to another web page. AutoEventWireup=true This attribute is specified in the @Page directive. The @Page directive specifies various attributes that control how ASP.NET will render a page. AutoEventWireup=true ensures that the page's events are auto-wired.

The process of transforming compiled C# code into an XML string for a web service is known as _______________.

serialization Explanation Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.


Conjuntos de estudio relacionados

Vybrané kapitoly z fyziky (přf uk)

View Set

Respiratory - Saunders NCLEX-PN Examination 6th Edition

View Set

Chp 16 Homework- Part 2, Chp 16- Endocrine Practice Quiz, Chp 16 Study Module 2, Chp 16 Study Module 1, Chp. 16 Homework Questions

View Set

Squares and Square Roots of Decimals

View Set