Programmin           gHanoi, 24/05/2010
Office 2010Development Tools
Visual     SharePointStudio      DesignerInfoPath    Access
• Office Customizations   • SharePoint Solutions  – Rich Deployment         – Integrated  – C# 4.0 Programming      – Exte...
• Business Connectivity  Services Model  Authoring• Workflow Authoring• SharePoint Focused UI• Reusable Content• Export to...
Simple SharePoint List    SharePoint Workflow        Custom SharePoint       Solutions               Applications         ...
DevelopingOffice 2010
Client                                Server• Surfacing            • Access document   • Automate        • Word, Excel,  c...
Ribbons and                 Outlook Form   Backstage                Task PanesContext Menus                  Regions      ...
File Container                   Document       Open XML SDK 2.0                   Properties                   Comments  ...
Word              Excel               Access          Visio• Conversions     •   Calculations    • Publish to    • JavaScr...
Business Analyst            Professional Developer  Power User    Visio                                Visual StudioShareP...
Status     Chart Web   Performance                                          Excel Services   BI Search   Visio ServicesInd...
Office 2010UI Customization
<customUI ...>   <ribbon> ... </ribbon>   <contextMenus>      <contextMenuidMso=“ContextMenuCell">         <button id="But...
Group   Column   TabFastCommand
<customUI ...>   <ribbon> ... </ribbon>   <backstage> ... </backstage>   <contextMenus> ... </contextMenus></customUI>
private void ThisAddIn_Startup (…){ImagePaneip = new ImagePane();Microsoft.Office.Tools.CustomTaskPane pane =this.CustomTa...
Office 2010Client Workflow
• SharePoint Designer or Visual Studio 2010  – SPD targeted to Power Users  – Visual Studio targeted to Developers  – Inte...
• Each tool plays a specific role  – Visio allows business analyst to define process  – SPD allows power users to implemen...
• Special SharePoint Workflow Template  – Contains shapes for conditions and actions  – Allows exporting of process to SPD
• New workflows are attached to a container  – List Workflows are attached to a specific list  – Reusable Workflows are no...
• SharePoint 2010 Project Types for Workflow  – Import Reusable Workflow  – Sequential Workflow  – State Machine Workflow
BusinessConnectivity Services
Office Client                                SharePoint Server 2010     External Business Parts                           ...
Describes the schema and data                            access capabilities of an externalOffice Clients (Rich)       dat...
Advanced             Simple                       SharePoint                         Designer  Power User /               ...
Office 2010Open XML
•   System.IO.PackagingAPIs    •        •        •            Open XML SDK            PHPExcel            Open XML 4J     ...
string relationshipType = "http://schemas.openxmlformats.org/...";using (Package package = Package.Open("mydocument.docx")...
using (WordprocessingDocument document =WordprocessingDocument.Open(“mydocument.docx”)){MainDocumentPartmainPart = documen...
Office 2010Services
Open XML SDK        Word ServicesEditing document       Rendering      content      document content
string serviceAppName = "Word Conversion Service Application";ConversionJobSettings settings = new ConversionJobSettings()...
•   JavaScript Object model•   REST API•   Chart Web Part data provider•   Visio data provider
• Integrate with Excel Web Access• Read / write depending on EWA    var ewa;    function initialize()    {      ewa = new ...
• Read Access to Excel datahttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/modelhttp://example.com/_vti_bin/...
• Access Databases Published  to SharePoint  – Not just saving an .accdb to    a document library• Translation to SharePoi...
InfoPath 2010Form Services
• Build powerful enterprise applications  quickly and easily on SharePoint
• InfoPath 2010 provides design services• Layout  – Themes  – Table Layout• Behavior  – Rules  – Custom Code• Data  – Bind...
• Renders InfoPath forms in the browser  – Better performance in SharePoint 2010  – Managed via Central Admin or PowerShel...
• InfoPath is a tool for creating rich web parts  – Exposes or receives data via connections  – Ex. Host submission form o...
• Accessible with a single click in SharePoint
• Performed from within InfoPath  – Accessed in Backstage
InfoPath Form Form           CustomDefinitio        Code   n                     Visual Studio Tools                      ...
Office 2010 Programming
Office 2010 Programming
Office 2010 Programming
Office 2010 Programming
Office 2010 Programming
Office 2010 Programming
Upcoming SlideShare
Loading in...5
×

Office 2010 Programming

762

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
762
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • UDF: User definition functions
  • Transcript of "Office 2010 Programming"

    1. 1. Programmin gHanoi, 24/05/2010
    2. 2. Office 2010Development Tools
    3. 3. Visual SharePointStudio DesignerInfoPath Access
    4. 4. • Office Customizations • SharePoint Solutions – Rich Deployment – Integrated – C# 4.0 Programming – Extensible
    5. 5. • Business Connectivity Services Model Authoring• Workflow Authoring• SharePoint Focused UI• Reusable Content• Export to Visual Studio
    6. 6. Simple SharePoint List SharePoint Workflow Custom SharePoint Solutions Applications Applications• Work both online / • Business Connectivity • InfoPath Web Part offline Services • XmlFormView • Sandboxed Solutions
    7. 7. DevelopingOffice 2010
    8. 8. Client Server• Surfacing • Access document • Automate • Word, Excel, customizations content document Access Services • Modify processes • Workflow document • BI contentUI Object Office Open XMLExtensions model Services
    9. 9. Ribbons and Outlook Form Backstage Task PanesContext Menus Regions View
    10. 10. File Container Document Open XML SDK 2.0 Properties Comments Content Level Markup Styles Package Level Images, sound, Packaging video Schemas API Embedded code Custom XML
    11. 11. Word Excel Access Visio• Conversions • Calculations • Publish to • JavaScript OM• Field Updates • UDFs SharePoint • REST • UI Macros • JavaScript OM • Data Macros • Web Services
    12. 12. Business Analyst Professional Developer Power User Visio Visual StudioSharePoint Designer SharePoint
    13. 13. Status Chart Web Performance Excel Services BI Search Visio ServicesIndicators Parts Point Services
    14. 14. Office 2010UI Customization
    15. 15. <customUI ...> <ribbon> ... </ribbon> <contextMenus> <contextMenuidMso=“ContextMenuCell"> <button id="ButtonRefresh” .../> </contextMenu> </contextMenus></customUI>
    16. 16. Group Column TabFastCommand
    17. 17. <customUI ...> <ribbon> ... </ribbon> <backstage> ... </backstage> <contextMenus> ... </contextMenus></customUI>
    18. 18. private void ThisAddIn_Startup (…){ImagePaneip = new ImagePane();Microsoft.Office.Tools.CustomTaskPane pane =this.CustomTaskPanes.Add(ip, "Images");pane.Visible = true;}
    19. 19. Office 2010Client Workflow
    20. 20. • SharePoint Designer or Visual Studio 2010 – SPD targeted to Power Users – Visual Studio targeted to Developers – Integration allows users to work together SharePoint Designer Visual Studio 2010 2010
    21. 21. • Each tool plays a specific role – Visio allows business analyst to define process – SPD allows power users to implement process• Round Trip Import/Export Visio 2010 SharePoint Designer 2010
    22. 22. • Special SharePoint Workflow Template – Contains shapes for conditions and actions – Allows exporting of process to SPD
    23. 23. • New workflows are attached to a container – List Workflows are attached to a specific list – Reusable Workflows are not attached to a list • May be constrained to a content type • Attached later using browser – Site Workflows are attached to the current site
    24. 24. • SharePoint 2010 Project Types for Workflow – Import Reusable Workflow – Sequential Workflow – State Machine Workflow
    25. 25. BusinessConnectivity Services
    26. 26. Office Client SharePoint Server 2010 External Business Parts SharePoint Site Custom Code VSTO External Custom Code Package List Office Integration Search, Workflow, Web PartsBusiness Connectivity Services Secure Store Service (SSS) Business Connectivity Services Client Runtime Cache External Content Types Server (ECT) Runtime SQL WCF Custom .NET Connector External Data
    27. 27. Describes the schema and data access capabilities of an externalOffice Clients (Rich) data source and its behavior within Office and SharePoint BCS *formerly known as BDC Entity External Data External Source Content Type (Web Service, DB, .Net (ECT) object, LOB system, Web 2.0 service, etc.) BCS BCS-enabled solutions rely on ECTs to integrate external data into SharePoint SharePoint (Thin) and the Office client applications
    28. 28. Advanced Simple SharePoint Designer Power User / No code RAD Dev Advanced Dev Custom Code• OOB UX on thin and rich clients • Custom UX and data integration on (Outlook and Groove) based on thin and rich clients (apps that External Lists support VS Office add-ins) • Custom Forms in SharePoint and • Through Office, SharePoint and BCS Groove Object Models• Connect to existing back-end • Custom back-end connectivity integration services or simple through .Net objects databases • Complex BDC models (many • Simple BDC Models (few ECTs, simple ECTs, complex associations) associations)• Transparent packaging (managed by • Explicit packaging (managed by dev) BCS)
    29. 29. Office 2010Open XML
    30. 30. • System.IO.PackagingAPIs • • • Open XML SDK PHPExcel Open XML 4J • File Format ConvertersTools • Open XML SDK • Open XML Power Tools • Package Explorer • Content Control Toolkit
    31. 31. string relationshipType = "http://schemas.openxmlformats.org/...";using (Package package = Package.Open("mydocument.docx")){PackageRelationship relationship = null;foreach (PackageRelationshipsearchRelation inpackage.GetRelationshipsByType(relationshipType)) { relationship = searchRelation; break; } Uri partUri = PackUriHelper.ResolvePartUri(relationship.SourceUri, relationship.TargetUri);PackagePartmainPart = package.GetPart(partUri); // Do something with mainPart}
    32. 32. using (WordprocessingDocument document =WordprocessingDocument.Open(“mydocument.docx”)){MainDocumentPartmainPart = document.MainPart; // Do something with mainPart}
    33. 33. Office 2010Services
    34. 34. Open XML SDK Word ServicesEditing document Rendering content document content
    35. 35. string serviceAppName = "Word Conversion Service Application";ConversionJobSettings settings = new ConversionJobSettings(){OutputFormat = SaveFormat.XPS};ConversionJob job = new ConversionJob(serviceAppName, settings);job.AddFile("http://contoso.com/documents/source.docx", "http://contoso.com/documents/destination.xps");job.Start(); // starts asynchronous AddFile AddFolder AddList• String • SPFolder • SPList• String • SPFolder • SPList • Recurse • Recurse
    36. 36. • JavaScript Object model• REST API• Chart Web Part data provider• Visio data provider
    37. 37. • Integrate with Excel Web Access• Read / write depending on EWA var ewa; function initialize() { ewa = new Ewa.EwaControl("ewa"); ewa.openWorkbookAsync("http://server/mywb.xlsx", Ewa.SessionMode.View, "salesreps", onWorkbookLoaded); } function onWorkbookLoaded(result) { if (!result.succeeded) { alert("Error"); return; } // hook up to events that were interested in workbook = ewa.get_activeWorkbook(); ... }
    38. 38. • Read Access to Excel datahttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/modelhttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/model/Rangeshttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/model/Chartshttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/model/Charts(Chart 1)• Set values on named ranges• Expose data as – ATOM – HTML – Image
    39. 39. • Access Databases Published to SharePoint – Not just saving an .accdb to a document library• Translation to SharePoint technologies – Tables  Lists – Queries, Reports, Forms  Web equivalent• Synchronized changes between rich client and SharePoint
    40. 40. InfoPath 2010Form Services
    41. 41. • Build powerful enterprise applications quickly and easily on SharePoint
    42. 42. • InfoPath 2010 provides design services• Layout – Themes – Table Layout• Behavior – Rules – Custom Code• Data – Binding – External Data
    43. 43. • Renders InfoPath forms in the browser – Better performance in SharePoint 2010 – Managed via Central Admin or PowerShell – Accessibility - WCAG 2.0 AA – XHTML 1.0 and strict CSS
    44. 44. • InfoPath is a tool for creating rich web parts – Exposes or receives data via connections – Ex. Host submission form on main portal page
    45. 45. • Accessible with a single click in SharePoint
    46. 46. • Performed from within InfoPath – Accessed in Backstage
    47. 47. InfoPath Form Form CustomDefinitio Code n Visual Studio Tools for Applications

    ×