As originally posted in: http://blog.cloudshare.com/2012/06/06/integrating-sharepoint-windows-azure-with-cloudshare/
SharePoint 2010 and Windows Azure are currently the rockstars of the Microsoft platforms. This post is about how you can tie them together!
What is SharePoint 2010?
SharePoint 2010 is a business collaboration platform. It allows for enterprises to enhance the business decision making process with out-of-the-box capabilities available in the product.
The six key functional areas in SharePoint 2010 are:
What is Windows Azure?
Windows Azure is the Microsoft Cloud Computing platform that allows you to quickly create and run applications in the cloud. The applications can be developed using the Microsoft .NET platform or other popular development languages, like Java or PHP.
Applications deployed to Windows Azure benefit from the performance, redundancy, and scalability available on the Microsoft Cloud Computing platform. Also, there are no bandwidth or server limitations.
What is Visual Studio?
Visual Studio is the tool for creating and integrating applications on both SharePoint 2010 and Windows Azure.
What is CloudShare’s role?
CloudShare plays a key role in its ability to simplify and facilitate the process of integrating Azure and SharePoint in the following ways:
- Creating a development environment for SharePoint 2010 & Azure is simple using any of the pre-configured virtual machine templates with base software pre-installed on CloudShare:
- SharePoint 2010, SQL Server 2008, Visual Studio 2010 SP1 (VS 2010 SP1)
- You will need to install Windows Azure Tools and Windows Azure SDK (http://www.windowsazure.com/es-es/develop/downloads/ in order to begin creating applications to deploy to Windows Azure.
- You can install Visual Studio 2012 RC (VS 2012 RC) http://www.microsoft.com/visualstudio/11/en-us/downloads for SharePoint 2010 development project and item templates,
- The virtual machines in your development environment can be configured with up to 10 GB of RAM memory, eliminating any performance concerns.
- You are not limited by your corporate network when you are ready to deploy to Windows Azure. Deploy directly from your CloudShare environment to take advantage of the available bandwidth without impacting your network.
Windows Azure and SharePoint 2010 Integration Scenarios
1) Integrate Windows Azure into SharePoint:
- iFrames allows you to easily integrate ASP.NET applications published in Azure through the ASP.NET Web Role available in the Windows Azure tools. To test this scenario, add a “Content Editor” Web Part to a SharePoint page with the following HTML code:
This is the result you will see in your SharePoint site:
This integration scenario is very simple because there is no need to develop complex code or deploy any artifacts on the SharePoint side. You will, however, lose customization because the solution will not be distributed as a SharePoint .WSP. (Note: You can create a SharePoint artifact with a single SharePoint feature and a Feature Event Receiver. This can programmatically add and configure the “Content Editor” Web Part to a SharePoint page).
- Integrating hosted services or data allows you to integrate data stored in SQL Azure Databases or Windows Azure Data Market services to expose either public or private sets of data. You can consume this type of data directly by using Business Connectivity Services (BCS) in SharePoint Designer 2010 (SPD 2010) or the SharePoint Swiss army knife – the wonderful DataForm WebPart. Another option is to consume the data by creating a SharePoint artifact in VS 2010 / 2012 RC, like a BCS connector or a Custom Web Part.
This integration approach has some of the following advantages:
- You are using existing services in SharePoint (BCS) and Windows Azure (SQL Azure and Windows Azure Data Market).
- The programming model and techniques for accessing data or services are quite straightforward.
- If you create SharePoint artifacts, they will be packaged as standard .WSP.
There are some disadvantages you must take into account:
- There may be security risks associated with transferring data across platforms.
- You’ll need public service interfaces for consuming data allocated in the Windows Azure Data Market.
- Integration by means of custom services deployed to Windows Azure simplifies the process of consuming data through a wide range of SharePoint artifacts. These artifacts include Silverlight applications, custom web parts, event handlers, or BCS connectors.
Strengths of this approach:
- Integration is enabled through standard SharePoint artifacts.
- You have more control.
- You have multiple entry points to integrate Azure data and services in SharePoint 2010.
You’ll need to write more custom code to create the custom services to be deployed to Windows Azure. The custom code will enable the SharePoint artifact to consume data. For example, transferring data from an Azure Restful service is done by adding jQuery code to a “Content Editor” Web Part:
The AJAX call to be added to the WebPart should be similar to the following:
- Integrating SharePoint data into Windows Azure is the transfer of data created in SharePoint 2010 (either by SharePoint 2010 Web Services, SharePoint 2010 REST API or de Client Side Object Model – CSOM). In this scenario you can take advantage of other Windows Azure platform components like .
Windows Azure and SharePoint 2010 Integration Mechanisms
These are the integration options we have between Windows Azure and SharePoint 2010:
- From SharePoint 2010, it’s possible to consume Azure data/services through:
- SharePoint CSOM (.NET, Silverlight or ECMAScript flavors), which allows for the interaction between Azure data and SharePoint lists/document libraries.
- BCS connectors that allow you to integrate data and services by external content types and external lists.
- Silverlight to build rich user experiences to integrate azure data/services.
- Define data (SQL Azure)/service connections in InfoPath forms.
- Event receiver and / or workflows that introduce Azure data or services
- Federated searches in order to include Azure data in search results.
- From Windows Azure, it’s possible to consume SharePoint data by:
- Using SharePoint web services to consume information about sites, lists, users, and other typical elements of the platform.
- Using SharePoint REST API to easily consume SharePoint lists and document libraries data.
- Using CSOM, which allows you to interact remotely with SharePoint data. You can do this up to the site collection level in the same way you would with the server side object model.
Those are the Windows Azure and SharePoint 2010 integration scenarios and mechanisms. In future articles I will show you some practical examples of how to integrate Azure data/services in SharePoint.