Attica moved to kdereview

View: New views
7 Messages — Rating Filter:   Alert me  

Attica moved to kdereview

by Bugzilla from gladhorn@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
after spending some time with libattica, we decided that now is a good point to get a review for it and eventually have it used in KDE.

What is libattica?
A library originally started by Cornelius Schumacher to access the api of Open Collaboration Services servers, see the spec here:
http://www.freedesktop.org/wiki/Specifications/open-collaboration-services
At this time that means access to the opendesktop.org and kde-apps.org run by Frank Karlitschek as well as maemo.org websites.
Since the specification is open, more providers are to be expected.
For application developers this means easy access to the services such as Friends, Contents (be it wallpapers, vocabulary files or applications...), Events and Knowledge Base to name just a few.

It is used in the OpenDesktop and Knowledge Base plasmoids.
The new Amarok About dialog uses a local copy of attica already.
See also the contest about integrating the Social Desktop on the dot:
http://dot.kde.org/2009/10/09/social-desktop-winners
We would like to get feedback if the extended about dialog should be made available for all of kde.

Currently libattica comes in two parts, a Qt-only library and a plugin that provides KDE integration.
It would make sense to have the Qt-only library be part of kdesupport and the plugin in KDE proper.
Some things can be found in a branch:
branches/work/attica/kcm - a kcm to controll open collaboration service providers
branches/work/attica/plasma - port of the opendesktop plasmoid to the updated lib
branches/work/attica/ocs - the plasma data engine
branches/work/attica/ocs/example - a simple example how to use attica

Another candidate I'm currently working on with Jeremy is the refactoring of KNewStuff, which will provide some great new features such as server side search (have you ever wanted exactly this script which just fell of the top 100 that was presented in the Get Hot New Stuff dialog?), rating and comments.
Work on knewstuff is being done in a branch: branches/work/knewstuffrefactor

We moved attica into kdereview today.

Eckhart, Frank and I are looking forward to your comments, concerns and suggestions.
Let us know if you're interested in integrating it with your app or need help to get started.

Cheers
Frederik



Re: Attica moved to kdereview

by Albert Astals Cid-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A Dimarts, 3 de novembre de 2009, Frederik Gladhorn va escriure:

> Hi all,
> after spending some time with libattica, we decided that now is a good
>  point to get a review for it and eventually have it used in KDE.
>
> What is libattica?
> A library originally started by Cornelius Schumacher to access the api of
> Open Collaboration Services servers, see the spec here:
> http://www.freedesktop.org/wiki/Specifications/open-collaboration-services
> At this time that means access to the opendesktop.org and kde-apps.org run
> by Frank Karlitschek as well as maemo.org websites.
> Since the specification is open, more providers are to be expected.
> For application developers this means easy access to the services such as
> Friends, Contents (be it wallpapers, vocabulary files or applications...),
> Events and Knowledge Base to name just a few.
>
> It is used in the OpenDesktop and Knowledge Base plasmoids.
> The new Amarok About dialog uses a local copy of attica already.
> See also the contest about integrating the Social Desktop on the dot:
> http://dot.kde.org/2009/10/09/social-desktop-winners
> We would like to get feedback if the extended about dialog should be made
> available for all of kde.
>
> Currently libattica comes in two parts, a Qt-only library and a plugin that
> provides KDE integration.
> It would make sense to have the Qt-only library be part of kdesupport and
> the plugin in KDE proper.
> Some things can be found in a branch:
> branches/work/attica/kcm - a kcm to controll open collaboration service
> providers
> branches/work/attica/plasma - port of the opendesktop plasmoid to the
> updated lib
> branches/work/attica/ocs - the plasma data engine
> branches/work/attica/ocs/example - a simple example how to use attica
>
> Another candidate I'm currently working on with Jeremy is the refactoring
>  of KNewStuff, which will provide some great new features such as server
>  side search (have you ever wanted exactly this script which just fell of
>  the top 100 that was presented in the Get Hot New Stuff dialog?), rating
>  and comments.
> Work on knewstuff is being done in a branch:
>  branches/work/knewstuffrefactor
>
> We moved attica into kdereview today.
>
> Eckhart, Frank and I are looking forward to your comments, concerns and
> suggestions.
> Let us know if you're interested in integrating it with your app or need
> help to get started.

The licensing is unclear, activity.h is GPL2+ while downloaditem.h is LGPL2+

You have one foreach without const & in the "iterator"

Maybe it would make sense to d-pointify Attica:BaseJob::Metadata,
Attica::DownloadUrlDescription, Attica::GetJob, Attica::PostJob

In Attica::DownloadUrlDescription if you put the two bools together your
struct will use less memory

Should downloadUrlDescription(), previewPicture(), license(), author() of
Attica::Content be const?

Should url() in Attica::DownloadItem be const?

Any reason to make Attica::DownloadItem use a QExplicitlySharedDataPointer?

From the application point of view, it would make sense to me that if for
example it makes no sense that the application ever calls
Folder::setMessageCount it should be private and called by a friend class. But
maybe it makes sense calling Folder::setMessageCount and it's ok :D

After a quick look at the API i'm not sure if the Jobs are supposed to be part
of the public API or not. Their headers are installed an the classes exported,
but

GetJob(const QSharedPointer<Internals>& internals, const QNetworkRequest&
request);

seems a bit weird, what's that QSharedPointer<Internals>?

Albert

>
> Cheers
> Frederik
>


Re: Attica moved to kdereview

by Bugzilla from gladhorn@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hola Albert,
thanks a lot for the review!
I hope that we addressed your points by now.

Albert Astals Cid wrote:
> A Dimarts, 3 de novembre de 2009, Frederik Gladhorn va escriure:
>> Hi all,
>> after spending some time with libattica, we decided that now is a good
>>  point to get a review for it and eventually have it used in KDE.
>
> The licensing is unclear, activity.h is GPL2+ while downloaditem.h is
> LGPL2+
Done, we forgot to make it the same everywhere, it's relicensed to LGPL2+ in
agreement with all authors now.

> You have one foreach without const & in the "iterator"
/me hides :D

> Maybe it would make sense to d-pointify Attica:BaseJob::Metadata,
> Attica::DownloadUrlDescription, Attica::GetJob, Attica::PostJob
Mostly done, will be finished tomorrow.

> In Attica::DownloadUrlDescription if you put the two bools together your
> struct will use less memory
Done.
> Should downloadUrlDescription(), previewPicture(), license(), author() of
> Attica::Content be const?
Done.
> Should url() in Attica::DownloadItem be const?
Yes.
> Any reason to make Attica::DownloadItem use a
> QExplicitlySharedDataPointer?
Total nonsense and an oversight by me.
Seems like I wasn't quite awake when writing that class...

> From the application point of view, it would make sense to me that if for
> example it makes no sense that the application ever calls
> Folder::setMessageCount it should be private and called by a friend class.
> But maybe it makes sense calling Folder::setMessageCount and it's ok :D
Since we support creating items and sending them to the server again, most
setters make sense. The case you asked about is indeed questionable.

>
> After a quick look at the API i'm not sure if the Jobs are supposed to be
> part of the public API or not. Their headers are installed an the classes
> exported, but
>
> GetJob(const QSharedPointer<Internals>& internals, const QNetworkRequest&
> request);
> seems a bit weird, what's that QSharedPointer<Internals>?
>
Yep, this is supposed to be used only internally. You just get instances of
these classes back from Attica::Provider. Constructors changed to private or
protected now.

Thanks!

Greetings
Frederik

Re: Attica moved to kdereview

by Bugzilla from sebas@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday 03 November 2009 17:20:15 Frederik Gladhorn wrote:
> after spending some time with libattica, we decided that now is a good
>  point to get a review for it and eventually have it used in KDE.

> Currently libattica comes in two parts, a Qt-only library and a plugin that
> provides KDE integration.
> It would make sense to have the Qt-only library be part of kdesupport and
> the plugin in KDE proper.
> Some things can be found in a branch:
> branches/work/attica/kcm - a kcm to controll open collaboration service
> providers
> branches/work/attica/plasma - port of the opendesktop plasmoid to the
> updated lib
> branches/work/attica/ocs - the plasma data engine
> branches/work/attica/ocs/example - a simple example how to use attica

Any good reasons to not call it libocs? That sounds much more descriptive to me,
given that it's all about Open Collaboration Services. While attica is a nice name,
we should use descriptive names for libraries. Apps can indeed be more creative...
--
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9

Re: Attica moved to kdereview

by Bugzilla from kevin.krammer@gmx.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday, 2009-11-05, Sebastian Kügler wrote:

> On Tuesday 03 November 2009 17:20:15 Frederik Gladhorn wrote:
> > after spending some time with libattica, we decided that now is a good
> >  point to get a review for it and eventually have it used in KDE.
> >
> > Currently libattica comes in two parts, a Qt-only library and a plugin
> > that provides KDE integration.
> > It would make sense to have the Qt-only library be part of kdesupport and
> > the plugin in KDE proper.
> > Some things can be found in a branch:
> > branches/work/attica/kcm - a kcm to controll open collaboration service
> > providers
> > branches/work/attica/plasma - port of the opendesktop plasmoid to the
> > updated lib
> > branches/work/attica/ocs - the plasma data engine
> > branches/work/attica/ocs/example - a simple example how to use attica
>
> Any good reasons to not call it libocs? That sounds much more descriptive
>  to me, given that it's all about Open Collaboration Services. While attica
>  is a nice name, we should use descriptive names for libraries. Apps can
>  indeed be more creative...
Probably depends whether it can be used for any other REST based service, in
which case naming it after one of them might lead to people reinventing the
wheel when searching for a Qt base API for talking to such services.

Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc (197 bytes) Download Attachment

Re: Attica moved to kdereview

by Bugzilla from sebas@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 05 November 2009 19:50:02 Kevin Krammer wrote:

> On Thursday, 2009-11-05, Sebastian Kügler wrote:
> > On Tuesday 03 November 2009 17:20:15 Frederik Gladhorn wrote:
> > > after spending some time with libattica, we decided that now is a good
> > >  point to get a review for it and eventually have it used in KDE.
> > >
> > > Currently libattica comes in two parts, a Qt-only library and a plugin
> > > that provides KDE integration.
> > > It would make sense to have the Qt-only library be part of kdesupport
> > > and the plugin in KDE proper.
> > > Some things can be found in a branch:
> > > branches/work/attica/kcm - a kcm to controll open collaboration service
> > > providers
> > > branches/work/attica/plasma - port of the opendesktop plasmoid to the
> > > updated lib
> > > branches/work/attica/ocs - the plasma data engine
> > > branches/work/attica/ocs/example - a simple example how to use attica
> >
> >
> > Any good reasons to not call it libocs? That sounds much more descriptive
> >  to me, given that it's all about Open Collaboration Services. While
> > attica is a nice name, we should use descriptive names for libraries.
> > Apps can indeed be more creative...
>
> Probably depends whether it can be used for any other REST based service,
>  in  which case naming it after one of them might lead to people
>  reinventing the wheel when searching for a Qt base API for talking to such
>  services.

As far as I know, it's exclusively for OCS. It would of course be cool, if it
supported more than one API/Service, but I don't think it does that (yet?).
--
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9

Re: Attica moved to kdereview

by Bugzilla from gladhorn@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sebastian Kügler wrote:

> On Thursday 05 November 2009 19:50:02 Kevin Krammer wrote:
>> On Thursday, 2009-11-05, Sebastian Kügler wrote:

>> > Any good reasons to not call it libocs? That sounds much more
>> > descriptive
>> >  to me, given that it's all about Open Collaboration Services. While
>> > attica is a nice name, we should use descriptive names for libraries.
>> > Apps can indeed be more creative...
>>
>> Probably depends whether it can be used for any other REST based service,
>>  in  which case naming it after one of them might lead to people
>>  reinventing the wheel when searching for a Qt base API for talking to
>>  such services.
>
> As far as I know, it's exclusively for OCS. It would of course be cool, if
> it supported more than one API/Service, but I don't think it does that
> (yet?).

Nope, currently Open Collaboration Services is the only target.
I think some parts (the generic post and get jobs we have) might be
interesting for other REST API uses though.

I personally find that neither OCS nor Attica convey that much meaning
unless you already have much background knowledge.
How about going with something horrible like libopencollaborationservice?
I'd be happy to hear good name suggestions and not happy about even thinking
about the renaming orgy later on.

Cheers
Frederik