A SharePoint App is deployed as App Package file with .APP as an extension. SharePoint Solutions used to have .WSP as an extension and are .CAB files. SharePoint Apps are not .CAB files, they are simply .ZIP files. Just replace .APP extension with .ZIP. Open this folder in Windows Explorer and you will many files under it including AppManifest file and other files needed for app deployment.
The AppManifest file is an XML file and the most important one as it contains lots of information like App title, unique id, start page security settings etc. Below is a sample of the AppManifest file.
<?xml version=”1.0″ encoding=”utf-8″ ?>
<!–Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9–>
<App xmlns=”http://schemas.microsoft.com/sharepoint/2012/app/manifest”
Name=”SampleSharePointApp”
ProductID=”{78abc125-ef63-6789-abcd-1ab23ef7878b}”
Version=”1.0.0.0″
SharePointMinVersion=”15.0.0.0″>
<Properties>
<Title>Sample SharePoint App</Title>
<StartPage>~appWebUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
</Properties>
<AppPrincipal>
<Internal />
</AppPrincipal>
</App>
When an app is deployed to the SharePoint Site, it appears on the Site Contents page. There are three types of web included in an app: host web, app web and remote web.
Host Web
Every app will have a host web. Host Web refers to the SharePoint Site in which app will be installed. Host Web contains elements like:
- App Parts: These are Client Web Parts same as Web Parts. But their logic does not reside on server. Their logic reside on client web browser or on remote web site.
- Custom Actions: These are custom ribbon and menu options.
- Redirect Page: When a user navigates to and fro from an app, this redirect page help user to redirect to the appropriate page in an app. This is based on the AppManifest file’s configuration.
App Web
App Web is a separate SharePoint site that is deployed to host the components of an app. It included lists, libraries, SharePoint Pages, Style Sheets and Client Side Scripts. SharePoint Pages does not contain the server side code blocks, but only the server controls.
App Web is deployed to SharePoint farm but not in the same domain as rest of the site. T is deployed using a specialized site template, App Site Template. Pages of this site use app.master master page by default.
Remote Web
Remote Web is normal ASP.NET web site which is designed to deploy outside of SharePoint like in Windows Azure. Here server-side code is allowed. Remote Web can make secure calls to host web and app web whenever needed.
NOTE: Remote Web does not run within SharePoint and hence does not have access to SharePoint Server Object Model. It uses SharePoint’s client-side APIs. CSOM for .NET can be used by server-side code in remote web and JavaScript CSOM is available to the pages served from a remote site.