Sunteți pe pagina 1din 18

HOMEWORK FOR WEDNESDAY

__/__

Developer Tools
You can create simple websites with text and images by using a text editor, such as Notepad. However,
most websites require complex actions to be performed on the server-side, such as database
operations, email delivery, complex calculations, or graphics rendering.
To create such complex, highly functional, and engaging websites quickly and easily, Microsoft provides
the following tools: o WebMatrix 2. You can use WebMatrix 2 to create static HTML pages and dynamic
pages with ASP.NET, PHP, and Node.js. WebMatrix 2 is a free development tool that you can install by
downloading and using the Microsoft Web Platform Installer (Web PI) from the Microsoft website.
WebMatrix 2 enables you to develop custom websites based on popular web applications such as
Orchard, Umbraco CMS, and WordPress. Using WebMatrix 2, you can create ASP.NET Web Pages
applications, but not ASP.NET Web Forms or MVC applications.
Microsoft Visual Studio 2012. You can use Visual Studio 2012, an Integrated Development Environment
(IDE), to create custom applications based on Microsoft technologies, regardless of whether these
applications run on the web, on desktops, on mobile devices, or by using Microsoft cloud services. Visual
Studio 2012 has rich facilities for designing, coding, and debugging any ASP.NET web application,
including MVC applications.
Microsoft Visual Studio Express 2012 for Web. You can use Visual Studio Express 2012 for Web to create
Web Forms or MVC web applications. This is a free tool that does not include all the features of Visual
Studio 2012 editions. However, you can use it to create fully functional MVC websites.

Hosting Technologies
Regardless of the tool you use to build a web application, you must use a web server to host the web
application. When users visit your site, the host server responds by rendering HTML and returning it to
the users browser for display.
The host server may query a database before it builds the HTML, and the host server may perform other
actions such as sending emails or saving uploaded files. You need to test the functionality of such user
actions on a web server. When you build a web application by using Visual Studio 2012, you can use
Visual Studio Development Server, the built-in web server to run the application. However, Visual Studio
Development Server cannot host deployed web applications. Therefore, when you finish building the
web application and make it ready for users to access on an intranet or over the Internet, you must use
a fully functional web server such as: o Microsoft Internet Information Server 8.
IIS is an advanced website hosting technology. You can install IIS servers on your local network or
perimeter network, or employ IIS servers hosted by an Internet service provider (ISP). IIS can host any
ASP.NET, PHP, or Node.js websites.

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

You can scale up IIS to host large and busy websites by configuring server farms that contain multiple IIS
servers, all serving the same content.
Windows Azure. Windows Azure is a cloud platform that provides on-demand services to build, deploy,
host, and manage web applications through Microsoft-managed data centers. When you use Windows
Azure services, you need to pay only for the data that your website serves. Also, you need not worry
about building a scalable infrastructure because Windows Azure automatically adds resources as your
website grows.

The ASP.NET API


Whichever programming model you choose, you have access to classes from the ASP.NET API. These
classes are included in the .NET Framework in namespaces within the System.Web namespace and can
be used to rapidly implement common website functionalities such as:
Configuration. Using Web.config files, you can configure your web application, regardless of the
programming model. Web.config files are XML files with specific tags and attributes that the ASP.NET
4.5 runtime accepts. For example, you can configure database connections and custom error pages in
the Web.config file. In code, you can access the configuration through the System.Web.Configuration
namespace. o Authentication and Authorization.
Many websites require users to log on by entering a user name and password, or by providing extra
information. You can use ASP.NET membership providers to authenticate and authorize users, and
restrict access to content. You can also build pages that enable users to register a new account, reset a
password, recover a lost password, or perform other account management tasks. Membership providers
belong to the System.Web.Security namespace.
Caching. ASP.NET may take some time to render a complex webpage that may require multiple database
queries or calls to external web services. You can use caching to mitigate this delay. ASP.NET caches a
rendered page in memory, so that it can return the same page to subsequent user requests without
having to render it again from the start. In a similar manner, .NET Framework objects can also be
cached. You can access cached pages by using the System.Runtime.Caching namespace and configure
the caches in Web.config.

JavaScript
JavaScript is a simple scripting language that has syntax similar to C#, and it is supported by most web
browsers. A scripting language is not compiled. Instead, a script engine interprets the code at run time
so that the web browser can run the code.
Note: Besides JavaScript, Internet Explorer supports VBScript. There are other scripting languages also,
but JavaScript is supported by virtually every web browser. This is not true of any other scripting
language. Unless your target audience is very limited and you have control over the browser used by
your users, you should use JavaScript because of its almost universal support.

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

You can include JavaScript code in your ASP.NET pages, irrespective of the programming model you
choose. JavaScript is a powerful language, but can require many lines of code to achieve visual effects or
call external services. Script libraries contain pre-built JavaScript functions that help implement common
actions that you might want to perform on client-side code. You can use a script library, instead of
building all your own JavaScript code from the start; using a script library helps reduce development
time and effort. Different browsers interpret JavaScript differently. When you develop an Internet site,
you do not know what browsers site visitors use. Therefore, you must write JavaScript that works
around browser compatibility.
jQuery
is one of the most popular JavaScript libraries. It provides elegant functions for interacting with the
HTML elements on your page and with cascading style sheet (CSS) styles. For example, you can locate all
the <div> elements on a webpage and change their background color by using a single line of code. To
achieve the same result by using JavaScript only, you need to write several lines of code and a
programming loop. Furthermore, the code you write may be different for different browsers. Using
jQuery, it is easier to write code to respond to user actions and to create simple animations. jQuery also
handles browser differences. You can use jQuery to call web services on remote computers and update
the webpage with the results returned.
AJAX
AJAX is a technology that enables browsers to communicate with web servers asynchronously by using
the XmlHttpRequest object without completely refreshing the page. You can use AJAX in a page to
update a portion of the page with new data, without reloading the entire page. For example, you can
use AJAX to obtain the latest comments on a product, without refreshing the entire product page. AJAX
is an abbreviation of Asynchronous JavaScript and XML. AJAX is implemented entirely in JavaScript, and
ASP.NET 4.5, by default, relies on the jQuery library to manage AJAX requests and responses. The code is
run asynchronously, which means that the web browser does not freeze while it waits for an AJAX
response from the server. Initially, developers used XML to format the data returned from the server.
More recently, however, developers use JavaScript Object Notation (JSON) as an alternative format to
XML.

SECTION B

MULTIPLE CHOICE

[20]
QUESTION 1
You are designing an HTML5 website.
You need to design the interface to make the content of the web page viewable in all types of browsers,
including voice recognition software, screen readers, and reading pens. What should you do? (Each
correct answer presents a complete solution. Choose all that apply.)
A. Annotate HTML5 content elements with Accessible Rich Internet Application (ARIA) attributes.

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

B. Convert HTML5 forms to XForms.


C. Ensure that HTML5 content elements have valid and descriptive names.
D. Use HTML5 semantic markup elements to enhance the pages.
E. Use Resource Description Framework (RDF) to describe content elements throughout the entire

page.

REASON WHY ITS THE ANSWER:

QUESTION 2
You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires
several thousand content files. All content is hosted on the same IIS instance as the application.
You detect performance issues when the application starts.
You need to resolve the performance issues.
What should you do?
A. Implement HTTP caching in the ASP.NET MVC controllers.
B. Combine the content files by using ASP.NET MVC bundling.
C. Install a second IIS instance.
D. Move the content to a Windows Azure CDN.

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

REASON WHY ITS THE ANSWER:

QUESTION 3
You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiple
cultures.
The application contains three resource files in the Resources directory:
My Dictionary.resx
MyDictionary.es.resx
MyDictionary.fr.resx

Each file contains a public resource named Title with localized translation.
The application is configured to set the culture based on the client browser settings.
The application contains a controller with the action defined in the following code segment. (Line
numbers are included for reference only.)
You need to set ViewBag.Title to the localized title contained in the resource files.
Which code segment should you add to the action at line 03?
Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

A. ViewBag.Title = HttpContext.GetGlobalResourceObuect("MyDictionary", "Title");


B. ViewBag.Title = HttpContext.GetGlobalResourceObject("MyDictionary", "Title",

newSystem.Globalization.CultureInfo("en"));
C. ViewBag.Title = Resources.MyDictionary.Title;
D. ViewBag.Title = HttpContext.GetLocalResourceObject("MyDictionary", "Title");

REASON WHY ITS THE ANSWER:

QUESTION 4
You are testing an ASP.NET application.
The test plan requires that tests run against the application's business layer.
You need to use the test project template that meets this requirement.
Which template should you use?
A. Web Test Project
B. Load Test Project
C. Unit Test Project
D. Coded Test Project

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

REASON WHY ITS THE ANSWER:

QUESTION 5
You are authoring unit tests.
The unit tests must test code that consumes sealed classes.
You need to create, maintain, and inject dependencies in the unit tests.
Which isolation method should you use?
A. T4 text templates and code generation
B. Stub types
C. Shim types
D. Hard-coded implementation

REASON WHY ITS THE ANSWER:

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

QUESTION 6
You are developing an ASP.NET MVC application by using Visual Studio 2012. The
application throws and handles exceptions when it runs.

You need to examine the state of the application when exceptions are thrown.
What should you do?
A. From the DEBUG menu in Visual Studio 2012, select Exceptions. Enable the Thrown check box

forCommon Language Runtime Exceptions.


B. From the DEBUG menu in Visual Studio 2012, select Exceptions. Disable the User-unhandled

checkbox for Common Language Runtime Exceptions.


C. Add the following code to the Web.config file of the application.<customErrors mode="On">

<error statusCode="500" redirect="CustomErrors.html" /> </customErrors>


D. Add the following code to the Web.config file of the application.

<customErrors mode="On" >


<error statusCode="404" redirect="CustomErrors.html"/> </customErrors>
REASON WHY ITS THE ANSWER:

QUESTION 7
You are developing an ASP.NET MVC news aggregation application that will be deployed to servers on
multiple networks.
The application must be compatible with multiple browsers. A user can search the website for news
articles. You must track the page number that the user is viewing in search results.

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

You need to program the location for storing state information about the user's search. What
should you do?
A. Store search results and page index in Session.
B. Use Application state to store search terms and page index.
C. Use QueryString to store search terms and page index.
D. Store search results and page index in TempData

REASON WHY ITS THE ANSWER:

QUESTION 8
You are developing an ASP.NET MVC application. The application is deployed in a web farm and is
accessed by many users.
The application must handle web server failures gracefully. The servers in the farm must share the state
information.
You need to persist the application state during the session.
What should you implement?
A. A state server
B. Cookieless sessions
C. A web garden on the web servers
D. An InProc session

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

REASON WHY ITS THE ANSWER:

QUESTION 9
You are developing an ASP.NET MVC application that displays stock market information.
The stock market information updates frequently and must be displayed in real-time.
You need to eliminate unnecessary header data, minimize latency, and transmit data over a fullduplex
connection.
What should you do?
A. Implement long-running HTTP requests.
B. Instantiate a MessageChannel object on the client.
C. Implement WebSockets protocol on the client and the server.
D. Configure polling from the browser.

REASON WHY ITS THE ANSWER:

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

QUESTION 10
You are designing a distributed application that runs on the Windows Azure platform.
The application must store a small amount of insecure global information that does not change
frequently. You need to configure the application to meet the requirements.
Which server-side state management option should you use? (Each correct answer presents a complete
solution. Choose all that apply.)
A. Windows Azure application state
B. Sql Azure
C. Profile properties of the Windows Azure application
D. Windows Azure session state

REASON WHY ITS THE ANSWER:

QUESTION 11
You are developing an ASP.NET MVC application.
You need to authenticate clients by using NT LAN Manager (NTLM).
Which authentication method should you implement?
A. Basic
B. Windows
C. Forms
D. Kerberos

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

REASON WHY ITS THE ANSWER:

QUESTION 12
You are developing an ASP.NET MVC application.
The application must allow users to enter JavaScript in a feedback text box only.
You need to disable request validation.
What should you do?
A. Apply and set the CausesClientSideValidation attribute on the text box to FALSE.
B. Apply and set the ValidateInput attribute on the text box to FALSE.
C. Use the HttpRequest.Unvalidated property to read the unvalidated form value.
D. Use the HttpRequest.Form property to read the unvalidated form value.

REASON WHY ITS THE ANSWER:

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

QUESTION 13
You are developing an ASP.NET MVC application that will be deployed on a web farm. Passwords must
be stored in the web.config file and must not be readable or in a format that is easily decodable
You need to encrypt the passwords that are stored in the web.config file.
Which command-line tool should you use?
A. Aspnet_regiis.exe
B. Ngen.exe
C. Aspnet_merge.exe
D. EdmGen.exe

REASON WHY ITS THE ANSWER:

QUESTION 14
You are designing a distributed application.
The application must store a small amount of insecure global information that does not change
frequently. You need to configure the application to meet the requirements.
Which server-side state management option should you use? (Each correct answer presents a complete
solution. Choose all that apply.)
A. Application state
B. Session state
C. Database supportD. Profile properties

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

REASON WHY ITS THE ANSWER:

QUESTION 15
You are developing an ASP.NET MVC application. The application is deployed in a web farm and is
accessed by many users.
The application must handle web server failures gracefully. The servers in the farm must share the
shortterm state information.
You need to persist the application state during the session.
What should you implement?
A. ASP.NET session state
B. A local database
C. A state server
D. Profile properties

REASON WHY ITS THE ANSWER:

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

QUESTION 16
You are developing an ASP.NET MVC application that will be deployed to servers on multiple networks.
The application must be compatible with multiple browsers. You must track the page number that the
user is viewing in search results.
You need to program the location for storing state information.
Where should you persist state information?
A. Session
B. QueryString
C. Application
D. TempData

REASON WHY ITS THE ANSWER:

QUESTION 17
You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires
several thousand content files. All content is hosted on the same IIS instance as the application.
You detect performance issues when the application starts.
You need to resolve the performance issues.
What should you do?
A. Enable compression in IIS.

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

B. Move the content to a second server.


C. Combine the content files by using ASP.NET MVC bundling.
D. Implement HTTP caching in IIS.

REASON WHY ITS THE ANSWER:

QUESTION 18
You are designing an HTML5 website.
You need to design the interface such that the content is viewable in all types of browsers, including
screen readers,
What should you do? (Each correct answer presents a complete solution. Choose all that apply.)
A. Ensure that content elements have valid and descriptive names.
B. Use Resource Description Framework (RDF) to describe content elements.
C. Convert HTML forms to XForms.
D. Use HTML5 semantic markup elements.
E. Annotate content elements with Accessible Rich Internet Application (ARIA) attributes.

REASON WHY ITS THE ANSWER:

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

QUESTION 19
You are developing an ASP.NET MVC application by using Visual Studio 2012.

The application throws and handles exceptions when it runs.

You need to examine the state of the application when exceptions are thrown.

What should you do?


A. From the Debug menu in Visual Studio 2012, select Exceptions. Enable the Thrown check box for

Common Language Runtime Exceptions.


B. From the Debug menu in Visual Studio 2012, select Exceptions. Disable the Userunhandled check box

for Common Language Runtime Exceptions.


C. From the DEBUG menu in Visual Studio 2012, select Attach to Process. Select the IIS process.
D. From the TOOLS menu in Visual Studio 2012, click Customize. C!ic< tie Commands tab and select

Debug.

REASON WHY ITS THE ANSWER:

Facilitator:_____________________

Student:_____________________

HOMEWORK FOR WEDNESDAY

__/__

QUESTION 20
You are developing an ASP.NET MVC application.
You need to authenticate clients by using an ASP.NET membership database.
Which authentication method should you implement?
E. Kerberos
F. Forms
G. Basic
H. Windows

REASON WHY ITS THE ANSWER:

=====================================================================================
HOMEWORK FOR 29/10/2014
=====================================================================================

Facilitator:_____________________

Student:_____________________

S-ar putea să vă placă și