← Back to team overview

ubuntu-phone team mailing list archive

Re: U1dB Documentation and Advice

 

I do believe you are highly mistaken.

It is true QT For Android can be painful when leaving the comfortable
confines of non-gui stuff because more probably than not you have to
resort to JNI work. i.e. Multimedia/3D/OpenCL/OpenGL, databases.  That
certainly would affirm your limited api difficulties with persistence if
you don't want to delve into Android JNI stuff and just stick to qt api
stuff.

However you should feel more comfortable with the QT for Ubuntu
Touch(AKA ubuntu-sdk) and the Desktop Ubuntu non-gui apis because they
are one and the same non-qt non-gui apis. i.e.
multimedia/3D/OpenCL/OpenGL.  Canonical have already
re-targetted/compiled many of main desktop libs for armhf.  THAT IN
ITSELF WILL BE THE STRONGEST SELLING POINT FOR UBUNTU TOUCH.  Ubuntu
Touch saves the C++ developer time because the only parts you need to
relearn are the newer Touch APIs and non-desktop mobile apis(SMS, PHONE).

>From the sounds of it you don't want to be limited to using *U1dB *and
*Qt LocalStorage*.  No problem.
*****You can pick your favourite C++ based persistent solution from the
standard Ubuntu repositories but targetted for Ubuntu Touch.  For
example you can use mongodb's c++ apis and make them talk to a mongodb
server that you also install on the ubuntu touch device like any other
Linux box.  You could also make the mongodb api's talk to a remote cloud
storage which is cool these days.

There is also work to bridge qt with golang and you could possibly make
an app on ubuntu touch with golang as a result.  Or if you don't want to
use golang for the gui you can run golang non-gui stuff as a system
command which you pass input to it through files.  If you like perl,
python, ruby, lua whatever you want you can do the same from ubuntu
touch because the armhf repositories have all these are your disposal
from what I have seen.  If you feel more comfortable doing database
access from a different language than c++ you could if you want to.

Make no bones about it, qt as a gui-creation tool for Ubuntu
Touch/Standard Ubuntu/Android is definitely a good choice, but it will
never be the only one and thank the community for that. HINT: I have
seen gtk plumbing with the armhf binaries installed in ubuntu touch and
there also happens to be a golang-gtk binding out there also.  I still
haven't warmed up to QML/Declarative model, but I don't have to.  There
are ways to continue on with the pre-QML era qt controls to make ui's
through the designer or dynamically at run-time.  You can also choose to
mix and match QML with pre-QML c++ stuff.

Cheers,
David Marceau


On 01/04/2014 11:45 AM, Nekhelesh Ramananthan wrote:
> Hello everyone,
> 
> This email is concerning persistent storage options for an Ubuntu Touch
> application developer. I hope this doesn't turn out to be a big email, but
> in any case here is a short summary of this email. What is the future of
> U1dB-Qt? Currently the documentation and tutorials for using U1dB is quite
> limited and lacking in several area. Would it be possible to engage with
> the original U1dB-Qt developers to improve this?
> 
> Here is the long version, Currently there are two options for persistent
> storage in use which are *U1dB *and *Qt LocalStorage*. I believe that core
> applications currently make use of Qt LocalStorage extensively. However it
> has its limitations which are the inability to sync data across devices and
> its rather messy syntax involving sqlite database. U1dB-Qt on the other
> hand was built from ground up to provide a simpler declarative syntax like
> QML and has sync capabilities which makes it a compelling option. However
> one of the areas that U1dB suffers from is documentation and tutorials. It
> is rather quite surprising how some of the Ubuntu App Developer 2013
> contestants managed to use it in their applications. I did find some links
> to U1dB-Qt resources [1],[2],[3] which help a little but is still missing a
> big chunk of features. Can we expect U1dB-Qt to be actively encouraged in
> the future for persistent storage?
> 
> If I may, I like to make a proposal to use this email thread to engage with
> the original/current U1dB-Qt developers to improve the documentation to a
> point where new developers can comfortably use it in their applications.
> Please do note that, I am not looking to just assign work items to others
> and see where it goes. I am personally willing to be involved to work
> (document) on this project. However I am no U1dB expert which is why I need
> the U1dB developers help. If you think this is feasible please let me know
> and I will get started with a blueprint to keep track of the work needed
> and engage with the community. As always any help is welcome. @Michael
> Hall, Stuart Langridge are some obvious candidates that I can think of at
> the moment :-).
> 
> Some tasks that come from the top of my head are,
> 1. Integrate documentation into developer.ubuntu.com
> 2. Have some basic tutorials showing how to create U1dB documents to store
> basic data, retrieving stored data and deleting data
> 
> [1]: http://people.ubuntu.com/~mhall119/u1db-qt/u1db-qt-cheatsheet.html
> [2]:
> http://bazaar.launchpad.net/~uonedb-qt/u1db-qt/trunk/files/head:/examples/
> [3]:
> http://wordchainapp.tumblr.com/post/60178716314/using-u1db-to-store-data-in-word-chain
> 
> Cheers,
> Nekhelesh
> 
> 
> 



Follow ups

References