I started to study how we can reproduce our project in a SharePoint 2013 app. I've made some test and I saw that the provider hosted app generates a normal web application that will be hosted outside SharePoint environment.
I have some question about.
How create site pages?
Usually in a farm solution I create a Visual Web Part and the site page using CAML declarative mode with a module and a base layout aspx page.
How can I reproduce it in this new context? Can I to create a client web part and the page as before?
How to get SPContenxt?
I saw that when I start my project Default.aspx opens with SPHostUrl query string that is used to get ClientContext in Page_Load event. So, wherever I need to interact with SharePoint I have to open the page with this query string? Is there some other "more elegant" way to generate this query string instead to hard code it? And I have to refresh it? I saw method to refresh the access token.
Get SPHostUrl in web application
I find that in mark up I can create a link link with href='javascript:location.href="Page.aspx" + location.search' that redirects me to Page.apsx with SPHostUrl query string, is there a way to do it also in server side code?
Web service
Cannot add ISAPI folder anymore, have I to create a custom WCF service and deploy it in the remote web app url?
Thank you for your help.