Office/SharePoint Solutions

Developers have been able to customize Office for a long time now; some of us still remember writing Excel macros on Windows 3.1 or automating Word with Word Basic. Thankfully, these days the tools used to write Office solutions are built in to Visual Studio. With them, you can create Office-based projects and solutions that leverage Word, Excel, Project, Visio, PowerPoint, InfoPath, and Outlook. You can also create SharePoint applications following the new SharePoint app model. Your Office apps can be created for desktop installation or as a Cloud Business App in Office 365. Figure 1.5 shows the New Project dialog for Office solutions.

Image

FIGURE 1.5 The many Office/SharePoint project templates inside Visual Studio.

There are a few scenarios that might lead developers to create an application based on Office. The most common is when you need to extend a line-of-business (LOB) application to provide functionality inside the common, information-worker productivity tools of Office. This type of solution typically combines structured, corporate data with a business process workflow that’s centered on a document (such as an invoice or a purchase request).

For example, suppose you work with a financial, manufacturing, or payroll application. Each of these fills a specific need. However, users might need to work with the data that is housed inside the application and make key decisions that feed back into these systems. This work is often done through cut and paste and is not captured by the systems. Users lose productivity switching back and forth between the Office tools and the LOB application. This is precisely where you should consider creating an Office application to help bridge this gap.


Note

The Office templates in Visual Studio 2015 cover both Office 2010 and Office 2013. The same is true for the SharePoint templates.


Develop Documents, Templates, and Add-Ins

Notice the many templates in Figure 1.5. There are three separate templates for Excel, for example. Each of these templates provides a specific purpose. Office application templates allow you to create solutions built on a single document, a document template, or as an add-in to the given Office application. The following list provides a brief overview of these three project subtypes:

Image Document (Workbook in Excel)—Document projects allow you to build a solution based on a specific document. There are typically not multiple instances of the document. As an example, suppose you have an Excel workbook that needs to read and write project resource billing information from and to an enterprise resource planning (ERP) system. This document might be updated weekly as part of a resource meeting. The data should be up-to-date and changes should feed the billing system. In this instance, you would create a solution based on this single document.

Image Template—An Office Template project is one that is based on an Office template file (an Excel .xltx, for example). Creating a solution based on an Office template file gives you the flexibility to provide users with assistance when creating a new instance of a given template. You might push common document templates out to your users. When a user creates a new instance, the template might reach into data housed in other systems to help the user fill out the details of the document. You might then, in turn, capture the results in a database after routing the template through a basic SharePoint workflow.

Image Add-in—An Add-in project allows you to extend the features and functionality of a given Office application. You create add-ins to offer additional productivity and solutions inside a given application. You might, for example, write an Outlook add-in that allows users to more easily file and categorize their email.

Whichever template you choose, Visual Studio provides a rich, design-time experience for building your Office solution. For example, Figure 1.6 shows the Visual Studio design experience building a solution for a Word 2013 template. In this example, a user is creating a quote for training. The fields in the document pull from a line of business (LOB) application database that includes customer information, resource data, and common pricing.

Image

FIGURE 1.6 Designing a Word Template project in Visual Studio.

Create SharePoint Solutions

Although SharePoint is not a true Windows client, SharePoint and Office have become nearly synonymous. They share the same release cycle, and companies are urged to keep versions of Office and SharePoint in synch. Companies leverage SharePoint for knowledge management, collaboration, and business process automation. Of course, this inevitably means customization and extension by developers.

Visual Studio presents a rich toolset for SharePoint developers. With it, you can create SharePoint workflows and build Web Parts based on ASP.NET. You can also take advantage of the new app model for SharePoint 2013. In addition, the debug experience when building SharePoint solutions is what developers have come to expect. SharePoint development is a first-class consideration inside the IDE. This allows developers to more easily extend SharePoint to meet the business demand this collaboration product has generated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset