1 / 81

SharePoint Server 2010 應用程式介面開發

SharePoint Server 2010 應用程式介面開發. 曹祖聖 台灣微軟資深講師 jimycao@syset.com http://teacher.syset.com MCP, MCP+I, MCSA, MCSE, MCDBA, MCAD, MCSD, MCTS, MCITP, MCPD, MCT, MVP. 大綱. SharePoint 2010 開發平台簡介 SharePoint 2010 介面 使用 VS2010 開發 SharePoint 應用程式 Feature 開發功能改進 VS2010 方案的改 變 清單功能.

julinka
Télécharger la présentation

SharePoint Server 2010 應用程式介面開發

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SharePoint Server 2010 應用程式介面開發 曹祖聖 台灣微軟資深講師 jimycao@syset.com http://teacher.syset.com MCP, MCP+I, MCSA, MCSE, MCDBA, MCAD, MCSD, MCTS, MCITP, MCPD, MCT, MVP

  2. 大綱 • SharePoint 2010 開發平台簡介 • SharePoint 2010 介面 • 使用 VS2010 開發 SharePoint 應用程式 • Feature 開發功能改進 • VS2010 方案的改變 • 清單功能

  3. 大綱 • SharePoint 2010 開發平台簡介 • SharePoint 2010 介面 • 使用 VS2010 開發 SharePoint 應用程式 • Feature 開發功能改進 • VS2010 方案的改變 • 清單功能

  4. SharePoint 2007 • Windows SharePoint Services (WSS v3) • 網站與工作區引擎 • 內建協同運作服務 • Microsoft Office SharePoint Server (MOSS) • 使用者設定檔、搜尋、工作流程、內容管理 • 商務資料目錄、Excel Services, Forms Services Browser Clients Microsoft Office SharePoint Server 2007 (MOSS) MS Word Clients Windows SharePoint Services 3.0 (WSS v3) MS Outlook Clients .NET Framework 3.0 Internet Information Services 6.0or7.0 Windows Server 2003 or 2008 (32-bit or x64)

  5. SharePoint Server 2010 • Microsoft SharePoint Server 2010 (SPS) • Microsoft SharePoint Foundation 2010 (MSF 4.0) • 開發人員可以在用戶端進行開發 • SharePoint 2010 可以安裝在 Windows Vista, 7 上 Browser Clients Microsoft SharePoint Server 2010 MS Word Clients Microsoft SharePoint Foundation 2010 MS Outlook Clients .NET Framework and ASP.NET 3.5 SP1 Internet Information Services 7.0 Windows Server 2008 (x64 only)for Production Environments Windows 7 or Vista (x64 only) for Development Environments only

  6. SharePoint 2010 開發新功能 • 改善介面與存取功能 • 更好的開發與設計工具 • 使用PowerShell與 SharePoint 互動 • 清單與事件的改進 • 使用 LINQ 存取 SharePoint • 新的用戶端物件模型 • 加強開發工作流程應用程式的支援 • 可延伸式的 Service Application 架構 • 透過 SharePoint 存取外部資料 • 使用新的 Connector Framework 加強搜尋 • 沙箱式解決方案與部份信任程式碼 • Claims-based 安全機制

  7. SharePoint 名詞介紹 - Farm (SPFarm) - Web Application (SPWebApplication) - Site Collection (SPSite) - Site (SPWeb) - List (SPList) - Item (SPListItem) - Document Library (SPDocumentLibrary) - File(SPFile) - Folder(SPFolder)

  8. 大綱 • SharePoint 2010 開發平台簡介 • SharePoint 2010 介面 • 使用 VS2010 開發 SharePoint 應用程式 • Feature 開發功能改進 • VS2010 方案的改變 • 清單功能

  9. SharePoint 2010 使用者介面 訊息通知 狀態列

  10. SharePoint 2010 介面 • Ribbon 介面 • 就地編輯 對話方塊 AJAX 更新

  11. 多階層 Ribbon 功能切換 • 不需要切換畫面 • 例如: 清單設定與清單項目設定

  12. 針對多個清單項目進行動作 Custom ?

  13. AJAX 對話方塊 demo

  14. 建立頁面 1 • 每一個小組網站都有一個頁面庫 • 按一個滑鼠鍵就可以建立頁面 • 輸入頁面名稱 • 編輯頁面內容 • 建立 Wiki 連結 • 頁面 • 清單 • 項目 • 文件 2 3

  15. 頁面編輯 • 按一下滑鼠鍵就可以編輯目前頁面 • 不需要另外開啓應用程式來編輯 • 就像在 Word 中編輯文件一樣 • 編輯頁面文字格式、圖片與排版 • 直覺式物件插入 • 圖片、連結、… • 儲存在 Sites Assets Library

  16. 安全、簡單 • 每分鐘自動儲存,減少資料遺失 • 只有使用者對頁面有變更時才會自動儲存 • 開始編輯與停止編輯 • 編輯保護功能 • 支援 Undo 功能 • 支援版本控管,可以還原到舊版本頁面

  17. 主版頁面

  18. 多國語系 • 網站以不同語言呈現 • 以 Language Pack 為基礎 • 由使用者翻譯 • 在建構網站時設定主要語言 • 使用者可以選擇喜好的語言 • 可以使用程式呼叫物件模型來變更語言

  19. 支援相關標準 • Well-Formed XHTML 1.0 • 跨瀏覽器 • Level 1 : 32-bits IE 7,8, Firefox 3 (Windows OS) • Level 2 : 64-bits IE, Firefox (非 Windows OS), Safari • WCAG 2.0 新的文字編輯器支援 XHTML

  20. 簡化自訂使用者動作的步驟 • 可以在以下位置加入自訂命令 • ECB • Ribbon • 表單工具列 • 檢視工具列 • 設定頁面 • 在清單、網站、網站集合中設定 • 使用 SharePoint Designer 或撰寫程式呼叫 OM • 不可以使用使用者程式碼或使用者控制項 • 安全性考量

  21. SharePoint Designer 2010 • SPD shell’s focus on SharePoint objects • SPD 物件具有關聯性 • 直接在 SPD 中瀏覽與引用 SharePoint 物件 • SPD 設計的結果可以移轉到 Visual Studio 2010 • SPD 匯出 .wsp檔案 • .wsp檔案匯入 Visual Studio 2010 新的介面把焦點放在 SharePoint 物件上 SPD 2007 介面 SPD 2010 介面

  22. 使用者自訂動作 demo

  23. SharePoint 2010 表單支援 • 內容類型支援多個表單,可以指定預設表單 • Display • New • Edit • 可以自訂使用者動作來連結這些表單 • 支援 Web 2.0 檢視技術 • 整合 InfoPath

  24. XsltListViewWebPart • 用來取代ListViewWebPart • Web 2.0 介面 • Schema 檢驗 • 就地編輯 • 支援 XSL/T 語法

  25. 新舊技術比較

  26. XsltListViewWebPart運作機制 CAML 查詢 XmlDefinition SPDataSource XML 資料 XsltListViewWebPart HTML 清單 Schema ListName XslCompiledTransform 外觀轉換 XSL

  27. InfoPath 2010 與SharePoint 2010

  28. 建立 InfoPath 清單表單

  29. XsltListViewWebPart demo

  30. 大綱 • SharePoint 2010 開發平台簡介 • SharePoint 2010 介面 • 使用 VS2010 開發 SharePoint 應用程式 • Feature 開發功能改進 • VS2010 方案的改變 • 清單功能

  31. VS 2010 SharePoint 開發工具 • Visual Studio 2010 • 與 SharePoint 2010 密切整合 • 新的工具只能針對 SharePoint 2010 SharePoint Explorer New Project and Item Templates New Project Structure

  32. Visual Studio 2010 SharePoint 工具集 • VS2010 + SharePoint 2010 開發人員 • SharePoint Explorer • SharePoint 2010 專案與項目樣版 • 視覺化設計 • 3rd party 開發人員可以加以延伸 • 優勢 • SharePoint 資料夾與檔案結構抽象化 • .wsp檔案抽象化 • 減少使用額外工具的需求

  33. 偵錯 SharePoint 2010 程式碼 • 一定要用系統管理者身份執行 VS2010 • VS2010 需要附加 IIS 的工作程序 w3wp.exe

  34. SharePoint 2010 OMSharePoint Explorer demo

  35. SharePoint 2010 專案樣版 • 所有專案都使用標準架構建立 • 專案屬性 • 檔案檔案與資料夾 • 組件部署目標 • 沙箱式解決方案 • 網站網址 • 啓動項目

  36. SharePoint 2010 專案結構 • 標準專案節點結構 • Properties(所有專案) • References(所有專案) • Features(SharePoint 2010 專案) • Package (SharePoint 2010 專案) • SharePoint 專案項目(額外加入)

  37. Feature 節點與 Feature Designer • Feature 節點裡可以包含一個以上的 features • Feature designer 提供設計模式與 XML 文字模式 • 可以在設計介面上或屬性視窗上設定 feature 屬性 • 使用快顯功能表在 Feature 節點上加入事件接收器(event receiver) • 設計工具允許加入或移除其它 SharePoint 專案項目 (SPI) • 可以設定 feature 啓用的相依性

  38. Mapped Folders • Mapped Folders used to deploy to RootFiles • Layouts 資料夾對應到 /_layouts 虛擬目錄 • Images 資料夾對應到 /_layouts/images 虛擬目錄 • 你可以自行對應其它資料夾到網站根目錄下 • Layouts 資料夾用來建立應用程式頁面

  39. 部署選項 • 兩種預設的部署組態設定 • Default • No Activation

  40. F5 偵錯 • F5 做了什麼? • 建置新版本的 .wsp檔 • 停用並移除現有的 feature • 解開並刪除舊的.wsp檔 • 加入並部署新的 .wsp檔 • 在目標網站上啓用 feature • 附加至 w3wp.exe 進行偵錯

  41. Hello World demo

  42. SharePoint 專案項目 (SPI) 樣版

  43. SharePoint 專案項目 (SPI) • SPI 會和專案一起建置與部署 • SPI 是專案檔案的邏輯集合例如: WebParts + 清單定義 + 工作流程 + … • 每一個 SPI 都有一個資料夾 • 編譯與部署資訊由 SPI 屬性來指定

  44. SPI 檔案屬性 • 專案會追蹤所有 SPI 檔的屬性 • Visual Studio 類的屬性代表編譯行為 • SharePoint 類的屬性代表部署行為

  45. 自訂 SPI • 建立 Custom Action 專案項目 • 用來加入客製化功能項目 • 你可以使用自訂功能表與屬性來延伸 SPI 在新的 SPI 中加入檔案 自訂 SPI 樣版 可以使用 Custom Action Designer 進行設計 加入新項目 使用自訂屬性來延伸 SPI

  46. HelloWebParts demo

  47. 大綱 • SharePoint 2010 開發平台簡介 • SharePoint 2010 介面 • 使用 VS2010 開發 SharePoint 應用程式 • Feature 開發功能改進 • VS2010 方案的改變 • 清單功能

  48. Feature 版本與升級機制 • 其它: • MapFile – FromPath/ToPath • AddContentTypeField 支援版本範圍 自訂升級動作

  49. Feature 啓用相依性選項 • MinimumVersion • 會嘗試升級 feature 以符合最低版本需求 • Solution Id || FeatureId • Metadata Feature Title, Description, Solution Title, ... • VS 設計介面支援設定 V3 版的 feature • 相依規則 • 相依於同一個範圍或更高層的範圍 • 隱藏的 features 不能有相依設定 • 隱藏的相依會自動被啓用

  50. 更多新的事件 • Site Events • SiteDeleting/SiteDeleted • WebDeleting/WebDeleted • WebMoving/WebMoved • WebAdding/WebProvisioned • List Events • EmailReceived • FieldAdding/FieldAdded • FieldUpdating/FieldUpdated • FieldDeleting/FieldDeleted • ListAdding/ListAdded • ListDeleting/ListDeleted • Item Events • ContextEvent • ItemAdding/ItemAdded • ItemUpdating/ItemUpdated • ItemDeleting/ItemDeleted • ItemCheckingIn/ItemCheckedIn • ItemCheckingOut/ItemCheckedOut • ItemUncheckingOut/ItemUncheckedOut • ItemAttachmentAdding/ItemAttachmentAdded • ItemAttachmentDeleting/ItemAttachmentDeleted • ItemFileMoving/ItemFileMoved • ItemFileConverted • Workflow Events • WorkflowStarting/WorkflowStarted • WorkflowPostponed • WorkflowCompleted

More Related