Its just a copy-paste from one of the adobe's sites, explaining the diferences between Touch and Classic UI
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.
Note:
When building a dialog for the Touch UI view, you define the type of control (for example, a text field) by setting the sling:resourceType property. In contrast, when building a dialog for the classic view, you define the type of control by setting its xtype property. You set both properties in the following sections. For a listing of all Granite objects, see Granite Reference.
The following illustration shows the JCR nodes of the component created in this development article.
As you can see in the previous illustration, there are two JCR branches that are related to the component's dialog:
/apps/mywebsite2/components/herotext2/cq:dialog
/apps/mywebsite2/components/herotext2/dialog
Both of these dialogs are required when developing an AEM component. The first branch defines the component's dialog used in the Touch UI environment. The second branch defines the component's dialog used in the AEM classic view. Therefore to use the component in both AEM views, you need to create both JCR node branches.
So... summarizing, you need to have two dialogs defined if you want them to work on both UIs.