0

There was a kind of question or confusion I always had with the definition of what is an app (now called add-in). Also this confusion happens to me because of the name changes.

You can have two types (SharePoint-hosted and Cloud hosted).

And when you create a custom list through the UI you select the option Add an App you are using the Sharepoint-hosted app.

And according the old definition of SharePoint-Hosted App - all the objects created by developers are stored in the content database. And all code should be executed in the browser. (JavaScript)

So, if I create a custom list it stores all the objects in the content database (javaScript objects), for example, and when it is loaded it is executed in the browser ?

According with the newer definition.

All business logic in a SharePoint-hosted add-in 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 add-in to perform create, read, update, and delete (CRUD) operations on SharePoint data.

Custom pages in a SharePoint-hosted add-in 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.

But how can they have an ASPX pages and can just have code that is possible to be executed on the browser only, according with the old definion ?

1 Answer 1

0

Let me see if I understood your question.. Your question is "For what do you need an .aspx page on a SharePoint-Hosted Add-In if you can only have JavaScript on it?". If that is your question then here is the answer.

The limitation on the .aspx pages in a SharePoint-Hosted Add-In is that you cannot have custom C# code attached to your page. But, as your message says...

... they can declaratively reference ASP.NET and in-the-box SharePoint controls ...

This becomes very useful because you are still in the context of SharePoint (versus a Provider-Hosted Add-In) so you can still take advantage of the SharePoint Server Controls.

Hope the answer was useful.

2
  • Ok, is useful, but contradicts old definition that says that everything is processed on the browser.
    – Tito
    Oct 13, 2016 at 7:08
  • Everything that the developer does is processed on the browser. But of course if you are using SharePoint server controls those will still take use of the server side capabilities. They still trust their own code (trust in the sense that it can be run on the SharePoint Farm machines) they just dont trust ours anymore. Oct 14, 2016 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.