← Back to team overview

ubuntu-phone team mailing list archive

Re: [Core Apps] Template Update

 

I recommend to check out the source of the notepad-qml app and the example/demo apps from the UI Toolkit packages.

Prettiness is :) very subjective, but in my opinion the code of these apps are pretty.

Portability was definitely a very important argument when we decided to build the application development story of the Ubuntu Phone on Quick2. Also the UI Toolkit the API compatibility was and is a top priority: http://qt-project.org/wiki/QQUIComponentsComparison

One important aspect of portability is how easy is to deploy the application under development on a phone device or on any device. If you stick to QML than it is a copy and a "run" command, but if you have C++ than you need to cross-compile the code, make sure that you link against the right libraries, etc, etc ...

Zoltán


On 02/13/2013 05:59 PM, Nejc wrote:
I have to agree with ajalkane on this. Doing business logic in C++ also results in much prettier code. Data model management is also very limited in QML. And it's not that I'm used to C++, I once tried doing as much as possible in QML with non-satisfying results and I consider myself experienced in QML.

Another thing is, Ubuntu should aim at easy portability with other QtQuick platforms. If only UI is written in QML, it's just easy UI rewrite. Otherwise, you have to mess with your business logic code, because it's integrated with UI.

On 13. Feb 2013, at 16:46 , ajalkane <ajalkane@xxxxxxxxx <mailto:ajalkane@xxxxxxxxx>> wrote:

My experience is that pure QML/JS solution is suitable to only quite simple applications. I have myself found the best practice to be to do the UI part in QML/JS, and have the "business logic" and models in C++. In fact, for portability between platforms I think doing as little as possible in QML is preferrable. Ie. it should contain only the UI code.

Your mileage may vary, and I'm certainly looking forward how this approach works... but I do hope implementing a C++ backend is still possible and not something that's overly complicated or impossible. C++ plugins are perhaps more (coding) overhead in many cases than should be necessary.


On Wed, Feb 13, 2013 at 5:27 PM, Zoltán Balogh <zoltan.balogh@xxxxxxxxxxxxx <mailto:zoltan.balogh@xxxxxxxxxxxxx>> wrote:

    Hello Frank,

    Please bother the SDK team :) the best what you and any Ubuntu
    Phone application developer can do is to bother us with questions
    and suggestions.

    Actually the QML/JS does not rule out the finely crafted C++
    plugins. Just the opposite!

    We expect finely  crafted C++ plugins designed in a generic way
    so they could be reused by other applications and they could be
    contributed to the SDK. What we do not suggest is to use C++
    where pure QML offers a viable solution.

    The shift from a procedura to a declarative programming mind is
    not necessarily trivial for a coder who have been doing C++ apps
    for years. That is why I would suggest to all Ubuntu Phone app
    developers to start with small and easy applications and discover
    the strength of the declarative programming.

    Just translating a Qt/C++ code to QML/JS might not lead to the
    best results.

    cheers,

    Zoltán





    On 02/13/2013 03:30 PM, Frank Mertens wrote:

        -----BEGIN PGP SIGNED MESSAGE-----
        Hash: SHA1

        Hi David,

        thanks for the quick answer. I guess I'm trying to rewrite my
        C++ models in JS then.
        Let's see how much we can get out of QML/V8 when the first
        phone image is released.
        Thereafter we can then have a flame war on if we go purely
        QML/JS or have lots
        of finely crafted C++ plugins;) Until then don't bother the
        SDK team to much! I really appreciate
        the progress with the ubuntu-components -- gives me sleepless
        nights, when I think what I could
        do with these.

        Greetings,
        Frank

        - -- gplus.to/frankencode <http://gplus.to/frankencode>
        frankencode@freenode
        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v1.4.12 (GNU/Linux)
        Comment: Using GnuPG with undefined - http://www.enigmail.net/

        iQEcBAEBAgAGBQJRG5VZAAoJEMYU5+LCaHFcG8gIAKV7LddXISjrW647DyqadgdC
        g3rd7A3ovUE4oZ/4xzcqQDxUcExgxVNZXwbqycWzMJK2RrvavmR0BXyHisxedDMK
        cD/+ge9NdlYnuNc6wL6wvdBFJpF27/hOyKh4SWv/H4BEYNiHJ8PasS/fjRLE+2sM
        CQtbTfmPVC4Yq17xjyb6ZJa6OJvsUElnadSCK32ouKJSuCLKCRdepybGl6YCcZnr
        rrZNOVC86IaYQP1veisJPPdfxCT5baHET0JqWfoO6Bl52kMYif6Vbr0++eEYQnq0
        bQCDH38R1PXXTXQp3D15pDZ1Lg6UYyed3Ejfha//vYSFrLMNFTPioUDkpqw/t5s=
        =mJ1+
        -----END PGP SIGNATURE-----



-- Mailing list: https://launchpad.net/~ubuntu-phone
    <https://launchpad.net/%7Eubuntu-phone>
    Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
    <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
    Unsubscribe : https://launchpad.net/~ubuntu-phone
    <https://launchpad.net/%7Eubuntu-phone>
    More help   : https://help.launchpad.net/ListHelp


--
Mailing list: https://launchpad.net/~ubuntu-phone <https://launchpad.net/%7Eubuntu-phone> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx> Unsubscribe : https://launchpad.net/~ubuntu-phone <https://launchpad.net/%7Eubuntu-phone>
More help   : https://help.launchpad.net/ListHelp





Follow ups

References