<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
            <title>N9 Developer - Qt Quick best practices, property bindings in QML</title>  
        <link rel="alternate" type="text/html" hreflang="en" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings" />
                        <updated>2011-11-19T16:56:27Z</updated>
    <id>http://blogs.forum.nokia.com,8.9/</id>
    <rights>Copyright (c) 2008 Nokia</rights> 
    <generator uri="http://www.lifetype.net/" version="1.2">LifeType</generator> 

                                    <entry>
            <title>Re: Qt Quick best practices, property bindings in QML</title>
            <link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings#comment30258" />
            <id>tag:www.developer.nokia.com,2011-11-19:30258</id>
                        <updated>2011-11-19T16:56:27Z</updated>
            <published>2011-11-19T16:56:27Z</published>
            <summary type="html"> What is cool with states is when you need animations that are different from one transition to another. 
 Also, if more than one properties are need conditionals, it could be a bit cumbersome to ...</summary>
            <author>
                <name>pjturpeau</name>
                <uri>http://www.developer.nokia.com/Community/Blogs/blog/n9-developer</uri>
            </author>
            <content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer">
                &lt;p&gt;What is cool with states is when you need animations that are different from one transition to another.&lt;/p&gt;
&lt;p&gt;Also, if more than one properties are need conditionals, it could be a bit cumbersome to maintain/update the code while prototyping your whole component logic...&lt;/p&gt;
&lt;p&gt;I&#039;ve no preference on one from another. However, from a performance point of view, a more detailed comparison might be interesting.&lt;/p&gt;

            </content>
        </entry>
                                    <entry>
            <title></title>
            <link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings#comment30253" />
            <id>tag:www.developer.nokia.com,2011-11-18:30253</id>
                        <updated>2011-11-18T20:34:24Z</updated>
            <published>2011-11-18T20:34:24Z</published>
            <summary type="html"> Michael, generally I do agree with you, not least because explicit states tend to result in more lines of code. I came across the specific situation I described recently in some code that ...</summary>
            <author>
                <name>ilkkal</name>
                <uri>http://www.developer.nokia.com/Community/Blogs/blog/n9-developer</uri>
            </author>
            <content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer">
                &lt;p&gt;Michael, generally I do agree with you, not least because explicit states tend to result in more lines of code. I came across the specific situation I described recently in some code that suffered a bit from ad-hoc requirements specification, and I think with a little refactoring the whole problem would&#039;ve gone away. It&#039;s just strange that explicit states are so redundant: they&#039;re not too useful as data, and neither are they very handy as API.&lt;/p&gt;

            </content>
        </entry>
                                    <entry>
            <title></title>
            <link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings#comment30252" />
            <id>tag:www.developer.nokia.com,2011-11-18:30252</id>
                        <updated>2011-11-18T18:34:50Z</updated>
            <published>2011-11-18T18:34:50Z</published>
            <summary type="html"> @ilkkal, I would still consider property bindings more robust, even in that case. 
 If the conditionals for the property bindings become too complex, then the introduction of new custom ...</summary>
            <author>
                <name>mikhas4711</name>
                <uri>http://www.developer.nokia.com/Community/Blogs/blog/n9-developer</uri>
            </author>
            <content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer">
                &lt;p&gt;@ilkkal, I would still consider property bindings more robust, even in that case.&lt;/p&gt;
&lt;p&gt;If the conditionals for the property bindings become too complex, then the introduction of new custom properties can help to simplify (though any new property means new state, so there&#039;s a natural trade-off).&lt;/p&gt;
&lt;p&gt;Picking up your example where &quot;one property has major effects on layout, label texts etc&quot;: This sounds as if you were using a dedicated Style component, and that&#039;s one of the places where I really like to use property bindings.&lt;br /&gt;
Then, whenever the Style component changes, I don&#039;t have to worry that some dependent property will be forgotten in the update.&lt;/p&gt;
&lt;p&gt;If we consider transition animations (or properties that are explicitly used for transition animations), then that&#039;s *usually* not part of your core application logic, but rather pretty isolated UI effects.That is, your application should still work even if you removed the transition animations.&lt;/p&gt;
&lt;p&gt;For those, it can make more sense to use explicit state handling instead.&lt;/p&gt;

            </content>
        </entry>
                                    <entry>
            <title></title>
            <link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings#comment30248" />
            <id>tag:www.developer.nokia.com,2011-11-18:30248</id>
                        <updated>2011-11-18T10:43:23Z</updated>
            <published>2011-11-18T10:43:23Z</published>
            <summary type="html"> Do you find that bindings should win over state handling even when the properties of a large number of elements depend on some property change? Say there is a property that has major effects on ...</summary>
            <author>
                <name>ilkkal</name>
                <uri>http://www.developer.nokia.com/Community/Blogs/blog/n9-developer</uri>
            </author>
            <content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer">
                &lt;p&gt;Do you find that bindings should win over state handling even when the properties of a large number of elements depend on some property change? Say there is a property that has major effects on layout, label texts etc. Would you rather sprinkle the code with conditionals, or have all the changes grouped as PropertyChanges in a State?&lt;/p&gt;

            </content>
        </entry>
                                    <entry>
            <title>table fixed</title>
            <link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings#comment30225" />
            <id>tag:www.developer.nokia.com,2011-11-14:30225</id>
                        <updated>2011-11-14T09:05:02Z</updated>
            <published>2011-11-14T09:05:02Z</published>
            <summary type="html"> thank you for the pointer. 
</summary>
            <author>
                <name>lavonius</name>
                <uri>http://www.developer.nokia.com/Community/Blogs/blog/n9-developer</uri>
            </author>
            <content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer">
                &lt;p&gt;thank you for the pointer.&lt;/p&gt;

            </content>
        </entry>
                                    <entry>
            <title></title>
            <link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings#comment30218" />
            <id>tag:www.developer.nokia.com,2011-11-12:30218</id>
                        <updated>2011-11-12T17:51:46Z</updated>
            <published>2011-11-12T17:51:46Z</published>
            <summary type="html"> I suppose there is a mistake in the table. Istead of  -5    -3    -2   should be  -5    -3    2 
</summary>
            <author>
                <name>truf</name>
                <uri>http://www.developer.nokia.com/Community/Blogs/blog/n9-developer</uri>
            </author>
            <content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer">
                &lt;p&gt;I suppose there is a mistake in the table. Istead of  -5    -3    -2   should be  -5    -3    2&lt;/p&gt;

            </content>
        </entry>
                                    <entry>
            <title>security testing</title>
            <link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer/2011/11/11/qt-quick-best-practices-property-bindings#comment30203" />
            <id>tag:www.developer.nokia.com,2011-11-11:30203</id>
                        <updated>2011-11-11T17:27:06Z</updated>
            <published>2011-11-11T17:27:06Z</published>
            <summary type="html"> testing 
</summary>
            <author>
                <name>NokiaSecuirty</name>
                <uri>http://www.developer.nokia.com/Community/Blogs/blog/n9-developer</uri>
            </author>
            <content type="text/html" xml:lang="en" xml:base="http://www.developer.nokia.com/Community/Blogs/blog/n9-developer">
                &lt;p&gt;testing&lt;/p&gt;

            </content>
        </entry>
    </feed>