developer productivity improvements with visual studio 2008 and office business applications

27
It’s always better live. MSDN Events Developer Productivity Improvements with Visual Studio 2008 and Office Business Applications

Upload: lynch

Post on 14-Feb-2016

34 views

Category:

Documents


0 download

DESCRIPTION

Developer Productivity Improvements with Visual Studio 2008 and Office Business Applications. What Will We cover?. Overview of Visual Studio Tools for Office (VSTO) Architecture New built in add-ins. Helpful Experience. Developing Visual Studio Applications - PowerPoint PPT Presentation

TRANSCRIPT

Developer Productivity Improvements with Visual Studio 2008 and Office Business Applications

Developer Productivity Improvements withVisual Studio 2008 and Office Business ApplicationsIts always better live. MSDN Events1Developer Productivity Improvements with Visual Studio 2008 and Office Business Applications

0

Hello and Welcome to this MSDN session on Developer Productivity Improvements with Visual Studio 2008 and Office Business Applications. My name is {insert name}

Let us start this session by going into more detail on exactly what we will be covering.

http://msdn.microsoft.comxxx-lzzWhat Will We cover?Overview of Visual Studio Tools for Office (VSTO)ArchitectureNew built in add-ins2Visual Studio 2008 introduces many new features that make developing for Office applications easier than ever. In this session were going to discuss many of these new features. First, well discuss the new Visual Studio Tools for office. Well take a quick look at the new architecture and how everything fits together. Then, well dive into some of the new built in add-ins that are part of Visual Studio 2008. These add-ins make developing Business Office Applications much simpler than previous versions, and streamline the entire development process.

As with most MSDN sessions, some prior experience of Microsoft technologies or similar technologies is always helpful, the next slide provides a brief overview of what would be helpful, but not essential, for this session.

http://msdn.microsoft.comxxx-lzzLevel 300Helpful ExperienceDeveloping Visual Studio ApplicationsMicrosoft Office and Office Business Applications3Helpful Experience

0

As we go through today's session you will hear various Microsoft acronyms and terminology, while we will explain all new terms related to today's session, there are some general terms from the industry or other versions of Microsoft products we may not spend time on. To help you out, we have listed out the areas that it maybe be helpful to be familiar with either prior to this session or to reference afterwards.

Past experience developing applications with Visual Studio, and more specifically developing Business Office Applications will be beneficial as we go through this session.

To cover the topics mentioned on the earlier slide and keep the session flow going, we have divided the session up into the following agenda.

http://msdn.microsoft.comxxx-lzzAgendaOffice As A Developer PlatformThe Results Gap with LOB AppsOffice Business ApplicationsVSTO OverviewSharePoint WorkFlow ToolsRibbon DevelopmentCustom Task PaneClickOnce Deployment4Agenda:

0

Were going to start out this session discussing Office as a developer platform that enables you to create applications that directly interact with content inside Microsoft Office documents.

Next, well take a look at whats called the Results Gap. The Results Gap has to do with the difficulty of accessing and integrating line-of-business systems and traditional data stores into Office applications.

Youll learn how Visual Studio 2008 bridges this gap, enabling developers to create Office Business Applications that integrate back end data into the entire range of Office applications that users are familiar and comfortable with.

Next, well go through a few of the new tools that are part of Visual Studio 2008. Youll see some ways in which you can utilize these tools to develop powerful, applications quickly and easily. The tools well look at are SharePoint Workflow tools, the Ribbon toolbar, the Custom Task Pane, and ClickOnce deployment.

http://msdn.microsoft.comxxx-lzzOffice as a Developer PlatformFamiliar user interface500+ million users worldwideOffice Open XML file formatsMicrosoft Office SharePoint Server 2007Enabling collaborationPortalsEnterprise searchEnterprise content managementBusiness process supportBI delivery platform

To begin with, we need to emphasize that Microsoft Office is a platform for developers. It provides a familiar, comfortable user interface to over 500 million users worldwide. With the introduction of the new Open XML file formats, developers can create applications that directly interact with content inside Microsoft Office documents.

Microsoft Office SharePoint Server 2007 (MOSS) provides a server backend to the Office client products, enabling collaboration, portals, enterprise search, enterprise content management, business process support and business intelligence.5http://msdn.microsoft.comxxx-lzzAgendaOffice As A Developer PlatformThe Results Gap with LOB AppsOffice Business ApplicationsVSTO OverviewSharePoint WorkFlow ToolsRibbon DevelopmentCustom Task PaneClickOnce Deployment6http://msdn.microsoft.comxxx-lzz

LOB Apps

The Results GapFor many years companies have invested in systems to store enterprise-critical data. Systems like SAP, SIEBEL, other type of line-of-business systems and traditional data stores are storing and making that data available in a very structured manner. And they do a very good job in this.

However, getting access to this data is often difficult for the many information workers within the company who are eager to use the business data in their daily work. This daily work is for the majority concentrated on unstructured, ad-hoc work in personal and team productivity environments such as the Microsoft Office 2007 clients and collaboration and document management platforms like Windows SharePoint Services and the Microsoft Office SharePoint Server 2007. This eagerness of integrating and working with that business data is often turning into frustration because of the difficult access to the data in the back-end systems. Very often dedicated training and skills are needed, something that is not always a possibility for many of the information workers. In many cases, the information workers also do not like to leave their familiar comfort zones to finish their work and do not want or are not capable of bridging the gap between their unstructured work environment and the structured world of the back-end systems.

Combine this with the growing need of businesses to become more agile and the need to provide information workers (the main assets to achieve this agileness) more and better access to this data, actually allowing them to bridge the results gap seamlessly is one fo the major concerns these days.7http://msdn.microsoft.comxxx-lzz

LOB Apps

OfficeBusinessApplications

In the past, many companies have invested in point-to-point applications that bridged the gap but very often these applications are too restrictive, too tightly coupled and for that reason often more a burden than an improvement. Very often, the complexity of these bridges is underestimated due to the complexity on either or both sides of the bridge.

The last years we have seen an effort to set up service-oriented architectures with the goal of approaching this problem in a more loosely-coupled way, based on declarative protocols such as XML and Web Services and thus allowing for more flexibility.

Office Business Applications follow that stream and built upon the SOA thinking. The main focus of OBA is to leverage the comfort zones of the information workers as containers where different components are glued together to result in a composite user interface where everyone of the components is responsible for a certain functionality (such as communicating to a CRM system and retrieving contact information). Microsoft has invested a lot in making the 2007 Microsoft Office System an excellent platform to leverage as this container infrastructure for composite business applications. And thats what you are are going to experience in the next three days.

Good examples of OBAs are Duet and the whole range of Dynamics products. Duet (http://www.duet.com/) is the joint project between Microsoft and SAP to build a solution that allows information workers to interact with select SAP business processes and data through Microsoft Office applications. Basically building a bridge between the Office System and SAP LOB systems. Microsoft Dynamics is another example where the Microsoft LOB systems like Microsoft CRM are hooked up with the world of the information workers.

Optionally point people to http://www.microsoft.com/dynamics/ and the many customer testimonials that are available over here

Many ISVs have already invested and have built great demonstrations of OBAs. Microsoft wants to push this further and make it easier for ISVs to jump on this extremely important bandwagon. The goal of OBA is to provide guidance in the form of reference applications, resources, training, guidance, templates, and support for building bridges for the results gap.

8http://msdn.microsoft.comxxx-lzzAgendaOffice As A Developer PlatformThe Results Gap with LOB AppsOffice Business ApplicationsVSTO OverviewSharePoint WorkFlow ToolsRibbon DevelopmentCustom Task PaneClickOnce Deployment9http://msdn.microsoft.comxxx-lzz

Estimate custom design

Unstructured

CreateLeadQualified?RetireLeadCreateOpptyCreateQuoteClosed?CompleteSaleCreate InvoiceGet specs from customerValidate specs with Tech SalesCost out the solutionDecide discount strategyAssemble proposed responseApprove proposed response

Structured

Classic Enterprise Applications

Office Business Applications

Estimate custom design

Unstructured

Office SharePoint Server

WordExcelOutlookInfoPathMany organizations know their classic enterprise business processes very well and many have automated these in a very efficient manner. However, there is in almost all cases an interaction between this structured world and the world of the information workers, the unstructured world. Because human beings are involved in many of the business processes. Human beings are there to input the data, validate and approved data, transform data into information and knowlege and collaborate on that data with other people (Gartner pointed us a few years ago to the fact that about 80% of all communication going on in companies is people-to-people communication).

That top layer is very complex and requires the identification of common patterns and a platform to be able to connect to the classic enterprise applications in a very flexible and loosely coupled-way. Today the platform is the 2007 Microsoft Office System and it has all of the capabilities to deliver composite business-oriented type of applications that are needed in the real world.10http://msdn.microsoft.comxxx-lzz

Visual Studio Tools for Office enables developers to leverage Visual Studio and the Microsoft Office platform to build scalable line-of-business solutions based on Microsoft Office.

Makes Office a valuable, first-class project type in Visual StudioEnables developers to create & extend Office Business ApplicationsEnables developers to leverage key Office UI features and support collaboration and workflow

11http://msdn.microsoft.comxxx-lzz

Document-level code behind Brings Microsoft Office into the managed world Strict security model Custom ActionsPane Host Controls on doc surface Cached Data in the document Server-side data processing App-level add-ins for OutlookVSTO 2008

New designers: ribbon, custom task pane, Outlook form regionApp-level add-ins for most client programsClickOnce deployment and securityVBA/VSTO interoperabilityWorkflow & Microsoft SharePoint supportVSTO integral part of Visual Studio 2008 Professional

VSTO 2005&VSTO 2005 SEVSTO 2003Visual Studio Tools for OfficeThis slide gives a little perspective on where Visual Studio Tools for Office for Visual Studio 2008 fits in. VSTO was originally introduced in 2003, and it supported only Excel 2003 and Word 2003, and only document-level code behind. It was the first foray into managed code running in Office, but it was fairly limited.

VSTO 2005 added support for InfoPath as well as application-level add-ins for Outlook. It also introduced support for the custom ActionsPane, but of course it was all geared towards Office 2003. VSTO 2005 Second Edition added support for Office 2007, including PowerPoint and Visio this time around. It was still a separate download from Visual Studio (in fact, it was a separate download from VSTO 2005 as well you needed both if you wanted to target both Office 2003 and Office 2007).

Although the landscape has been somewhat confusing, it becomes a lot clearer in Visual Studio 2008. First of all, VSTO is built-in to Visual Studio 2008 Professional so theres no need to download a separate package. Also, it provides out-of-the-box support for application- and document-level customizations for both Office 2003 and Office 2007. There is built in support for Windows Workflow and Microsoft SharePoint, and support for ClickOnce deployment.

VSTO in Visual Studio 2008 will enable you to:Target multiple versions of Office (2003 & 2007)Use graphical designers for Ribbon, Custom Task Panes, and Outlook form regions.Utilize ClickOnce for deployment Deployment is a huge improvement over previous versions, including a guarantee that Office 2007 solutions will not lock to a specific version of the .NET Framework, but rather use the most recent version.VSTO Orcas gives both Client development tools and Office Server developer tools, with graphic design wizards and a great deployment and security model!

12http://msdn.microsoft.comxxx-lzzOffice ApplicationsVisual Studio 2008 Professional includes Visual Studio Tools for OfficeVisual designers for Ribbon, Task & Action pane, SharePoint WorkflowIntegrated Workflow & Microsoft SharePoint SupportData binding in Word Content ControlsApplication-level add-ins for most client programs (both 2003 & 2007)Document-level add-ins for Excel & Word 2007Improved deployment and security using ClickOnce

Key points here VSTO is included automatically, but only in VS 2008 Professional and above.

There are visual designers for elements such as the fluent Ribbon, Custom Task Pane.

SharePoint and Workflow support means you can easily create custom workflows that interact with Office documents, and quickly deploy them to SharePoint sites.

Word content controls are individual controls that you can add and customize for use in templates, forms, and documents. For example, many online forms are designed with a drop-down list control that provides a restricted set of choices for the user of the form. Content controls can provide instructional text for users, and you can set controls to disappear when users type in their own text. In Visual Studio 2008, you get familiar .NET based databinding support for content controls.

VSTO facilitates creation of application-level add-ins for most Office applications for versions 2003 and 2007. It allows you to create document-level add-ins for Excel and Word 2007 and also provides improved deployment and security with ClickOnce Deployment.

Resourceshttp://blogs.msdn.com/nikhil/archive/2007/06/05/vsto-2008-beta-1-what-s-in-there.aspx13http://msdn.microsoft.comxxx-lzzAgendaOffice As A Developer PlatformThe Results Gap with LOB AppsOffice Business ApplicationsVSTO OverviewSharePoint WorkFlow ToolsCustom Task PaneRibbon DevelopmentClickOnce Deployment14Now that weve covered the background of Visual Studio Tools for Office, lets look at some of the things we can do with it. Well be going over four features today: SharePoint Workflow, Ribbon development, Custom Task Pane, and ClickOnce Deployment.http://msdn.microsoft.comxxx-lzzSharePoint Workflow ToolsWhat is a workflow?A reliable repeatable pattern of activity enabled by a systematic organization of resources and information flows E.g. Document approval processWorkflow Foundation (WF) integratedProgramming model, engine and tools to build workflow enabled applicationsConsists of a Microsoft .NET Framework v3.0 (formerly WinFX)The first feature of VSTO well go over are the SharePoint Workflow Tools. What exactly is a workflow. Wikipedia defines it well as a reliable repeatable pattern of activity enabled by a systematic organization of resources and information flows. A simple example of a workflow would be a document approval pipeline. In this scenario, a document created by an employee would need to be approved by the manager before being released to the public. When the employee checks in the document, the manager is tasked to approve it. On approval, the employee receives a notification and publishes the document. Once again, this is just a simple example and can be expanded to support a more complex scenario.

VSTO integrates the Windows Workflow Foundation. Workflow Foundation is the programming model, engine and tools for quickly building workflow enabled applications for Windows. Workflow Foundation provides a consistent and familiar development experience with other Microsoft .NET Framework 3.0 technologies such as ASP.NET, Windows Communication Foundation and Windows Presentation Foundation.15http://msdn.microsoft.comxxx-lzzSharePoint Workflow ToolsVSTO vs. SharePoint DesignerLimited reusabilityDevelop, deploy, and debug SharePoint workflowsSimple F5 Experience Focus on your business logic right away

Now that we know what a workflow is, why would we want to create a SharePoint workflow with VSTO as opposed to SharePoint Designer? It all comes down to reusability. SharePoint Designer workflows, although easier to create, are more limited, and are always associated with just one list. Yes, you can template that list and make copies of the workflow, but fundamentally they are not reusable. VSTO workflows on the other hand can be reused without limitation.

VSTO also includes features that make it easier to develop, deploy and debug workflows. It has what we call the Simple F5 Experience. This is the familiar process of running and debugging your workflow just as you would for any other Windows application. Theres not more hunting for the right w3wp processes in the task manager, looking for stsadm errors, or running batch scripts to deploy you workflow. VSTO takes care of all of that for you.

This frees your time from setting up your development environment and allows you to focus on the your business logic. 16http://msdn.microsoft.comxxx-lzz

Creating A SharePoint WorkFlowIts always better live. MSDN Events17http://msdn.microsoft.comxxx-lzzCustom Task PaneAdds custom functionalityDynamically set propertiesShow/Hide, dock positionResponds to event handlersOn hide, on show, on data bindTo create a Custom Task Pane,Create UserControl for UI and functionalityAdd UserControl to CustomTaskPaneCollectionTask panes, introduced in Microsoft Office XP, enable users to add and manipulate content in their documents. For example, users can query and insert information from external sources into their documents, add rich graphics, format a document, insert structured XML data using extensible schema definition (XSD) files, and complete many other tasks using task panes.

In the 2007 release of Office, improved task panes provide an easy, flexible way for you to create and deploy application-specific functionality in fully customizable task panes that users can dock to different areas of the screen. Users can display multiple custom task panes when they need them and control each one individually.

The Custom Task Pane is programmable with VSTO. This allow developers to add functionality to accomplish specific business needs. Since the Custom Task Pane is an object in the Office application, you can dynamically set properties and program actions through event handlers.

From a development standpoint, creating a Custom Task Pane is relatively easy. A UserControl with the UI and functionality needs to be created, then add it to the CustomTaskPaneCollection.18http://msdn.microsoft.comxxx-lzz

Building a custom Task PaneIts always better live. MSDN Events19http://msdn.microsoft.comxxx-lzzRibbon DevelopmentOffice has built-in support for XML-based customization modelVSTO 2005 SE support:Simplifies hookup from .NET via pre-generated classes and sample XMLVSTO 2008 support: Adds full-blown visual designer supportExport to XML optionA more robust programming layer

With the release of Microsoft Office 2007, came the birth of the Ribbon. The Ribbon replaces the menus and toolbars residing in previous versions of Office. The Ribbon is a panel that contains icons and commands organized into relevant tabs. Each application in Office will have a different set of functionality in the Ribbon. One of the biggest benefits of the Ribbon is its customizability.

Ribbon development in VSTO v2 was rudimentary, at best. With VSTO 2005 SE developers could select a ribbon project template that simplified the hookup from .NET and generated sample XML that could be modified for the desired result.

With the latest version of VSTO, developers get a complete visual designer (with full-featured toolbox and drag-and-drop functionality). The designer allows you to customize the Ribbon in the same way youd customize a Windows Form. You simply drag and drop from the toolbox. You can then set properties and write event handler code.

There is also an "export to XML" option and the programming layer has received some overall improvements.20http://msdn.microsoft.comxxx-lzz

Building a custom RibbonIts always better live. MSDN Events21http://msdn.microsoft.comxxx-lzzClickOnce DeploymentTwo competing goals in application developmentInteractive, stateful, rich client applicationThin client application modelClickOnce deployment overcomes:Difficulties in updating applicationsImpact to the users computerSecurity permissionsWhen it comes to application development, there are often two competing goals. First is to create a rich client desktop application that provides an interactive, stateful experience. The second is a thin client application model that requires minimal effort to deploy and update.

With VSTO and ClickOnce deployment, developers can now create and deploy self-updating Windows-based applications that can be installed and run with minimal user interaction. ClickOnce deployment overcomes three major issues in deployment.

It overcomes difficulties in updating applications. With Microsoft Installer deployment, whenever an application is updated, the user must reinstall the whole application. With ClickOnce, you can provide updates automatically. Only those parts of the application that have changed are downloaded, and then the full, updated application is reinstalled from a new side-by-side folder.

Second, it overcomes the impact to the users computer. With Windows Installer deployment, applications often rely on shared components, with the potential for versioning conflicts. With ClickOnce, each application is self-contained and cannot interfere with other applications.

Third, it overcomes the issue with security permissions. Windows Installer deployment requires administrative permissions and allows only limited user installation. ClickOnce deployment enables non-administrative users to install and grant only those Code Access Security permissions necessary for the application.

In the past, these issues sometimes caused developers to decide to create Web applications instead of Windows-based applications, sacrificing the rich user interface and responsiveness of Windows Forms for ease of installation. By using applications deployed using ClickOnce, you can have the best of both technologies.

22http://msdn.microsoft.comxxx-lzzClickOnce DeploymentThree ways to publish a ClickOnce applicationFrom a Web page, network share, mediaClickOnce applications are self-updatingClickOnce applications are isolated and self-contained.Cannot break existing applicationsBy definition, a ClickOnce application is any Windows Presentation Foundation, Windows Forms, or console application published using ClickOnce technology. ClickOnce applications can be published in three ways: from a Web page, from a network file share, or from media such as a CD. A ClickOnce application can be installed on a users computer and run locally when the computer is offline, or it can run in an online-only mode without permanently installing anything of the computer.

ClickOnce applications are self-updating. They can check for the latest versions and automatically replace any outdated files. The developer can specify the update behavior. A network administrator can also control update, for example, marking an update as mandatory. Updates can also be rolled back to an earlier version by the end user or by an administrator.

Because ClickOnce applications are isolated, installing or running a ClickOnce application cannot break existing applications. ClickOnce applications are self-contained. Each ClickOnce application is installed to and run from a secure per-user, per application cache. By default, ClickOnce applications run in the Internet or Intranet security zones. If necessary, the application can request elevated security permissions.23http://msdn.microsoft.comxxx-lzzClickOnce DeploymentFeatureClickOnceWindows InstallerInstallation-time user interfaceSingle promptMultipart WizardInstallation of assemblies on demand YesNoInstallation of shared filesNo YesInstallation of driversNo Yes(with custom actions)Installation of GACNo YesInstallation for multiple usersNo Yes

Here are more comparisons between ClickOnce deployment and Windows Installer deployment. As you can see, ClickOnce offers more of a hands-off experience for the user. It also only installs assemblies that are needed. This lends to a more efficient installation process. The remaining four items speak to the fact that ClickOnce has limited access to the local computer because it is run in a restricted security zone.24http://msdn.microsoft.comxxx-lzz

Setting Up ClickOnce Deployment

Its always better live. MSDN Events25http://msdn.microsoft.comxxx-lzzSession SummaryOffice as a develop platformOffice business applications bridges the Results GapVisual Studio Tools for OfficeSharePoint WorkflowCustom Task PaneRibbon DevelopmentClickOnce Deployment

26Lets recap what we covered in this session. The Office developer platform is gaining popularity as a way for application developers to create tools and add-ins for Microsoft Office. As this evolves, we can expect to see more and more people embracing the technology.

We saw how Visual Studio bridges the result gap between the Office system employees are familiar with and the back end storage system used to store the data.

Finally we took a closer look at Visual Studio Tools for Office. VSTO is a powerful development option for building Office Business Applications (OBA). Visual Studio 2008 represents a huge step forward in making Office development a highly productive and integrated experience. From full support for both Office 2003 and Office 2007, Word Content Controls, through full fidelity with NET Framework security and deployment model. VSTO offersa power and natural option for developers to build solutions that integrate into their existing Office infrastructure.

We covered four features in Visual Studio Tools for Office. We saw how to create a SharePoint Workflow, a Custom Task Pane, how to customize the Ribbon, and how utilize ClickOnce deployment to easy distribute and update applications.http://msdn.microsoft.comxxx-lzzFor More InformationOffice Developer Centerhttp://msdn2.microsoft.com/en-us/office/aa905533.aspxVSTO Bloghttp://blogs.msdn.com/vstoMSDN Web sitemsdn.microsoft.com

27Here are a few resources available to learn more about Visual Studio Tools for Office. The Office Developer Center is a great portal for blogs and webcasts. The VSTO Blog offers the latest news and code samples when it comes to extending the Office system. And as always, visit the MSDN web site for all you Microsoft development needs.http://msdn.microsoft.comxxx-lzz