vsto + lob apps information matters

Post on 24-May-2015

942 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Apresentação do João Tito Lívio sobre VSTO na 26a Reunião Presencial da Comunidade NetPonto em Lisboa (http://netponto.org).

TRANSCRIPT

VSTO + LOB Apps Information MattersJoão Tito Lívio

http://netponto.org26ª Reunião Lisboa - 21/01/2012

Patrocinador “Bronze”

Patrocinadores “Silver”

João Tito Lívio (aka Tito).NET e SharePoint ConsultantProject Manager

Microsoft Most Valuable Professional (Office Development)MCP + MCTS

Sumário• Visual Studio Tools for Office (Tool?, VBA?, Polémica? Petições? VBA will dead?, Whatever!)

– O que é– Como Funciona– Breve introdução

• Application vs Document Level• Criação de um Projecto VSTO• Tipos de Pojectos Disponíveis• Ribbon Visual Designer

• VSTO + Excel (Application Level)– Automação + SQL server– Automação + Web Services

• VSTO + Word (Document Level)– Automação + SQL server

• VSTO + Outlook– Automação com SQL Server e E-mails

Opiniões1. Microsoft has stopped developing Visual Basic (classic) in 1999 and has spent huge effort on

building .Net framework. since then Microsoft is promoting .Net Framework and C# as the primary language of choice. Visual Basic .Net is equally good and can used if you are already an expert in classic VB.

2. Microsoft “is planning “to retire VBA?. Office 2003 came with Scripting Engine based on Javascript (not successful) and since then promoting the use of VSTO and Office PIAs in .Net.

3. Starting Office 2007, standard formats of Excel doesn't support embedding macros. Formats that support Macros and VBA projects only run of located at Trusted locations or when security is lowered below recommended levels.

4. Starting Office 2007, the VBA environment runs in the compatibility mode and having several issues when dynamically invoking methods from the embedded VBA projects.

5. It is very clear future versions of Office will not support VBA. However, I don't know which will be the last version supporting VBA (2012, 2015?).

6. One has to seriously think about investing their time in learning VBA, when it is going away soon. It is getting very difficult to find junior VBA developers.

Source: http://www.execoder.com/2012/01/excel-development-vba-vs-vsto.html

VSTO o que é?

• Uma Tool para interagir com as Office App’s• Interop Object Model via .NET Components• Utiliza Managed Code (C# ou VB.NET)• Não é necessário conhecimento de VBA• Utiliza-se ao Nível da Aplicação Host ou Doc..• É interpretado como COM Component

Como Funciona

Object Model Call’s

Event, CallbacksMethods

Interop Assembly Microsoft Office

Microsoft Add-in

VS App

Application vs Document LevelA Aplicação Host Carrega o DLL O Documento Carrega o DLL

Tipos de Projetos VSTO

APP

DOC

São Templates criados para desenvolver projetos VSTO.

São os suportados oficialmente pela Microsoft, embora podermos criar os nossos próprios templates para qualquer aplicação Office pois os NET Interops estão disponíveis

Criar o Primeiro Projecto VSTO

demonstração

Ribbon Visual Designer

• Integração com a Application Host• Usa Callbacks para comunicar com o Office• XML Based

protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject() { return new MyRibbon(); }

Trabalhar com a Ribbon

demonstração

Microsoft Excel e LOB

• Get Data from SQL server• Interop with Excel• Manage Workbooks and Worksheets

Excel Interop LOB

demonstração

Microsoft Excel e Web Services

• Get Data from Service• Interop with Excel• Display Data

Excel Interop Web Services

demonstração

Microsoft Word e LOB

• Get Data from SQL server• Interop with Word• Manage Document

Word Interop LOB

demonstração

Microsoft Outlook e LOB

• Get Data from SQL server• Interop with Outlook• Manage Outlook Actions

Outlook Interop LOB

demonstração

Deploying Visual Studio 2010 VSTO• The Microsoft .NET Framework

– Visual Studio Tools for the Office system 2010 can work with the Microsoft .NET Framework 3.5 orMicrosoft .NET Framework 4.

• The Microsoft Visual Studio 2010 Tools for Office Runtime.– Visual Studio 2010 Tools for Office Runtime provides a runtime environment that manages add-ins

and document-level solutions.

• The primary interop assemblies for the 2007 Microsoft Office system or Microsoft Office 2010.• Any utilities assemblies referenced by projects that target the .NET Framework 4.

Solution Specific Components The installer package must install the following components to the user computer:

– The Microsoft Office document, if you create a document-level solution.– The customization assembly and any assemblies it requires, Additional components such as configuration files,

The application manifest (.manifest). The deployment manifest (.vsto).– Ver: http://msdn.microsoft.com/en-us/library/ff937654#Deployment

Questões?

Referências e Links Imperdíveis• Referências: Office Developer Center

– http://msdn.microsoft.com/en-us/office/aa905340

• Vídeos Interessantes e LinksVideo: Developing Managed Applications for Office 2010 in Visual Studio 2010Video: Embedding Type Information from Microsoft Office AssembliesVideo: Copying a Document to the End User Computer after a ClickOnce InstallationVideo: Deploying Multiple Office Solutions in a Single ClickOnce Installer

• Links– Deployment Overview (Office Development in Visual Studio) – Advanced Office Solution Deployment – Preparing Computers to Run or Host Office Solutions – Updating Office Solutions – How to: Install a ClickOnce Office Solution – How to: Uninstall a ClickOnce Office Solution – Troubleshooting Office Solution Deployment

Patrocinadores “GOLD”

Patrocinador “Bronze”

Patrocinadores “Silver”

Próximas reuniões presenciais

• 21/01/2012 – Janeiro• 11/02/2011 – Fevereiro (Coimbra)• 18/02/2011 – Fevereiro• 24/03/2011 – Março

Reserva estes dias na agenda! :)

Obrigado!Contactos Sociais e Blogshttp://www.tlivio.org

top related