• Save
Office 2010 Programming
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Office 2010 Programming

on

  • 1,079 views

 

Statistics

Views

Total Views
1,079
Views on SlideShare
1,079
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • UDF: User definition functions

Office 2010 Programming Presentation Transcript

  • 1. Programmin gHanoi, 24/05/2010
  • 2. Office 2010Development Tools
  • 3. Visual SharePointStudio DesignerInfoPath Access
  • 4. • Office Customizations • SharePoint Solutions – Rich Deployment – Integrated – C# 4.0 Programming – Extensible
  • 5. • Business Connectivity Services Model Authoring• Workflow Authoring• SharePoint Focused UI• Reusable Content• Export to Visual Studio
  • 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. DevelopingOffice 2010
  • 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. Ribbons and Outlook Form Backstage Task PanesContext Menus Regions View
  • 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. Word Excel Access Visio• Conversions • Calculations • Publish to • JavaScript OM• Field Updates • UDFs SharePoint • REST • UI Macros • JavaScript OM • Data Macros • Web Services
  • 12. Business Analyst Professional Developer Power User Visio Visual StudioSharePoint Designer SharePoint
  • 13. Status Chart Web Performance Excel Services BI Search Visio ServicesIndicators Parts Point Services
  • 14. Office 2010UI Customization
  • 15. <customUI ...> <ribbon> ... </ribbon> <contextMenus> <contextMenuidMso=“ContextMenuCell"> <button id="ButtonRefresh” .../> </contextMenu> </contextMenus></customUI>
  • 16. Group Column TabFastCommand
  • 17. <customUI ...> <ribbon> ... </ribbon> <backstage> ... </backstage> <contextMenus> ... </contextMenus></customUI>
  • 18. private void ThisAddIn_Startup (…){ImagePaneip = new ImagePane();Microsoft.Office.Tools.CustomTaskPane pane =this.CustomTaskPanes.Add(ip, "Images");pane.Visible = true;}
  • 19. Office 2010Client Workflow
  • 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. • 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. • Special SharePoint Workflow Template – Contains shapes for conditions and actions – Allows exporting of process to SPD
  • 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. • SharePoint 2010 Project Types for Workflow – Import Reusable Workflow – Sequential Workflow – State Machine Workflow
  • 25. BusinessConnectivity Services
  • 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. 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. 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. Office 2010Open XML
  • 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. 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. using (WordprocessingDocument document =WordprocessingDocument.Open(“mydocument.docx”)){MainDocumentPartmainPart = document.MainPart; // Do something with mainPart}
  • 33. Office 2010Services
  • 34. Open XML SDK Word ServicesEditing document Rendering content document content
  • 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. • JavaScript Object model• REST API• Chart Web Part data provider• Visio data provider
  • 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. • 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. • 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. InfoPath 2010Form Services
  • 41. • Build powerful enterprise applications quickly and easily on SharePoint
  • 42. • InfoPath 2010 provides design services• Layout – Themes – Table Layout• Behavior – Rules – Custom Code• Data – Binding – External Data
  • 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. • InfoPath is a tool for creating rich web parts – Exposes or receives data via connections – Ex. Host submission form on main portal page
  • 45. • Accessible with a single click in SharePoint
  • 46. • Performed from within InfoPath – Accessed in Backstage
  • 47. InfoPath Form Form CustomDefinitio Code n Visual Studio Tools for Applications