So the main difference between Classic and Touch UI is the dialog nodes.
A dialog that is built for the Touch UI is defined by using nodes of type un:structured. You define the type of control on the Touch UI dialog by setting the node's sling:resourceType property. For example, to define a text field on a Touch UI dialog, set the sling:resourceType property to granite/ui/components/foundation/form/textfield.
On other hand - a dialog built for Classic uses xtypes and ExtJS.
Both are JCR node structures. In Classic, you can code using ExtJS and define custom xtypes. In Touch UI, you can code against the Granite APIs. Both of these APIs are meant for code to run on Author - not Production or in the component application logic. (You cannot run ExtJS code in a component's JSP. You run it in a JS file within a clientlib associated with the component.)
You can see this in this community article:
https://helpx.adobe.com/experience-manager/using/creating-touchui-component.html
The actual component logic (the app logic that renders the component) is the same for both Touch UI and Classic UI. Both ExtJS and Granite APIs are not meant to run on Production. Therefore they are not used within the component's JSP or Sightly.
Hope this helps.