Integration in Office 2003 Visual Studio Tools für Office 2.0 Jens Häupel .NET Technologieberater Developer Platform & Strategy Group Microsoft Deutschland GmbH http://blogs.msdn.com/jensha
Zu viele Frontends SAP Siebel Any CRM Speziallösungen Adressverwaltungen SAP Siebel Any ERP Microsoft CRM SQL Server
Office-Integration hat Vorteile Rad nicht neu erfinden Schnellere Entwicklung Viele kennen es gut genug Keine teure Einarbeitungszeit Oft nicht alle Funktionen des speziellen Frontends benötigt One-stop shopping Kein Screen Hopping 'Smarte Dokumente' Wieso also nicht?
Visual Studio Tools für Office 2.0
Integration in Visual Studio
Integration in Visual Studio View Controls per Drag&Drop aus der Toolbox Kaskadierte Office Menus Word und Excel als Designer Property Window Support The next demonstration demonstrates several of the features that are available within Visual Studio, as illustrated in this slide.
Integration in Visual Studio Höhere Produktivität durch IDE Integration Vorteile von Managed Code gemeinsame Klassenbibliotheken für alle Sprachen Kompatibles Typsystem Gemeinsame Laufzeitumgebung Code Access Security Code-Vererbung (auch zw. Sprachen) …
Erweiterung mit ViewControls Erweiterungen von vorhandenen Excel-bzw. Word-Objekten Bookmark, NamedRange, ListObject, XmlMappedRange, Chart Control Properties und Events The end of scanning the entire workbook!
Erweiterung mit .NET Controls Word / Excel als Host für Managed Controls Komplettes Eventing Databinding BindingSource TableAdapter DataSet BindingNavigator Wrapper-Objekt wird automatisch generiert
Databinding mit View Controls
Die ActionsPane Anpaßbarer Bereich mit vielfältigen Möglichkeiten Vieles out-of-the-box Shared Workspace XML Source Research Pane … VSTO bietet.NET Code Modell für die Aufgabenleiste Managed Controls End users of Microsoft Office XP and Office 2003 are familiar with the task pane. If you haven’t seen the task pane before, you can select Task Pane from the View menu in any Office XP or Office 2003 application, and you will see it. End users are probably familiar with the task pane from defining formats or formatting styles in Microsoft Word or from animating slides in Microsoft PowerPoint®. These tasks are performed through the task pane. The task pane made its debut in Office XP and provided an integrated model for providing context-specific information within the document workspace. Since its debut, many Office-solution developers have wanted to create their own versions of the task pane to use as part of their Office solutions. However, there was no application programming interface (API) in Office XP for extending the task pane. Starting with Office 2003, you can create such an extension by using the Document Actions task pane. The Document Actions task pane is specifically for document-specific customizations. VSTO 2005 provides programmatic access to the Office Document Actions task pane. The ActionsPane provides a container in which you can include one or more full-featured mini–user interfaces that are made up of user controls. What this gives you is the ability to incorporate managed .NET code and full WinForm functionality into a Microsoft Word 2003 or Microsoft Excel 2003 document. This presentation will discuss user controls in detail a little later on. One of the great benefits is that a .NET developer doesn’t have to also be an Office developer to take advantage of the Document Actions task pane and all its many features.
Die ActionsPane Basiert auf Windows Forms Designer-Unterstützung Container für Custom User Controls ISmartDocument nicht nötig Kein XML Schema Mapping erforderlich Interaktion mit View Controls und/oder Objektmodell End users of Microsoft Office XP and Office 2003 are familiar with the task pane. If you haven’t seen the task pane before, you can select Task Pane from the View menu in any Office XP or Office 2003 application, and you will see it. End users are probably familiar with the task pane from defining formats or formatting styles in Microsoft Word or from animating slides in Microsoft PowerPoint®. These tasks are performed through the task pane. The task pane made its debut in Office XP and provided an integrated model for providing context-specific information within the document workspace. Since its debut, many Office-solution developers have wanted to create their own versions of the task pane to use as part of their Office solutions. However, there was no application programming interface (API) in Office XP for extending the task pane. Starting with Office 2003, you can create such an extension by using the Document Actions task pane. The Document Actions task pane is specifically for document-specific customizations. VSTO 2005 provides programmatic access to the Office Document Actions task pane. The ActionsPane provides a container in which you can include one or more full-featured mini–user interfaces that are made up of user controls. What this gives you is the ability to incorporate managed .NET code and full WinForm functionality into a Microsoft Word 2003 or Microsoft Excel 2003 document. This presentation will discuss user controls in detail a little later on. One of the great benefits is that a .NET developer doesn’t have to also be an Office developer to take advantage of the Document Actions task pane and all its many features.
Integration in die ActionsPane Rechnungsüberprüfung Verwendete Technologien Microsoft Excel XML Web service – Datentransfer vom/zum Server SQL Server – Speichert Rechnungsdaten Beispiel für ActionsPane Angepaßtes Menü Datengebundene Drop- Down-Liste Real-Time Daten In this scenario, the accounting department for your company needs access to real-time invoicing data. This data is made available through an XML Web service that is connected to a corporate SQL Server database. Your accounting department needs to manage this information from within an Excel application. On the right of the slide, you can see an example Actions pane that could be used in this situation. As you can see, the menu allows the end user to create new invoices and to edit, delete, or view existing invoices. Below the main menu, the end user can select a specific invoice to retrieve. After an invoice is requested, it will be displayed in the Excel spreadsheet that is located adjacent to the Actions pane.
User Controls in der ActionsPane
SmartTags in VSTO
SmartTags in VSTO Sehr einfaches und intuitives Interface Kaspelt die COM-Interfaces ISMartTagAction bzw. ISmartTagRecognizer Für spezifische Dokumente Aggressivere Erkennungsmechanismen möglich Für Dokumente, die auf einer bestimmten Vorlage basieren Allgemeinere Erkennung, Gruppierung
VSTO 2.0 - Smart Tags
Office-Dokumente und Server Was ist, wenn ein Server-Prozeß ein Office-Dokument erzeugen/verändern muß? Office ist eine Client-Anwendung! Account hat möglicherweise keinen Desktop Vor dem Server sitzt keiner! WordProcessingML / SpreadsheetML Erweiterung von XML Voll formatierte Dokumente Oder …
Data Islands Office-Dokumente können nun sog. "Dateninseln" enthalten Speicherort für XML Daten im Office-Dokument Extra-Stream im OLE Structured Storage Zugriff darauf ohne Office-Instanz ! Einfache Erzeugung durch Cached()-Attribut bzw. CacheInDocument Property
Data Islands - Einsatzgebiete Erlaubt automatisierte serverseitige Verarbeitung der Daten z.B. für Konfigurations-Infos bzw. in Offline-Szenarien Client-Server-Szenario Synchronisierung, wenn online Personalisierte Vorbelegung von Daten beim Öffnen von Dateien
Funktionsweise Server Client URL Request Server Code CreateExpense.aspx URL Request Server Code Databases Corporate Systems Bill's Daten
Funktionsweise Server Client Server Code CreateExpense.aspx Corporate Bill's Daten Databases Corporate Systems Bill's Daten
Funktionsweise Server Client Server Code CreateExpense.aspx Corporate Bill's Daten Bill's Daten Databases Corporate Systems Bill's Daten
Funktionsweise Server Client Server Code CreateExpense.aspx Corporate Bill's Daten Databases Corporate Systems Bill's Daten
Funktionsweise Server Client Server Code CreateExpense.aspx Corporate Bill's aktualisierte Daten Databases Corporate Systems Bill's Daten
Funktionsweise Server Client Server Code CreateExpense.aspx Corporate Bill's aktualisierte Daten Bill's aktualisierte Daten Databases Corporate Systems Bill's Daten
Funktionsweise Server Client Server Code CreateExpense.aspx Corporate Bill's aktualisierte Daten Databases Corporate Systems Bill's Daten
Funktionsweise Server Client Server Code CreateExpense.aspx Corporate Bill's aktualisierte Daten Databases Corporate Systems Bill's aktualisierte Daten
Komplexere Daten Auch Datasets passen auf die Insel Datasets sind einfach (de)serialisierbar ds.ReadXmlSchema() ds.ReadXml(), ds.WriteXml() CacheInDocument Property Instanz muß Public sein
Outlook-Integration Chancen und Möglichkeiten Viele Benutzer “leben” in Outlook eMails / Aufgaben oft integraler Bestandteil von typischen Business-Prozessen bzw. Document Workflows Wunsch nach einem Front-End für viele Back-End-Systeme Weniger Training und erweiterte Möglichkeiten wg. bekanntem Office UI “natürliche” Abläufe
Mögliche VSTO Outlook Szenarien Line of Business Anwendungen ERP, CRM, etc. Collaboration & Workflow Lösungen Reisekosten, Business Travel Lösungen, etc. Digital Content Integration Zugriff auf Bibliotheksdaten Utilities & Tools Integration von mobilen Services Verfügbarkeit von Flügen direkt aus Kalender
Die VSTO Outlook Add-In Lösung Verwendet bestehende VSTO Runtime Services AppDomain Isolation Separate Security Configuration Disconnect Unload Manifest-basierte Updates Starkes Sicherheits-Modell Visual Studio Projektvorlage Snippets, Code Samples, Whitepapers
VSTO Add-In Architektur
Deployment von VSTO-Lösungen MSI Packages Assembly + Dokument werden lokal installiert Netzwerk-Deployment Assembly Deployment über FTP, UNC, HTTP, SharePoint Versionierte Assemblies Download in lokalen Cache (User Profile) Updates Zentral bereitgestellt vom Admin Automatisches Prüfen + Download bei Verwendung
Sicherheit .NET Code Access Security Ausführung in der Sandbox Basiert auf Pfad Hash Strong Name Digitale Signatur (Trusted Publisher Modell) Angewandt auf Assembly User muß nicht Admin sein, um VSTO-Lösungen verwenden zu können
Zusammenfassung VSTO 2.0 schafft vielfältige Integrations-möglichkeiten für Office Kein neues Tool, sondern Visual Studio Managed Controls und WinForms Designer Support Professioneller: Code-behind-Modell bedeutet Trennung von Logik und Oberfläche Adressiert den professionellen Entwickler Dokument-zentrisch (XL, WD) bzw. Aplikations-zentrisch (OL) Office als Host für Smart Client Solutions