programming4us
 
Applications Server
 

Packaging and Deploying Sharepoint 2013 Apps : Deploying an App (part 1) - SharePoint-Hosted App Deployment

2/8/2014 1:10:38 AM

The options available for deploying apps depend on your deployment scenario and application type. There are three main application types and each one requires a different deployment scenario. Table 1 summarizes these various scenarios.

TABLE 1: Application Deployment Summary

APP TYPE APP CODE DEPLOYED TO APP PACKAGE DEPLOYED TO
SharePoint-hosted N/A App catalog or Marketplace
Provider-hosted Azure or other App catalog or Marketplace
Autohosted Azure App catalog or Marketplace

SharePoint-hosted apps are a bit simpler than the others given that there isn’t any Web deploy package to have deployed, and because they generally consist of HTML pages and JavaScript only. SharePoint-hosted apps don’t have any other dependencies on a runtime environment for this reason.

Provider-hosted apps are a bit more complex and consist of just an app package without any Web deploy package in it. This is because the provider of the app is already required to be hosting it either in Azure or some other Internet-accessible location. The provider of the app manages running the code for the app and any associated databases or dependent resources.

Autohosted app packages are the only ones that contain Web deploy packages and/or database packages. This is because Autohosted apps are the only app types where SharePoint needs to take both the Web deploy package and database package and deploy them to Azure when the app is installed. Azure is currently the only option for autodeployment in the Autohosted scenario.

1. SharePoint-Hosted App Deployment

SharePoint-hosted apps are the simplest of the three app types to package and deploy because of the lack of a code package and associated deployment steps. All that is required is to package the application using the Publish wizard in Visual Studio and then deploy the app to either the Marketplace or an app catalog. After the app is deployed, users can install the app on their site. When this occurs, SharePoint takes the app package, creates a new app Web for that instance of the application, and provisions the pages and content from the app package into it. Any custom UI actions and App Parts are also deployed to the host Web.

Try your hand at deploying a SharePoint-hosted app in the next exercise to learn how straightforward the process is.


Deploying a SharePoint-Hosted App

In this example you create a very basic SharePoint-hosted app using Visual Studio 2012 development tools and deploy that new app to the app catalog. You will need to use the app catalog created from the previous Try It Out, “Creating a Private App Catalog in Office 365.”

1. Ensure you have created an app catalog. See the earlier exercise, “Creating a Private App Catalog in Office 365.”

2. Open Visual Studio and create a new app for a SharePoint 2013 project called SharePoint Hosted App by selecting File ⇒ New Project ⇒ App for SharePoint 2013. In the Name field enter MySharePointHostedApp.

3. In the New Project wizard specify SharePoint-hosted as shown in Figure 1.

FIGURE 1

image
4. After the project has been created, right-click the project and select Publish. The publishing wizard for the application launches; see Figure 2.

FIGURE 2

image

5. Click Finish. A new Windows Explorer window opens with your application package called MySharePointHostedApp.app showing.

6. Open a browser window and navigate to the tenant admin portal for your Office 365 environment at: http://portal.microsoftonline.com.

7. Under the Admin menu in the top navigation, click SharePoint to go to the SharePoint Online tenant admin pages.

8. Click apps in the left-side navigation.

9. Click the App Catalog link. The app catalog you created in the previous exercise appears.

10. Click the Distribute apps for SharePoint tile.

11. Click the New App button. A prompt appears asking you to pick the .app file for your application.

12. Click Browse and select the .app file that Visual Studio packaged for you in step 5. Click OK. A dialog appears asking for information about your application, as shown in Figure 3.

FIGURE 3

image

13. You are not required to enter any information unless you want to. Click Save to proceed. You should now see your application in the app catalog, as shown in Figure 4.

FIGURE 4

image

14. Navigate to your development site in SharePoint Online.

15. Click Site Contents in the left-side navigation.

16. Click Add an App.

17. Click From Your Organization in the left-side navigation and you should see your newly added application listed, as shown in Figure 5.

FIGURE 5

image

18. Click the tile for the application and click Trust It when prompted. SharePoint Online begins to provision your app in the site.

19. When the process completes, click the newly installed app tile. The Start page for your application appears; your username will be listed as shown in Figure 6.

FIGURE 6

image

How It Works

In this exercise you created a rudimentary SharePoint-hosted app that simply lists the name of the currently logged-in user. You packaged the app ready for deployment using the Publish wizard in Visual Studio and then uploaded and configured the app in the app catalog in SharePoint Online. You then installed the app on a SharePoint Online site. Behind the scenes, SharePoint created a new SharePoint site specifically for this installation of the application and deployed the application’s assets, such as pages and JavaScript, to the appropriate places. You can see in the URL for the app the domain name created and set up specifically for the app instance. These steps are done on demand each time a SharePoint-hosted app is installed. When the application is run it uses the JavaScript Client-Side Object Model to make a call to web.get_currentUser(); to retrieve the currently logged-in user. This code is in the /Scripts/App.js file in the Visual Studio project.
 
Others
 
- Microsoft Lync Server 2013 Edge Server : Edge Server Administration (part 5) - Managing External Web Conferencing Features
- Microsoft Lync Server 2013 Edge Server : Edge Server Administration (part 4) - Managing Public Providers
- Microsoft Lync Server 2013 Edge Server : Edge Server Administration (part 3) - Managing XMPP Federation
- Microsoft Lync Server 2013 Edge Server : Edge Server Administration (part 2) - Assigning External Access Policies, Managing Federation
- Microsoft Lync Server 2013 Edge Server : Edge Server Administration (part 1) - Editing the Global External Access Policy, Creating a New External Access Policy
- Microsoft Lync Server 2013 Edge Server : Edge Server Configuration
- Packaging and Deploying Sharepoint 2013 Apps : Packaging and Publishing an App
- Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 3) - Web Deploy Package, Database Package
- Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 2) - Manifest and Assets, SharePoint Solution Package
- Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 1)
 
 
REVIEW
 
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- Sigma 24mm f/1.4 DG HSM Art

- Canon EF11-24mm f/4L USM

- Creative Sound Blaster Roar 2

- Alienware 17 - Dell's Alienware laptops

- Smartwatch : Wellograph

- Xiaomi Redmi 2
 
VIDEO TUTORIAL
 
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
 
Top 10
 
- How To Install Android Market & Google Apps On Kindle Fire
- How To Make Ubuntu Look Like Windows 7
- How To Add A New Account in MS Outlook 2013
- Get Android & Mac OS X Style Gadgets For Windows 7 & Windows 8 With XWidget
- How To Activate Microsoft Office 2013
- How To Install Actual Facebook App On Kindle Fire
- How To Create, View And Edit Microsoft Office Files On Kindle Fire
- Download Attractive Business PowerPoint Templates For Free At SlideHunter
- How To Use And Enable Hibernate & Sleep Mode In Windows 8
- How To Get Microsoft Office 2013 Trial Product Key From Microsoft