Sharepoint学习笔记—习题系列--70-576习题解析 -(Q88-Q91)

Question 88 
You are designing a SharePoint 2010 application that stores data in a list named Base List. This list contains 25,000 records. A view named View  List filters data on a column named Create Date. The Create Date column is of type Date and Time. The View List view requires too much processing time when displaying Base List data. Your design needs to improve the performance of the View List view when it displays the Base List data. Which approach should you recommend?
A. Enable the Display items in batches of the specified size property in the Item Limit option of View List.
B. Set the Group By option of View List to group by the Create Date column.
C. Add a column index to Base List based on the Create Date column.
D. Change the Create Date column type to Date Only.


解析:
  某个Sharepoint2010应用程序在一个名为Base List的列表中存储了25000条记录。此列表有一个名为View List的视图,此视图基于Create Date列(为日期时间数据类型)对列表数据进行了过滤。现在的问题是,当此视图呈现列表数据时,耗时过长。因此,需要你想办法提高其执行效率。
  一般造成列表信息呈现效率过慢的原因多从数据库层面,网络层面,Sharepoint网站层面来考虑。由于本题已经对列表数据进行了过滤, 所以不存在从数据源获取了太多数据的问题,因此可以直接排除选项A.即设置返回列表项条数的限制。
  选项B. 对列表项进行分组,解决是列表的显示格式问题。
选项C. 建列表索引。我们知道,Sharepoint中的列表就如同数据库中的数据表一样,在数据库中的数据表上建立索引可以提高数据表的读取速度,同样的道理,此方法也适用于Sharepoint中的列表。在Sharepoint中最多可以为 20 栏编制索引。一般而言,利用栏索引,可以基于该栏中的值快速查找所需的行,甚至是在处理数以百万计的项目时也是如此。将索引与筛选的视图组合时,可以快速检索到所需的项目。所以,此选项应为本题答案。
选项D. 改变列表某一字段的数据类型。此操作是对列表结构的局部调试,并没有提高列表的呈现效率,所以排除。
因此本题答案应该选 C

参考 
http://www.sharepointboco.com/performance-with-sharepoint-2010-large-lists-list-view-throttling/
http://technet.microsoft.com/zh-cn/library/cc768269.aspx
http://office.microsoft.com/en-us/windows-sharepoint-services-help/view-users-and-sharepoint-groups-and-edit-the-quick-launch-group-list-HA010100150.aspx

 

Question 89 
You are designing a SharePoint 2010 application that has 24 lists. The application has the following characteristics:
.Some lists contain only Single line of text columns, while other lists have complex column types such as Person or Group and External Data.
.Each list contains 10,000 or more records. Your design needs to limit the number of items in a single database operation to 2,500. Which approach should you recommend?
A. Set the List View Lookup Threshold option to 2,500 items.
B. Set the List View Threshold option to 2,500 items.
C. Set the Number of groups to display per page property of the Group By option to 2,500 items.
D. Set the Number of items to display property of the Item Limit option to 2,500 items.


解析:
  你设计的Sharepoint2010应用程序使用了24个列表,此应用程序有如下特点:
 特点1. 一些列表只包含了一个Single Line of Text类型的列,而另一些列表则包含了比较复杂的列,如: Person, Group以及外部数据类型。
 特点2. 每个列表都存储了超过10000条的记录。
   你需要考虑限制每一次针对列表的数据库访问的数据记录的数量上限为2500条。你应该采用哪种方式呢?
   本题实质是设置Sharepoint列表的列表视图阈值。列表视图阈值是数据库操作(如查询)一次可涉及的列表项或库项目的最大数目。默认情况下,该最大项目数设置为 5,000。此限制会对大型列表产生重大影响,因为(根据该阈值的定义)大型列表中包含的项目数会超过此限制。超过此限制的操作会被阻止。诸如在超过此限制的列表中创建索引这样的操作会被阻止,因为此操作影响了 5,000 个以上的项目。此限制不仅会阻止可选择的项目(可使用筛选条件进行高效筛选的项目)的数目超过 5,000 的查询,还会阻止在未索引的列上进行筛选的查询。这是因为在未索引的列上进行筛选(某些情况下进行分类)的查询必须对列表中的所有项目进行筛选以检索正确的数据集,并且该查询涉及的项目数超过了列表视图阈值。此限制的默认值基于服务器场和列表性能以及 SQL Server 管理锁定的方式。一般建议不要更改此限制。
   本题的备选项中,只有选项B是涉及到列表视图阈值的修改,所以选项B是正解。
   选项A.是设置列表”查询字段”(此字段类似于下拉框)可呈现的最大数据阀值,与列表整体数据项的数量限制无关。
   选项C.D则均与设置列表视图阈值无关,所以予以排除。
因此本题答案应该选 B

参考 
http://social.technet.microsoft.com/Forums/sharepoint/zh-CN/b9abf185-ea7c-41c1-aed6-c5d942f5922c/list-view-lookup-threshold-limits
http://www.360sps.com/Item/SPListItemViewThreshold.aspx
http://apmblog.compuware.com/2009/01/28/sharepoint-list-performance-how-list-column-indices-really-work-under-the-hood/

 
Question  90 
You are designing a SharePoint 2010 application. You are also designing a Microsoft .NET Framework client application that will interact with the SharePoint application. You need to design the client application to create, update, and delete lists. Which approach should you recommend?
A. Use the SP.UI.UIUtility class in the client application.
B. Use SharePoint 2010 Web services in the client application.
C. Use the SharePoint Foundation 2010 managed client object model in the client application.
D. Create a Business Connectivity Services (BCS) package that manages tasks between the client and server applications.

解析:
  你需要实现从一个.NET Framework客户端应用程序与Sharepoint应用程序进行交互。通过此客户端应用程序实现对Sharepoint列表的创建、更新和删除操作。你该使用哪种方法呢?
  我们知道,凡是涉及客户端程序与Sharepoint环境交互的应用一般都要用到Sharepoint2010所提供的客户端对象模型。
  Microsoft SharePoint 2010 软件开发工具包 (SDK) 介绍了三种客户端 API,这些 API 允许您通过在
  1、浏览器中执行的脚本(ECMScript:Javascript,JScript)
  2、在 .NET 托管应用程序中执行的代码(Microsoft .NET Framework 3.5 或更高版本)
  3、Microsoft Silverlight 2.0 应用程序
执行的代码与 SharePoint 网站进行交互。
   与上述三种API对应的分别是三种客户端对象模型:
  1、ECMAScript(JavaScript、JScript) 客户端对象模型
  2、.NET 托管客户端对象模型
  3、Silverlight 客户端对象模型
 所以正确答案应该为C.
 选项A. 涉及SP.UI 命名空间,此空间包含一系列的Javascript对象,这些对象为Sharepoint提供涉及状态信息(status messages),布告(notifications)和对话框(dialogs)之类的用户界面的操作接口。所以此空间下的各个类与Sharepoint数据操作无关。
 选项B.理论上而言,我们的确可以通过Web Service完成对Sharepoint数据的操作,但前提是你必须事先在Sharepoint服务器环境中开发并提供这样的Web Service,并把它开放出去。但由于本题提到的是SharePoint 2010 Web services,我的理解是Sharepoint默认提供的那些Web Service, 其中我们可以找到关于列表操作的List.asmx,但它只基于已经创建好的List提供服务,找不到本题所要求的创建List的功能。
   选项D.使用BCS则是在服务器端开发的应用,不是客户端开发,所以排除。
因此本题答案应该选 C
参考 
http://www.cnblogs.com/wsdj-ITtech/archive/2013/03/18/2559413.html
http://msdn.microsoft.com/zh-cn/library/ee537247(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/jj245882.aspx#中国(简体中文)
http://msdn.microsoft.com/zh-cn/library/websvclists(v=office.12).aspx
http://www.infoq.com/cn/articles/swanson-moss-web-services
http://panvega.wordpress.com/2007/09/15/consuming-listsapsx-webservice-from-sharepoint/


Question  91 
You are designing a SharePoint 2010 application that has more than 7,000 items in a list named Customers. Resource throttling is used to specify a list view threshold of 5,000. You have a requirement to ensure that users in a domain group named Customer Auditors are allowed to perform operations on all items via a custom application. You need to design the application to meet the requirements. Which approach should you recommend?
A. Grant Full Read permissions to the Customer Auditors group.
B. Add the Customer Auditors group to the Site Owners group.
C. Add the Customer Auditors group to the Administrators group on each Web front-end server.
D. Add the Customer Auditors group to the Administrators group on the Central Administration server.


解析:
 某个Sharepoint2010应用程序使用到了一个名为Customers的列表,此列表存储了超过7000条记录,根据Resource Throttling的设置规定,一个列表视图最多显示5000条记录。现在你需要保证所有在Customer Auditors这个域组内的用户能够通过程序操作列表Customers中的所有记录。
那么你该如何设计这个程序来满足上述需求呢?
  我们知道在Sharepoin中,如果场管理员允许object model overrides,我们就可以通过程序代码突破list view thresholds,我们可以从以下方面着手:
1. 通过设置SPWebApplication.MaxItemsPerThrottledOperation属性来设置某个Web Application内的所有的List View Threshold。
2. 通过设置SPList.EnableThrottling属性为False来设置某个List的List View Threshold。
3. 通过使用SPQueryThrottleOption enumeration来影响某个Query的query throttling
  通过object model override方式来实现突破时,你必须明白它其实并不会修改针对普通用户所使用的List View Threshold,它只会允许在Web application user policy 中定义的auditors and administrators用户提交超越threshold限制的操作。换句话说,如果你不使用object model override方式,则在Web application user policy 中定义的auditors and administrators用户还是被卡在与普通用户一样的list view threshold上。
   以SPQueryThrottleOption为例:
query.QueryThrottleMode = SPQueryThrottleOption.Override;
SPQueryThrottleOption enumeration有三个值: Default, Override, and Strict.
  如果你使用Default值,则标准的list view threshold实用于除本地服务器Administrator的所有的用户。
  如果你使用Override值,则本地服务器Administrator不受限,在Web application user policy 中定义的auditors and administrators用户则受限于"auditors and administrators"层次的限制值,当然此值高于标准的list view threshold。
  如果你使用Strict值,则标准的list view threshold实用于所有用户,包括前面的本地服务器Administrator。
  从上面的分析可以判断,我们应该把Customer Auditors这个域组成员设置为本地服务器Administrator,这样才能配合编程突破标准的list view threshold限制。所以,选项C是正确选项。
  选项A. B都不是针对上述思路,所以直接排除。
  选项D是设置的Central Administration server,这个服务器上存放的是服务器场的配置数据库, 并不是内容数据库,而列表是属于内容数据库的,所以本选项也应被排除。

因此本题答案应该选 C

参考 
http://msdn.microsoft.com/zh-cn/library/ff798465.aspx
 

posted @ 2013-11-06 04:39  wsdj  阅读(857)  评论(0编辑  收藏  举报