...

Overview/Background:

Sharepoint Hosted Apps are one of the two app models available in SP 2013, the other being provider hosted apps. Although any SharePoint component that can be in a SharePoint-hosted app can also be in a provider-hosted app, the basic difference between these models is that a provider hosted app has at least one remote component; such as a web application, service, or database that is hosted externally from the SharePoint farm or SharePoint Online subscription. Whereas a SharePoint-hosted app consists almost entirely of SharePoint components in an app web. They are sometimes said to have their center in SharePoint.

All business logic in a SharePoint-hosted app uses JavaScript either directly on a custom page or in a JavaScript file that is referenced from a custom page. A JavaScript version of the SharePoint object model (JSOM) is available to make it simple for the app to perform create, read, update, and delete (CRUD) operations on SharePoint data.

Custom pages in a SharePoint-hosted app are generally ASP.NET pages (ASPX) and they can declaratively reference ASP.NET and in-the-box SharePoint controls, but there can be no code behind. However, you can customize the SharePoint controls using a client-side rendering option and custom JavaScript.

Development:

Creating a Sharepoint Hosted App in the Office 365 environment is quite straightforward, as all the plumbing needed behind the scenes is already done for you by Microsoft. So you are ready from the get-go to start writing and publishing your apps. On Premise, however, if you want to work with Sharepoint Hosted Apps, there are mutli-step configurations you need to do before you can start creating /publishing your own apps. This is what we are going to attempt to do in this article. This post is mostly for a development environment.

We will first start with configuring our On Prem Sharepoint 2013 development environment for hosting apps and ensuring all the infrastructure is in place, finally, we will create a “Hello world” example.

Click the link to get started –How to Setup On-Prem SharePoint Hosted App