Custom PHP vs Drupal Workflow for a Web Application not Websites
Your questions are somewhat vague but I'll provide some examples:


For instance I have a site that from a CSV file allows certain visitors emailed access keys to access a Webform and its tracked via a custom Node that has an embedded field collection and this relationship + status is tracked via a Relation. I use the Migrate module to add or update allowed visitor information from the CSV.


I use the Webform API, EntityFieldQuery's and drupal hooks to do my webapp business logic. Drupal core and contrib modules provide additional APIs. I use Views Send for bulk emailing.


I have another form site for class reviews for a campus. I use Migrate to pull $form structure info from a 3rd party survey database and then use a custom drupal entity and the drupal Form API to build a custom form from remote data. The remote database has a custom schema for say: Question, Options, Question position in Form, Form ID, etc ... it gets converted into a drupal $form array with some simple PHP in a Migration class. Again I use Relation to track what the student has completed between a uid and a nid. I use the drupal authorization mechanisms such as authmaps to integrate our local LDAP server.
On another site students should fill out like 10 content types after login. I use hook_menu_alter and a cookie to assure a student has Opted-In daily to EULA's for uploaded content. Then I use the core Form API to link 10 node edit forms on submission from 1 to another. Creating a kind of workflow for the student.


There are numerous times where knowing the Drupal contributed modules that help you create business logic, such as: Rules, Triggers, Rules Link, Maestro and WorkBench all help you create types of business logic.

Modules like References, Relation, Field Collection, Paragraphs let you create "embedded relationships". Mix and match as you need.

... I got tired of linking contrib modules :P