Managed Code, Data and Microsoft Office

Slides:



Advertisements
Similar presentations
Connecting Web Services to Microsoft Office Applications: An Introduction to Information Bridge Framework Darren Neimke Senior Consultant Readify Limited.
Advertisements

Microsoft Office SharePoint Portal Server 2007 Introduction to InfoPath Forms Services Daryl L. Rudolph.
Microsoft SharePoint 2010 technology for Developers
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
What’s New for Smart Client Developers in Visual Studio 2005? Mike Pelton Systems Engineer Microsoft Ltd
What’s New for Smart Client Developers in Visual Studio 2005? Mike Pelton Systems Engineer Microsoft Ltd
Quickbix Documents Suite
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Managing Employee Earnings Statements: PAYSTUB 3.0 A centralized, intranet-based application used to view employee earnings statements online Published:
Microsoft Office Open XML Formats Brian Jones Lead Program Manager Microsoft Corporation.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
It’s always better live. MSDN Events Developer Productivity Improvements with Visual Studio 2008 and Office Business Applications.
Live Meeting APIs Robert Devine Program Manager Microsoft Corporation.
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
WSS 3.0 Architecture and Enhancements Ashvini Shahane Member – Synergetics Research Lab.
OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager.
Creating Business Workflow Using SharePoint Designer 2007 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft SQL Server.
Microsoft Confidential Office as a Development Platform Tim Heuer
Using the Actions Pane, Host Controls, and Smart Tags
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
Microsoft Office InfoPath 2007 Development, Deployment, And Hosting For Rich And Browser Forms Jessica Gruber Consultant Microsoft Corporation.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
AUTOMATION OF WEB-FORM CREATION - KINNERA ANGADI – MS FINAL DEFENSE GUIDANCE BY – DR. DANIEL ANDRESEN.
OFC 308 Advanced Word XML: The WordML Schema and Bringing Everything Together Brian Jones Program Manager Authoring Services.
Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.
Solutions using Microsoft Content Management Server 2002 Connector for SharePoint Technologies Sue Corke Mark Harrison Microsoft UK.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
Configuring and Deploying Web Applications Lesson 7.
Arun Prakash Ganesan Development Lead Microsoft Corporation Office 2007 for Developers.
The Office Development Platform & Visual Studio Tools for Office Mike Hernandez Product Manager Microsoft Corporation Steven Goulet Group Program Manager.
Institute for the Protection and Security of the Citizen HAZAS – Hazard Assessment ECCAIRS Technical Course Provided by the Joint Research Centre - Ispra.
The 2007 Microsoft Office System Servers Enterprise Content Management, Workflow and Forms Martin Parry Developer and Platform Group, Microsoft Ltd
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
ASP.NET Architecture Mike Taulty Developer & Platform Group Microsoft Ltd
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
The Holmes Platform and Applications
Office 365 Development July 2014.
Introduction ITEC 420.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
Integrating SharePoint 2010 with Office 2010
5/20/2018 2:53 AM © 2006 Microsoft Corporation. All rights reserved.
Integrating Enterprise Applications Into SharePoint® Portal Server
Remote Event Receivers
Beyond the BDC\BCS Model
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Business Connectivity Services in SharePoint 2010 and Office 2010
Visual Studio Tools for Office 2005
Accessing and Surfacing LOB Data in SharePoint 2010
Enterprise Library Overview
2007 Office System Integration
Microsoft Dynamics.
RMS with Microsoft SharePoint
Overview of Visual Studio 2005 Tools for the Microsoft Office System
ASP.NET 4.0 State Management Improvements – Deep Dive
LitwareHR v2: an S+S reference application
Visual Studio 2005 Tools For Office: Creating A Multi-tier Application
Visual Studio 2010 SharePoint Development Tools Overview
Tutorial 7 – Integrating Access With the Web and With Other Programs
Microsoft Office System UK Developers Conference
The Social Life of Information
敦群數位科技有限公司(vanGene Digital Inc.) 游家德(Jade Yu.)
Windows Forms in Visual Studio 2005: An in-depth look at key features
SharePoint 2007 Developer Overview Collaboration BI Features
Windows Forms in Visual Studio 2005: An Overview
Mark Quirk Head of Technology Developer & Platform Group
Developer & Platform Group, Microsoft Ltd
Contexualized Data In Document Authoring
Presentation transcript:

Managed Code, Data and Microsoft Office Mike Pelton mpelton@microsoft.com Developer & Platform Group Microsoft Ltd.

General Information Work Flow assistive core content Storage Server process Storage Server process XML, data or documents Server Processing Create document Pre-populate template Search / extract Office programs Create content Analyze/review information Process documents Post-Office Processing Business workflow Collaborative work Publish/distribute/archive Microsoft Office 2003 Development Technologies XML VSTO v2005 data island Server-side Processing Web services IBF Research services ADO.NET Web queries Information Access Office U.I. Custom controls / U.I. Smart tags Smart documents XML schema Data binding Object models Research task pane Doc. actions task pane User Interaction Base Programmability XML Documents Data Post-Office Processing

Information Bridge Framework Smart Clients Web Service-based architecture (SOA) Centralized metadata/UI server Runtime for smart tag / XML event initiation Windows Forms and task pane support Web Services Metadata Finance ERP Web Services CRM

Information Bridge Architecture Development Only Office Application (Word, Excel, Outlook) Information Bridge Runtime (Office add-in) Task Pane Manager Office Integration U.I. Rendering Visual Studio Metadata Cache User Control Designer Attached Schema Smart Tag Metadata Designer U.I. (WinForm, XSLT) (SOAP) Metadata Service Metadata Database Client Server Web Service Optional: Information Bridge Compliant CRM Customer Information Invoices SAP Legacy Application Aggregation Service Orders Web services

Document Data Island Overview of the Data Island Stores program data in the document Why cache data in the document? Available when client is offline Accessible to a server process Store configuration info Data caching support in Visual Studio Tools for Office Fields marked with Cached attribute Types can implement ICachedType to provide custom serialization ServerDocument class accesses cache without Microsoft Word or Microsoft Excel The data cache is a new feature for Word and Excel that allows program data to be stored in the document independent of the actual document itself. There are a number of reasons to store data in the document. Because the data is able to persist between document runs, the cached data can be used when the client is offline. When online, the data can be retrieved and updated as necessary, and when offline the last data cached is still available. Also, the data in the document is accessible from outside of Word and Excel. A server-based solution can open the document and manipulate the cached data to add, update, or view information. Finally, because a document has no external configuration file to hold settings, the data cache can serve to keep this information associated in a readily available manner. VSTO 2005 supports data caching in a number of ways. A new attribute, CachedAttribute, is used to mark any fields in the assembly classes that should be cached in the document. For types that require custom serialization capabilities, the ICachedType interface can be implemented so it can be cached. Finally, the CustomizedDocument class is available without the need to host Word or Excel.

Document Data Island Example of Caching Data [Cached()] CustomerDataSet customerDataSet; void ThisDocument_Initialize(…) { if (customerDataSet == null) customerDataSet = new CustomerDataSet(); dataAdapter.Fill(customerDataSet); } list1.DataSource = customerDataSet; [Build 0]In this example, the _dsCustomer field is marked with the CachedAttribute. This means that its contents will be saved when the document is saved, and loaded when the document is loaded. Notice that the field is not initialized with a null or object reference. Doing so would negate the effect of the cache by always setting the field to that value. [Build 1]The ThisDocument_Initialize method is called when the document is first getting set up. This is the entry point and the most appropriate location for checking cached values. [Build 2] The first check is to see if the cached value has been set. If not, then this is likely the first time the document has been run. If that is the case, the application initializes the dataset and fills it with data. [Build 3] Once the cached value is ready (either due to being set previously or in this run), the dataset is used as the data source for a list box.

Document Data Island Using the Data Island Visual Studio Tools for Office provides the ability to cache data within documents Enables new server scenarios Pre-populates or extracts data, without having to program XML Excel or Word not instantiated Enables offline usage Uses cached lookup tables Requires no hidden sheets There are a number of benefits to having a cache for program data with the document. Documents can take advantage of live data that is stored with the document to create real-world applications. The data cache is also accessible from outside of the document. This can be used to enable server-side scenarios difficult or impossible to achieve previously. It is now possible to add data to the document or to extract data from the document without user intervention. A document could be pre-loaded with data before delivering it to a user, and data could be then extracted after the user interaction. Interacting with the data cache does not require Excel or Word to be launched or even installed. New managed classes enable working with the documents from a purely object-based approach.

Document Data Island Requesting Data from a Server ASPX page Data Island This diagram illustrates a client requesting a document-based resource from a server. [BUILD 0] When the server receives the request for the document, the server code connects to the appropriate database to retrieve data that will be needed by the document’s associated assembly. This data is then stored directly inside the document to be available to the managed code at runtime. [BUILD 1] The server code then streams out the document object back to the client. The stream contains the entire document with a pre-populated data island that contains the custom data. User data Server-side code can pre-populate elements before sending to client

Document Data Island Sending Data Back to a Server ASPX page Updated Data Cache Updated data [BUILD 0] This diagram demonstrates a document being sent back to the server after being manipulated by the client. All interaction with the document occurred through Word or Excel as a natural document-based program user interface. [BUILD 1] When the document is saved, the cached data is saved in the same file, creating one unit. [BUILD 2] The user then accesses a page on a Web site to upload the document. [BUILD 3] With no reliance on Word or Excel, the server code is able to open the document and access the data cache. From there data is saved to the appropriate database. A VSTO 2005 enabled document is posted to a server, data is extracted, and sent to corporate data sources

Document Data Cache Using the ServerDocument class private void GetData() { string user = Request.ServerVariables("AUTH_USER"); ExpensesDataset dsExpenses = new ExpensesDataset(); ExpensesDataAdapter.Fill(dsExpenses, user); ServerDocument doc = new ServerDocument("expenses.xls"); CachedDataItem cdi = doc.CachedDataManifest.Views ["ExpensesWorksheet"].CachedData["Expenses"]; cdi.SerializeDataInstance(dsExpenses); doc.Save(); doc.Close(); Response.Write(doc); } The server code manipulates the document using the CustomizedDocument class. In this example, an existing document is modified by adding a dataset to its cache. The CustomizedDocument class is instantiated with an existing document. Once created, the individual cache items can be extracted using the CachedDataManifest property. This references one or more views contained in the document. By default, Microsoft Word documents contain one view, ThisDocument. Excel documents contain named views for each worksheet: Sheet1, Sheet2, etc. These view names can be changed when the document is authored. Within the view, each data item is referenced using the CachedData property and the data item’s name. This name is based on the variable name of the field as declared in the code for the document’s assembly. Once a reference to the data item is obtained, the contents can be accessed or modified. In this example, the SerializeDataInstance method serializes the dsExpenses object and stores the bytes in the document’s data cache. An alternative to serializing the data in this manner is to directly encode the data as XML and use the XML property of CachedData to set it. The document is then saved and closed, then written back to the client.

All the books you’ll ever need: Microsoft .NET Development for Microsoft Office By Andrew Whitechapel

The slides for this event will be posted at: www.microsoft.com/uk/msdn/postevents

Get the latest technology previews, trial software, special offers Get information tailored to your needs Pick your RSS feeds Sign up for MSDN Connection at: http://www.microsoft.com/uk/msdn

Smartclient competition http://www.microsoftsmartcar.com It’s a Road Trip! http://www.microsoft.com/uk/msdn/roadtrip

Additional Information Office Site http://www.microsoft.com/office The UK MSDN Site & Flash Local news, events, webcasts http://www.microsoft.com/uk/msdn Register to receive the bi-weekly MSDN Flash by email http://www.microsoft.com/uk/msdn/flash.aspx Try Visual Studio http://www.microsoft.com/vstudio/tryit Take a look at the Express products http://msdn.microsoft.com/express GotDotNet and ASP.NET – lots of excellent resources http://www.gotdotnet.com http://www.asp.net

© 2003 Microsoft Limited. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.