What is difference between an app part and web part in sharepoint 2013 ? I only know apps load inside an iframe .
From a user perspective, there is no difference between web parts and app parts. Both add functionality to a SharePoint page.
Technically web parts run inside a SharePoint context, and as a consequence may make an entire page unresponsive if the web part fail to load. An App part run outside SharePoint context and displays its result in an iFrame. If an app part fails, the page is still loaded displaying other content.
I can think of following differences between app parts and webparts:
- SharePoint Server Object Model code is not allowed in app parts (only client object model code is allowed) whereas web parts allow both Sever and Client object model code.
- App parts provide deployment isolation. However, deployment of web parts causes files to get deployed to 15 hive, dlls to GAC, safe control entries in web.config.
You can use the app part when you choose the App Application Model. Instead you can use the webpart when you use the sandbox or farm solution. In the last one choice your code run on the server. If you develop for Office 365, I recommend to use the App Application Model.