<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Pure QML approach for creating reusable business objects in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792518#M1091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on what I've seen on various sites, the advice seems to be you create your business objects in C++, then expose these to QML. Unfortunately, if we go down that path we lose AppStudio Cloud Make which isn't an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a pure QML approach for defining business object types, and instantiating such types from some data source (RDMS, XML, etc.)? Ideally I'd like to be able to plug these into a ListModel, for example, and re-use these across different app projects across an enterprise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2016 03:26:40 GMT</pubDate>
    <dc:creator>HeathcliffRongo</dc:creator>
    <dc:date>2016-04-06T03:26:40Z</dc:date>
    <item>
      <title>Pure QML approach for creating reusable business objects</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792518#M1091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on what I've seen on various sites, the advice seems to be you create your business objects in C++, then expose these to QML. Unfortunately, if we go down that path we lose AppStudio Cloud Make which isn't an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a pure QML approach for defining business object types, and instantiating such types from some data source (RDMS, XML, etc.)? Ideally I'd like to be able to plug these into a ListModel, for example, and re-use these across different app projects across an enterprise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 03:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792518#M1091</guid>
      <dc:creator>HeathcliffRongo</dc:creator>
      <dc:date>2016-04-06T03:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Pure QML approach for creating reusable business objects</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792519#M1092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heathcliff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In AppStudio for ArcGIS, you currently have available to you &lt;A href="http://doc.qt.io/qt-5/qmltypes.html"&gt;all of the features in the Qt QML API &lt;/A&gt;as well as the power of the ArcGIS Runtime and the AppStudio Framework.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What specific functionality are you missing? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can already populate a ListModel in QML from XML: &lt;A href="http://doc.qt.io/qt-5/qml-qtquick-xmllistmodel-xmllistmodel.html" title="http://doc.qt.io/qt-5/qml-qtquick-xmllistmodel-xmllistmodel.html"&gt;XmlListModel QML Type | Qt Quick 5.6&lt;/A&gt;, or does your project require something more?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hannah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 04:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792519#M1092</guid>
      <dc:creator>HannahFerrier</dc:creator>
      <dc:date>2016-04-06T04:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pure QML approach for creating reusable business objects</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792520#M1093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A bit of a contrived example, but say I have a business type called Person, that has the following attributes: FirstName, LastName, DateOfBirth, Gender. In c# for example, you could implement a POCO like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class Person {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string FirstName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string LastName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date DateOfBirth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string Gender;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My understanding is that everything is visual in QML, so how do a implement a non-visual data structure such as Person. Once defined, the intention would be to use it in other apps that also need to know what a Person type is, and also be able to use it as a model for List, Grid or even custom views.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess what I'm trying to say is I want to separate business and UI/presentation layers using pure QML. As mentioned previously, my impression is that you need to use C++ to implement business layer logic, but don't want to go down this path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 04:53:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792520#M1093</guid>
      <dc:creator>HeathcliffRongo</dc:creator>
      <dc:date>2016-04-06T04:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pure QML approach for creating reusable business objects</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792521#M1094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can build powerful apps using just QML and JavaScript. And not all QML is visual - to create your own QML component, just use an Item without setting any visual elements. E.g.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;import QtQuick 2.4&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;Item {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: _person&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;&amp;nbsp;&amp;nbsp; property string firstName: "Hannah"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;&amp;nbsp;&amp;nbsp; property string lastName: "Ferrier"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Segoe UI',sans-serif; color: black;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;Once you have created your component, you can save it in a QML file and copy this file into as many different projects as you want. Same with JavaScript - write your code once and then copy the files to be used in different projects.&lt;/P&gt;&lt;P style="margin-top: 2.0pt; margin-bottom: 2.0pt;"&gt;&lt;/P&gt;&lt;P&gt;Further reading: &lt;A href="http://doc.qt.io/qt-5/qml-qtquick-item.html" title="http://doc.qt.io/qt-5/qml-qtquick-item.html"&gt;Item QML Type | Qt Quick 5.6&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 05:28:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792521#M1094</guid>
      <dc:creator>HannahFerrier</dc:creator>
      <dc:date>2016-04-06T05:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pure QML approach for creating reusable business objects</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792522#M1095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Hannah. I had looked at Item initially, but wasn't sure if it was appropriate based on the description saying it was the "base type for all visual items". I'll give that approach a try, cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 05:43:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/pure-qml-approach-for-creating-reusable-business/m-p/792522#M1095</guid>
      <dc:creator>HeathcliffRongo</dc:creator>
      <dc:date>2016-04-06T05:43:36Z</dc:date>
    </item>
  </channel>
</rss>

