Question  84
You are designing a Web Part for SharePoint 2010 that must be able to be used on any site in the farm. The Web Part will display data values updated from a Microsoft SQL Server database. Your design must:
.Verify the actual performance data of the Web Part on any page where it is used in the farm.
.Trace performance and latency through the SharePoint, .NET, and SQL Server layers of the Web Part execution process. Provide information that can be used to debug and troubleshoot all issues with page rendering time. You need to meet all the requirements and allow your developers to enable this capability on any page they need to test. Which approach should you recommend?
A. Build and deploy the Web Part as a sandboxed solution and set a daily quota for the Web Part. Monitor the Web Part memory utilization and adjust the appropriate Resource Measures property for the sandboxed solution.
B. Build and deploy the Web Part as a sandboxed solution and set an absolute limit quota for the Web Part. Monitor the Web Part performance and adjust the appropriate Resource Measures property programmatically using the SharePoint object model.
C. Build and deploy the Web Part hosted in each site that requires it. Set the developer dashboard to Off for the site. When testing performance, change the dashboard setting to On using a Power Shell script.
D. Build and deploy the Web Part hosted in the Central Administration site. Set the developer dashboard to On Demand in the farm. When testing performance, manually enable the dashboard on each Web page.

解析:
你需要设计一个可用在场内任何位置的Web Part,此Web Part用于显示来自SQL数据库的信息,且满足如下条件:
  要求1. 可以在场内的任何应用了此Web Part的页面上检验其执行效率
  要求2. 跟踪此Web Part在Sharepoint,.NET和SQL数据库层面上的执行效率和延迟情况,并为程序调试和诊断与页面呈现耗时相关的问题提供信息。  
程序开发人员可以根据需要自行决定是否启用上述功能。 你该采用哪种方案呢?
  首先,选项A.B采用了Sandbox解决方案, 并监视Sandbox解决方案上设置的配额消耗情况。而这种方式并不能跟踪到Web Part在Sharepoint、.NET和SQL数据库层面上的执行效率和延迟情况,并为程序调试和诊断与页面呈现耗时相关的问题提供信息。它仅是针对对分配给Sandbox解决方案的配额(如:CPUExcutionTime,CriticalExceptionCount,ProcessCPUCycles,ProcessIOBytes等资源或指标)进行监控,所以应该被排除。
  选项C.D涉及到开发人员面板(Developer Dashboard),我们先来看看其相关的知识点:
  开发人员面板是 Microsoft SharePoint Foundation 2010 中引入的仪表框架。此面板在概念上与 ASP.NET 页面跟踪类似,它提供了一些诊断信息,可帮助开发人员或系统管理员解决难以隔离的页面组件问题。例如,开发人员很容易无意地在其代码中引入额外的 SPSite 或 SPWeb 对象或添加外部 SQL Server 查询。
在过去,用于调试因代码中这些实例的额外开销所导致的性能问题的唯一方法是,将调试器附加到代码并监视 SQL Server Profiler 踪迹。利用开发人员面板,开发人员可通过编程方式(通过使用对象模型)或可视方式(通过查看页面输出)来识别此类问题。
  可以在以下模式中显示开发人员面板:
On:在 On 模式中启用面板时,可在使用默认母版页的所有页面上查看面板。
OnDemand:在将开发人员面板设置为 OnDemand 模式时,页面的右上方会显示一个图标。用户可使用该图标来启用和禁用面板。
  从上面的描述可以看出,选项C有存在的问题是:1.本题要求此Web Part适用于整个场,所以把本解决方案部署到Sharepiont管理中心更显合理。 2. 开发人员面板只有On和OnDemand两种状态值,没有选项C所提的Off状态值。3.本题显然使用OnDemand更合理,由使用者在相应的页面上灵活快捷地确定开启跟踪的时机,而用不着非得通过PowerShell来开启它。
  而选项D则更适合本题的要求。
  因此本题答案应该选 D

参考 
http://msdn.microsoft.com/zh-cn/magazine/ee335711.aspx
http://msdn.microsoft.com/zh-cn/library/ff512745(v=office.14).aspx
http://sharepointstudy.wordpress.com/2011/02/06/msdn-developing-deploying-and-monitoring-sandboxed-solutions-in-sharepoint-2010/

Question 85 
You are designing a SharePoint 2010 application. You have an Internet-facing site with numerous image and  movie files. You need to ensure that these files are cached so that they are displayed to users quickly. Which approach should you recommend?
A. In the SharePoint web.config file, set the cacheForEditRights property of the OutputCacheProfiles element to true.
B. In the SharePoint web.config file, set the enabled property of the Blob Cache element to true.
C. In Site Collection Administration, use Site Collection Cache Settings to configure the cache.
D. In Central Administration, use Search Administration to manage the cache.

解析:
  你需要在一个基于Sharepoint2010开发的公共网站上应用大量的图片和视频,为提高访问图片和视频的效率,你需要缓存这些资源文件,你应该采用哪种方式来达到此目的呢?
  根据Question83的描述,我们应该知道这属于 Microsoft SharePoint Server 2010 缓存选项中的二进制大型对象 (BLOB) 的基于磁盘的缓存类型。因为此类缓存就是用来控制对二进制大型对象 (BLOB)(如图像、声音、视频文件和代码片段)的缓存的。
使用基于磁盘的缓存可减少访问 BLOB 时所需的数据库往返行程次数。从数据库检索 BLOB 之后,BLOB 将会存储在 Web 服务器上。后续的请求都从基于磁盘的缓存提供,并根据安全性对这些请求进行修整。
  默认情况下,BLOB 缓存处于关闭状态,因此必须启用它才能使用它所提供的功能。如果在前端 Web 服务器上启用 BLOB 缓存,则将在 SharePoint Server 2010 数据库服务器上减少 Web 浏览器发出的读取请求所产生的负载。
您可以在要应用 BLOB 缓存的 Web 应用程序的 Web.config 文件中启用 BLOB 缓存。您对 Web.config 文件所做的更改将应用于 Web 应用程序内的所有网站集。在Web.config中找到如下一行:

<BlobCache location="<location>" path="<files to be cached>" maxSize="10" enabled="true" />

其属性含义如下:
 location 是将用于存储缓存文件的目录。
 path 以常规表达式的形式指定根据文件扩展名缓存哪些文件。
 maxSize 表示基于磁盘的缓存的最大允许大小(以 GB 为单位)。默认是10GB
 max-age 指定客户端浏览器缓存下载到客户端计算机的 BLOB 的最长时间(以秒为单位)。如果下载的项自上次下载后尚未过期,则当请求该页时,不会重新请求相同的项。默认情况下,max-age 属性设置为 86400 秒(即 24 个小时),但它可以设置为 0 或更长的时间段。
 enabled 为禁用或启用缓存的布尔值。

实例如下:

<BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv)$" maxSize="10" enabled="true" />

从以上描述可以看出,选项B符合开启BLOB Cache的操作条件:1.通过Web.config文件开启. 2.通过属性enable开启。
因此本题答案应该选 B

参考 
http://technet.microsoft.com/zh-cn/library/cc261797(v=office.14).aspx#section3
http://technet.microsoft.com/zh-cn/library/ee424404(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/aa604896(v=office.14).aspx

Question 86 
You are consulting with a customer who has an Internet-facing SharePoint 2010 site. The SharePoint farm runs  across multiple servers. The customer needs to improve the user experience on the site by improving Web page load times. The site customization requires extensive resources, including large image files, custom CSS, and JavaScript files. You need to suggest a way to help improve the SharePoint site performance that does not require a hardware upgrade. What should you recommend that the customer do?
A. Configure the query servers in the farm as additional Web servers and verify that the object cache is enabled on all Internet-facing Web sites.
B. Reconfigure the Web servers to increase the size of their page files.
C. Enable disk-based caching on the Web servers for the Internet-facing Web site.
D. Create an additional Microsoft SQL Server database to store the configuration database that stores the data for the site.

解析:
  一个Sharepoint场内有多台服务器,上面开发部署了公网网站,为了加强公网用户的访问体验,需要提高页面的加载速度,此外还需要应用大量的图片,客户定制的CSS与Javascript文件。你需要考虑如何在无需硬件升级的前提下实现这个目标。
  下面我们来分析各选项:
  选项A. Configure the query servers in the farm as additional Web servers
    把一个Query服务器配置成WFE服务器以加强Web页面的请求处理。在实际操作中一般不会这么做,如果以牺牲Query能力来提高WFE服务能力在一定程度上是可以提高页面请求处理速度的。
and verify that the object cache is enabled on all Internet-facing Web sites.
  通过开启对象缓存来提高加载页面速度。我们知道,对象缓存的实施位置是:单个 Web 部件控件、字段控件和内容级别,包括跨列表查询缓存和导航缓存。本题涉及到了图片这类的大文件(including large image files, custom CSS, and JavaScript files),所以应该使用的是针对二进制大型对象 (BLOB) 的基于磁盘的缓存类型。
 
选项B. Reconfigure the Web servers to increase the size of their page files.
本选项的操作似乎是让问题更严重了,应该排除。

选项C. Enable disk-based caching on the Web servers for the Internet-facing Web site.
通过开启二进制大型对象 (BLOB) 的基于磁盘的缓存来满足本题的要求,基于磁盘的缓存可控制二进制大型对象 (BLOB)(如图像、声音和视频文件)的缓存。基于磁盘的缓存的速度非常快;因此不需要数据库往返。从数据库检索 BLOB 一次,然后将其存储在 Web 客户端上。将从缓存中为后续的请求提供服务并根据安全性对其进行修整。
 
选项D. Create an additional Microsoft SQL Server database to store the configuration database 
本选项另行存储配置数据库,与本题毫无关系,而且Sharepoint场的配置数据库, 它是维系Sharepoint场运行的关键数据库,它在安装Sharepoint时就已确定,一般不作更改。
因此本题答案应该选 C

参考 
http://msdn.microsoft.com/zh-cn/library/aa604896(v=office.14).aspx

Question 87 
You are planning a development environment to create custom solutions for a production SharePoint 2010 farm. The plan needs a software tool to help diagnose application bugs introduced through custom code and provide information about the page rendering time from the Web request to the database query. Developers need to isolate problems and diagnose excessive execution times in the following items:
.Page request
.SPRequest
.Microsoft SQL Server 2008
You need to recommend a way for developers to identify if a value exceeds acceptable ranges in the items listed in the requirements. What should you tell the developers to do?
A. Use the Object Explorer component of SQL Server Management Studio to configure the SQL Server Agent properties to Include execution trace messages.
B. Enable the developer dashboard for the development environment to display the required information on all pages.
C. Enable the Developer Tools in Microsoft Internet Explorer 8. Open the Script tab and click Start Debugging.
D. Enable the Developer Tools in Internet Explorer 8. Set up live editing of cascading style sheets (CSS) and click a property name, value, or selector. Then type a new value and press Enter.

解析:
  你负责创建一个基于Sharepoint2010场的开发环境。 此开发环境可以通过软件工具(此工具可通过用户代码引入)协助调试和诊错,并且可以提供从Web请求到数据查询等诸多层面的关于页面呈现时间的相关信息。开发人员需要对下面列举的条目进行问题隔离和执行超时诊断:
.Page request
.SPRequest
.Microsoft SQL Server 2008
   你需要为开发人员推荐采取哪种方法才能帮助他们辨别上述条目的某些值超过了既定范围,从而辅助其进行问题隔离和超时诊断。
   如果看了Question84,我们马上就能判断应该应用开发人员工作面板。
开发人员面板包含一个可扩展机制,用于在不同的范围下测量各种性能计数器。在开发人员面板内部,可使用以下性能计数器来监视请求的每个阶段的使用率和资源消耗。

  •  每线程计数器
  •  这些计数器可测量当前请求或计时器作业的值:
  •  线程执行时间
  •  数量、持续时间、调用堆栈信息和页面生成的每个 SQL Server 查询的查询文本
  •  数量、持续时间和每个 WCF 调用的调用堆栈信息
  •  URL 或计时器作业名称
  •  当前用户
  •  执行开始时间
  •  包含在 SPMonitoredScope 中的代码的前面的任意统计信息

通过引入 SPMonitoredScope 类,开发人员可“包装”代码并在屏幕上显示该代码的使用统计信息。可使用此信息标识潜在的失败点或至少可标识未按预期执行的组件。
  所以选项B为本题答案。
  选项A.解决了关于SQL的有些问题,但解决不了Page Request与SPRequest等关于Sharepoin环境内的有关问题。
  选项C.设置关于调试Script的功能,但并没解决本题所要求的功能。
  选项D.是使用IE Developer进行页面上的编辑测试,也没解决本题的问题。
因此本题答案应该选 B

参考 
http://msdn.microsoft.com/zh-cn/library/ff512745(v=office.14).aspx
http://social.technet.microsoft.com/Forums/zh-CN/5cd10180-9ee6-4d7e-b2d0-1b568d75988f/sharepoint-2010-developer-dashboard
http://msdn.microsoft.com/en-us/library/ms173849(v=sql.100).aspx

Sharepoint学习笔记—习题系列--70-576习题解析 -(Q84-Q87)的更多相关文章

  1. Sharepoint学习笔记—ECM系列—文档列表的Metedata Navigation与Key Filter功能的实现

    如果一个文档列表中存放了成百上千的文档,想要快速的找到你想要的还真不是件容易的事,Sharepoint提供了Metedata Navigation与Key Filter功能可以帮助我们快速的过滤和定位 ...

  2. Sharepoint学习笔记—ECM系列--文档集(Document Set)的实现

    文档集是 SharePoint Server 2010 中的一项新功能,它使组织能够管理单个可交付文档或工作产品(可包含多个文档或文件).文档集是特殊类型的文件夹,它合并了唯一的文档集属性以及文件夹和 ...

  3. Sharepoint学习笔记—习题系列--70-576习题解析 --索引目录

        Sharepoint学习笔记—习题系列--70-576习题解析  为便于查阅,这里整理并列出了70-576习题解析系列的所有问题,有些内容可能会在以后更新. 需要事先申明的是:     1. ...

  4. Sharepoint学习笔记—习题系列--70-573习题解析 --索引目录

                  Sharepoint学习笔记—习题系列--70-573习题解析 为便于查阅,这里整理并列出了我前面播客中的关于70-573习题解析系列的所有问题,有些内容可能会在以后更新, ...

  5. Deep Learning(深度学习)学习笔记整理系列之(五)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  6. Deep Learning(深度学习)学习笔记整理系列之(八)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  7. Deep Learning(深度学习)学习笔记整理系列之(七)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  8. Deep Learning(深度学习)学习笔记整理系列之(六)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  9. Deep Learning(深度学习)学习笔记整理系列之(四)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

  10. Deep Learning(深度学习)学习笔记整理系列之(三)

    Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...

随机推荐

  1. 让你心动的 HTML5 & CSS3 效果【附源码下载】

    这里集合的这组 HTML5 & CSS3 效果,有的是网站开发中常用的.实用的功能,有的是先进的 Web 技术的应用演示.不管哪一种,这些案例中的技术都值得我们去探究和学习. 超炫的 HTML ...

  2. 聚合索引(clustered index) / 非聚合索引(nonclustered index)

    以下我面试经常问的2道题..尤其针对觉得自己SQL SERVER 还不错的同志.. 呵呵 很难有人答得好.. 各位在我收集每个人擅长的东西时,大部分都把SQL SERVER 标为Expert,看看是否 ...

  3. 移植SlidingMenu Android library,和安装example出现的问题解决

    很多项目都用到类似左侧滑动菜单的效果,比如facebook,evernote,VLC for android等等,这很酷 源代码可以从GitHub的https://github.com/jfeinst ...

  4. java设计模式(六)--观察者模式

    转载:设计模式(中文-文字版) 目录: 简单目标任务实现 观察者模式介绍 观察者模式代码实现 观察者模式是JDK中使用最多的模式之一,非常有用.我们也会一并介绍一对多关系,以及松耦合(对,没错,我们说 ...

  5. TCP/IP详解学习笔记(13)-TCP坚持定时器,TCP保活定时器

    TCP一共有四个主要的定时器,前面已经讲到了一个--超时定时器--是TCP里面最复杂的一个,另外的三个是: 坚持定时器 保活定时器 2MSL定时器 其中坚持定时器用于防止通告窗口为0以后双方互相等待死 ...

  6. Git学习笔记(二)

    一.创建远程仓库(GitHub) 1.GitHub网站地址:https://github.com/,这个网站就是提供Git仓库托管服务的,所以,只要注册一个GitHub账号,就可以免费获得Git远程仓 ...

  7. dp - 2016腾讯笔试 A

    2016腾讯笔试 A Problem's Link -------------------------------------------------------------------------- ...

  8. c#中高效的excel导入sqlserver的方法

    将oledb读取的excel数据快速插入的sqlserver中,很多人通过循环来拼接sql,这样做不但容易出错而且效率低下,最好的办法是使用bcp,也就是System.Data.SqlClient.S ...

  9. 初识Oracle数据库的基本操作

    SQL> --切换用户 SQL> connect practice/ 已连接. SQL> --查询学生表信息 SQL> select * from stuInfo; STUNO ...

  10. jquery简单原则器(匹配偶数元素)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...