Forwarding our discussion to the list.
Cheers!
Pradeepto
---------- Forwarded message ----------
From: Pradeepto Bhattacharya <prade...@gmail.com>
Date: Wed, Feb 24, 2010 at 2:43 PM
Subject: Re: QFacebookConnect
To: Ahmad Mushtaq <ahmad....@gmail.com>
Heya,
On Wed, Feb 24, 2010 at 2:11 PM, Ahmad Mushtaq <ahmad....@gmail.com> wrote:
> Hei,
> I have create a google group,
> at http://groups.google.com/group/qfacebookconnect
That was awesomely quick :). I just joined as well.
> QVarianList, QVariantHash and other QVariants are currently the only way to
> get the data. I know that this is slow and hurts performance. But I wanted
> to get done with a working version of the API, mimicking as much of the
> iphone api version as possible, thus i resorted to using variants.
Right, I read in the gitorious wiki about why used QVariant and family.
What I failed to understand is how the QVariant is created/populated.
I traced the API and noticed that FBRequest::parseXMLResponse is doing
the math for us but I kinda get lost of after that.
> May be you can propose some better and error safe solution?
I am not sure, if I can help with that. But what I was wondering is if
we could have an "helper" api/classes on top of what qfacebookconnect
that would do all dirty job with QVariant stuff. So as a user/client
of QFacebookconnect, one won't have to iterate through QVariant
containers and would directly fetch data that he/she needs .
Hope I am making sense. I thought of this because while using
qfacebookconnect, I was playing with the sample code, I thought I
would modify it show statuses. Interestingly, the status is stored as
a QVariantHash inside the QVariantList. So one has to parse two
containters to fetch status. Would it be of any use if there can be a
"convenience" api around the QVariant* for various FB stuff?
I really hope I am making some sense. :). Feel free to suggest,
comment and improve/disapprove the idea.
Cheers!
Pradeepto
--
Pradeepto Kumar Bhattacharya
A *Proud* Member of The KDE Project.
The KDE Project : http://www.kde.org
--
Pradeepto Kumar Bhattacharya
A *Proud* Member of The KDE Project.
The KDE Project : http://www.kde.org
The only problem currently I see is that using QVariants hurts
performance, otherwise you just cant be sure, that if the result of
the call you made to fb will result in a list, or just one item! and
then
every item itself can either be a string, or a hash, so I think you
will have to parse out the containers using the .type()
if you go to: http://developers.facebook.com/tools.php
and play around with the test console, you will see that the result
xml sent out by fb is very flexible, and depends on the kind of query
you make.
I am not even sure if i would want to replace QVariants, I am thinking
of making qfacebookconnect available via qml, and i think over there
qvariants might help, i am just not sure about that yet.
-Ahmad
On Feb 25, 6:21 am, Pradeepto Bhattacharya <pradeep...@gmail.com>
wrote:
> Hi Ahmad,
>
> Forwarding our discussion to the list.
>
> Cheers!
>
> Pradeepto
>
>
>
> ---------- Forwarded message ----------
> From: Pradeepto Bhattacharya <pradeep...@gmail.com>
> Date: Wed, Feb 24, 2010 at 2:43 PM
> Subject: Re: QFacebookConnect
> To: Ahmad Mushtaq <ahmad.mush...@gmail.com>
>
> Heya,
>