This is a really good video on the new app model in Sharepoint 2013 :
So maybe you decided life was too short to watch the video, what did it say ?
Custom application code no longer lives inside SharePoint ( which is a good thing for different reasons, one being the stability of share-point )
There is a choice of architecture on how you host your app :
You can create extensions apps that add extra actions to context menus on documents and items.
More likely you can go for a provider hosted app.
or they can be App Parts – thats a piece of UI you can choose to insert into existing Sharepoint pages you created ( it lives in an IFrame ).
With provider hosted apps you can also write your own server-side code in your language of choice. Share-point doesn’t care because its completely separate. You get to bring your own hosting infrastructure.
Or you might use auto hosted app. If you are selling your app to 100 customers, each time a customer installs it they get their own automatically provisioned website on Azure, with an optional SQL server instance. Means you dont have to worry about customerA seeing customer Bs data ( multi tenant ). But you are tied into Microsofts hosting infrastructure.
Whatever you choose ( share-point hosted or provider hosted or auto hosted ) your code ( Server or client side ) needs to communicate with share-point.
To be continued…..