IT tutorials
 
Applications Server
 

Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 2) - Manifest and Assets, SharePoint Solution Package

2/5/2014 2:52:28 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

1. Manifest and Assets

At the heart of an .app file is the app manifest file. This file is the central location that SharePoint reads from when interrogating an app. The manifest contains things such as the app name, product ID, version, security information, and information about the starting page of the app. An example of a simple app manifest follows:

<?xml version="1.0" encoding="utf-8"?>
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
Name="SharePointAppPackage" ProductID="{6b80672f-3edc-409c-94fe-608ee4264280}" Version="1.0.0.0"
SharePointMinVersion="15.0.0.0">
<Properties>
<Title>SharePointAppPackage</Title>
<StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
</Properties>
<AppPrincipal>
<AutoDeployedWebApplication />
</AppPrincipal>
<AppPermissionRequests>
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web"
Right="FullControl" />
</AppPermissionRequests>
<AppPrerequisites>
<AppPrerequisite Type="Capability" ID="A83C8D70-71DE-4260-9FB8-677418EB47F2" />
<AppPrerequisite Type="Feature" ID="5B79B49A-2DA6-4161-95BD-7375C1995EF9" />
<AppPrerequisite Type="AutoProvisioning" ID="Database" />
<AppPrerequisite Type="AutoProvisioning" ID="RemoteWebHost" />
</AppPrerequisites>
</App>

In this example you can see in the app node the name of the application specified; the product ID, which uniquely signifies this app; the version of the app; and the minimum version of SharePoint that is required. Although at the time of writing there is only one version of SharePoint 2013, in the future developers will be able to target their apps at a minimum version to ensure compatibility. Additionally, in the AppPermissionRequests node an application can specify the minimum permissions it needs granted for it to work correctly. In this case it is asking for full control permissions on the host Web. Finally, the manifest specifies a number of AppPrerequisites. These are IDs of features and capabilities that must be enabled or turned on in the SharePoint site and farm so that the app can run. For example, the sample code is requesting that the Media Player Web Part feature be activated and as well as the Managed Metadata Service Capability. As a developer you don’t need to know the IDs by GUID. The Visual Studio tools assist with this via a GUI-style property panel.

When you deploy an app to SharePoint the first thing SharePoint does is unpack and take a look at the manifest file. This tells SharePoint what sort of app it is, such as Autohosted. Additionally, SharePoint looks for the other deployment assets such as a SharePoint solutions package, a Web deploy package, and a database package. Each of these are deployed differently and are discussed in the following sections.

3. SharePoint Solution Package

An .app file may also contain a SharePoint solution package, which would in turn contain a variety of SharePoint components such as the following:

  • Lists/libraries
  • Site columns
  • Content types
  • Event receivers
  • Modules
  • UI actions

Much like in SharePoint 2010 full-trust applications and sandbox solutions, the aforementioned components are defined declaratively using XML and packaged in a .wsp file, which makes up the SharePoint Solution file. In fact, in many regards the new app model’s .wsp packages are the next generation of solution package formats that started with custom template .stp files in SharePoint 2003. Much of the declarative XML contained within these new packages shares historical roots in the earlier template formats. However, don’t be fooled — many of the techniques and options you might have used in the past are no longer supported or available in the new packaging format, so caution is advised.

In the past, understanding the structure of a .wsp file was important, and in many ways it still is for those looking to do more advanced debugging and diagnosis. However, the SharePoint tools in Visual Studio have developed so much in the 2012 edition that the packaging format is largely taken care of for you along with inclusion of the .wsp inside an app package.

Similar to an .app file, a .wsp file is another type of file in disguise — in this case a .cab file. These can be simply renamed and opened with Windows Explorer. Also like an .app file, a .wsp file contains a manifest and other supporting assets.

Along with the manifest file, a .wsp file contains XML definitions for the components it contains, which are grouped into Features. A Feature can be activated or deactivated through the SharePoint UI and is a fundamental building block of SharePoint solutions. When you’re building apps many of the same Feature constructs apply. Components are grouped into Features, which are packaged into a .wsp. Visual Studio takes care of much of the Feature creation for you; however, it is worth being familiar with the contents of a .wsp so that if you need or want to learn about how something works under the hood you know where to look.

During installation of an app the .wsp package is used to deploy the Features and artifacts to the app Web, which is the SharePoint site that is created for the instance of the application. Note the .wsp isn’t deployed to the host Web, which is the site that the application is installed in. Therefore, lists, content types, and so on that are defined in this package will be deployed to the app Web only.

Only two types of components can be deployed into the host Web versus the app Web. Those are:

  • Client Web Part (Host Web) also known as App Parts
  • Custom UI Action (Host Web)

These are not included in the .wsp but rather included in the app package as Features without a parent .wsp.

 
Others
 
- Packaging and Deploying Sharepoint 2013 Apps : Anatomy of an App (part 1)
- Exchange Server 2013 : Exchange Clients - Design Considerations (part 3) - Network Usage, Exchange 2013 User Throttling
- Exchange Server 2013 : Exchange Clients - Design Considerations (part 2) - Client Performance
- Exchange Server 2013 : Exchange Clients - Design Considerations (part 1) - Supportability, Security
- Sharepoint 2013 : Community portals and sites - Managing your community settings
- Sharepoint 2013 : Community portals and sites - Adding users to community sites
- Sharepoint 2013 : Community portals and sites - Adding moderators to community sites
- Sharepoint 2013 : Community portals and sites - Creating a community site subsite
- Sharepoint 2013 : Community portals and sites - Creating a community site site collection
- Microsoft Lync Server 2013 Edge Server : Edge Server Installation (part 5) - Creating Certificates
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us