Question  135
 You work for a software company that sells Web Parts to customers. You designed the first version of a Web Part named Weather 1.0. The company has already sold several hundred licenses of the Web Part. You designed a new solution package for Weather 2.0. Some customers who are already using Weather 1.0 will install Weather 2.0 in the same Web application as Weather 1.0. You need to design your package so that the functionality of Weather 1.0 will not be affected by the installation of Weather 2.0 in the same Web application. Which approach should you recommend?
A. Use the same assembly name and namespace for Weather 2.0 that you used for Weather 1.0. Create a new .web part file. Increment the version number in the .web part file.
B. Use the same assembly name and namespace, but increment the version number of the assembly package. Use the same .web part file that you used for Weather 1.0.
C. Use the same assembly name and namespace, but increment the version number of the assembly package. Configure assembly binding redirection from version 1.0 of the assembly to version 2.0. Use the same .web part file that you used for Weather 1.0.
D. Use the same assembly name and namespace, but increment the version number of the assembly package. Create a new .web part file.

解析:
  你为一家专门为客户提供Web part产品的公司开发了一个名为Weather 1.0版本的Web Part,此公司已经卖出去了几百套此Web Part, 你现在开发了此Web Part的新版本Weather 2.0,以前已经使用Weather 1.0的老客户需要在他们应用的环境中安装Weather 2.0,你需要保证Weather 1.0的运行功能不会因为Weather 2.0的安装受影响。你该采用何种措施来达成此目的呢?
   顾名思义,WebPart就是组成网页(Web)的部件(Part),它是SharePoint站点WebPartPage的基本构建块。直观的看,在SharePoint网站的页面上,数据的显示、数据的编辑,都是通过一个一个的WebPart来完成的;实质上,WebPart是ASP.NET自定义控件,都是由一个WebPart说明文件(.dwp)和WebPart程序集(.dll)组成。
   如果你对早先部署的WebPart程序集(.dll)进行了升级,那么原先添加的Web Part就会停止工作,因为Sharepoint找不到针对原先Web part的程序集了。【这也是本题要求尽量避免的】
   由于.NET支持并行存储和执行同一程序集的不同版本,这种支持内置于运行时基础结构中。 因为强名称程序集的版本号是其标识的一部分,所以运行时能够在全局程序集缓存中存储同一程序集的多个版本,并且在运行时加载这些程序集。根据这一特性,我们就可以创建一个新的Feature,但使用相同的程序集签名和不同的版本号,这样我们就解决了WebPart程序集(.dll)升级后找不到原程序集而造成的已安装Web Part运行失效的问题。 而备选项中,选项D符合这样的操作。
  选项A. 修改.web part文件中的Version并不影响程序集的Version,如果程序集的Version不变就会覆盖掉原来的WebPart程序集(.dll),造成已部署Web Part的停工,所以排除。
  选项B. 如果使用的是与Weather 1.0相同的.web part(内有Web Part版本号)文件,那还叫什么功能升级呢?所以排除。
  选项C. 犯了与选项B一样的错误,使用的是与Weather 1.0相同的.web part文件。所以排除。

因此本题答案应该选  D

参考 
http://blogs.msdn.com/b/andrasg/archive/2011/07/19/the-good-solution-for-versioning-sharepoint-2010-webparts.aspx
http://msdn.microsoft.com/en-us/library/cc768621(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ff407219(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/ms227561.aspx
http://msdn.microsoft.com/zh-cn/library/vstudio/fdhkd3a5.aspx

Question  136
 You are designing a SharePoint 2010 application. You have a requirement to allow access to a Microsoft  Windows .NET Framework assembly across multiple Web applications in a farm. An assembly element has been added to the solution manifest (manifest.xml). You need to ensure that the deployment of the assembly meets the requirements. Which approach should you recommend?
A. Specify a Deployment Target of GlobalAssemblyCache.
B. Specify a Deployment Target of Web Application.
C. Specify a Location of GlobalAssemblyCache.
D. Specify a Location of Web Application.

解析:
  你开发了一个Sharepoint2010应用程序,在你开发的解决方案的manifest.xml中你加入了程序集元素(assembly element),你需要保证在场内的不同Web Application之间可以访问这个开发的Microsoft  Windows .NET Framework的程序集,你该如何部署你的开发才能满组上述需要呢?
  本题使用到了解决方案文件manifest.xml:解决方案指令清单(通常称为 manifest.xml)存储在解决方案文件的根位置。此文件定义要处理的功能、网站定义、资源文件、Web 部件文件和程序集的列表。 在manifest.xml的assembly元素中指定要包含在解决方案中的程序集。

<Solution SolutionId="4AFC1350-F354-4439-B941-51377E845F2B" xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureManifests>
<FeatureManifest Location="FeatureLibrary\feature.xml"/>
</FeatureManifests>
<TemplateFiles>
<TemplateFile Location="ControlTemplates\Featurelibraryform.ascx"/>
</TemplateFiles>
<RootFiles>
<!-- These files go into the 12\ directory and can be used for Web services and global resources -->
<RootFile Location="ISAPI\MyWebService.asmx">
</RootFiles>
<Assemblies>
<Assembly DeploymentTarget="GlobalAssemblyCache"
Location="ms.samples.sharepoint.myFeature.dll"/>
</Assemblies>
</Solution>

其中DeploymentTarget属性:为可选属性,类型为 Text。程序集部署的首选目标。将程序集复制到由 DeploymentTarget 属性(对于 Web 应用程序)或全局程序集缓存(对于服务器场)指定的目标。可能的值:
GlobalAssemblyCache   如果程序集是一种场功能,则将其复制到全局程序集缓存。
WebApplication   如果程序集是一种 Web 应用程序功能,则将其复制到虚拟服务器的 bin 目录。
 由于本题要求在场内的不同Web Application之间可以访问这个开发的Microsoft  Windows .NET Framework的程序集,所以应该部署在全局程序集缓存中,即此属性值为GlobalAssemblyCache 。

因此本题答案应该选  A

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

Question  137
 You are designing a SharePoint 2010 application. You need to plan the deployment of a user control named MyControlTemplate.ascx as a control template. What should be added to the solution manifest (manifest.xml) to achieve this goal?
A. Add a Template File element, specifying a Location of MyControlTemplate.ascx.
B. Add a Template File element, specifying a Location of Control Templates\MyControlTemplate.ascx.
C. Add a Root File element, specifying a Location of MyControlTemplate.ascx.
D. Add a Root File element, specifying a Location of Control Templates\MyControlTemplate.ascx.

解析:
  你想要把一个名为MyControlTemplate.ascx的用户自定义控件部署成一个控件模板,你该如何添加此元素到解决方案的manifest.xml文件中呢?
  此题的备选项涉及解决方案指令清单(manifest.xml)中的Template File元素与Root File元素。
 Root File元素: 指定将解决方案文件复制到的根路径。使用此元素可部署由多个功能共享的本地化资源。共享的本地化资源位于 %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Resources 文件夹中。例如,以下 XML 部署三个共享的本地化资源文件。

<RootFiles>
<RootFile Location="Resources\wingtip.resx" />
<RootFile Location="Resources\wingtip.en-US.resx" />
<RootFile Location="Resources\wingtip.es-ES.resx" />
</RootFiles>

Template File元素:指定要包括在该解决方案中的模板文件。Sharepoint的模板文件一般都是放在Template目录下,而控件模板则放在此目录下的ControlTemplates文件夹下(目录位置如图)。

 <TemplateFiles>
<TemplateFile Location="ControlTemplates\Featurelibraryform.ascx"/>
</TemplateFiles>

因此本题答案应该选 B

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

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

  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数据查询优化

    项目介绍 pheongap混合应用,跨平台,做应用加工厂提供应用模板编辑器~ 本地应用,完全是模拟IOS,安卓原生应用的实现,所以支持14种手势,所有PPT动画,视觉差效果,等等功能组合... 这是I ...

  2. Java之控制反转和依赖注入

    1.简介 依赖注入和控制反转,目的是为了使类与类之间解耦合,提高系统的可扩展性和可维护性,下面通过一个例子来引入这一概念. 2.案例 1)一般情况下的类耦合 Main.java public clas ...

  3. Android混淆代码

    Android代码混淆是必须的,java层代码如果不做混淆等于把源代码送人了.那如何做混淆呢? 之前一般都是提到采用proguard.cfg,但使用新版本ADT后没有这个文件了,取而代之的是progu ...

  4. 深入理解javascript中的富文本编辑

    前面的话 一说起富文本,人们第一印象就是像使用word一样,在网页上操作文档.实际上差不多就是这样.富文本编辑,又称为WYSIWYG (What You See Is What You Get所见即所 ...

  5. Windws Server 2008 R2 WEB环境配置之MYSQL 5.6.22安装配置

    版本选择 因为MySql的版本越来越多,而作为中小网站者可能没有足够的经济去购买商业版本,所以一般选择免费版,而且功能也是足够使用的. 有钱任性就下载企业版,哈哈. 目前使用最多的版本是mysql i ...

  6. js操作label,给label赋值,和取label的值

    取值:var Label_text=document.getElementById('test_label').innerHTML; 赋值:document.getElementById('test_ ...

  7. Java多线程系列--“JUC锁”01之 框架

    本章,我们介绍锁的架构:后面的章节将会对它们逐个进行分析介绍.目录如下:01. Java多线程系列--“JUC锁”01之 框架02. Java多线程系列--“JUC锁”02之 互斥锁Reentrant ...

  8. 查看nginx配置文件路径

    进入nginx安装目录(我的是/usr/local/nginx-1.7.8/) 进入sbin目录,输入 ./nginx -t查看nginx配置文件路径以及该文件语法是否正确 ./nginx -v查看n ...

  9. php后管理分类导航菜单

    <!DOCTYPE> <html> <head> <meta http-equiv="Content-type" content=&quo ...

  10. 改用C++生成自动化数据表

    改用C++生成自动化数据表 前面的文章中,我们讨论了使用一个基于.NET的第三方程序库来从程序中来生成数据表.在我看来,这整个思路是非常有用的,例如为显示测试结果.我经常会自己在博客中尝试各种像这样的 ...