[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: applet browser: code complexity in the data model
From:       Ana_Cecília_Martins_Barbosa <anaceciliamb () gmail ! com>
Date:       2009-06-29 13:28:27
Message-ID: df42ce2e0906290628p4107049dj17d59669af18d802 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi!
First of all, thank you for your feed back on the code, that was necessary
by now. As a freshgirl I need to be put in line by whoever feels like I need
to (mostly ivan feels like everyday (kidding!) :P) and that's a nice thing
to me cause: I can get better and used to the way you work here, and I feel
closer to all of this. :)

so .. code complexity.
>
> the code structure of the old applet dialog was highly engineered with
> several
> layers of indirection in the code. it was not easy to get into and that,
> coupled with "well, it basically works as it is now", is why it never
> really
> got much work done on it.


Well, yes. It took me some good, good time to look into that. As I was the
one to work with it, I really digested the code and made it my everyday
reading. I was able to make some drawings out of the architecture of the
code and some out of the execution flow and I almost post it on my blog
(don't know why I didn't). But I was very happy to be able to understand the
whole thing. I was reeally satisfied with that - ivan knows that. :)

we should try and avoid the same situation happening again and keep the code
> as straight-forward as possible.


I swear I was trying!


> get rid of KCategorizedItemsViewModels::DefaultItemModel.


Ok. Agreed.

in fact, forget about PlasmaAppletItemModel being a QStandardItemModel. it's
> just overhead in this case: we already have a perfect container object. so
> PlasmaAppletItemModel (PAIM? :) should just subclass QAbstractItemModel.


In this case I have to override all the functions needed to make a model
work, right?
I didn't really get this... Why is QStandardItemModel overhead again? I
believe you, but just want to understand :)

next, get rid of PlasmaAppletItem. we don't need it.


Whaat? I loved PlasmaAppletItem! I simply called
applet.anythingyouwannaknow() and it would all magically come!
No, I'm kidding. ->

then implement data() such that the index.row() refers the index in the
> plugin
> info list, and the column to the various bits of data.


This make all the sense and would be simpler and as useful as the
PlasmaAppletItem.
But what happens when I want to know how many of a certain applet is
running? Or like the mock introduced: how many of and where are them?
Wouldn't it be better if those informations were stored somewhere?

i'm quite happy and willing to work on this with you.


Cool! :D


> if you tell me what your
> working hours are, we can hook up on irc. the above is really 2-3 hours of
> work at most, however.


Well, from now to the day I get on the plane to go to aKademy I can't do
much work.. There are 2 projects and 1 exam to do to the university untill
thursday (I don't even know how am I gonna accomplish all of that). But
after that it's total dedication to gsoc, so my working hours will be many
and then we can combine the working hour :)
Also, let's try to make good use of the Working Days on akademy!

[Attachment #5 (text/html)]

Hi! <br>First of all, thank you for your feed back on the code, that was necessary by \
now. As a freshgirl I need to be put in line by whoever feels like I need to (mostly \
ivan feels like everyday (kidding!) :P) and that&#39;s a nice thing to me cause: I \
can get better and used to the way you work here, and I feel closer to all of this. \
:)<br> <div class="gmail_quote"><br><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> so .. code complexity.<br>
<br>
the code structure of the old applet dialog was highly engineered with several<br>
layers of indirection in the code. it was not easy to get into and that,<br>
coupled with &quot;well, it basically works as it is now&quot;, is why it never \
really<br> got much work done on it.</blockquote><div><br>Well, yes. It took me some \
good, good time to look into that. As I was the one to work with it, I really \
digested the code and made it my everyday reading. I was able to make some drawings \
out of the architecture of the code and some out of the execution flow and I
almost post it on my blog (don&#39;t know why I didn&#39;t). But I was very
happy to be able to understand the whole thing. I was reeally satisfied
with that - ivan knows that. :)<br><br></div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> we should try and avoid the same situation happening again and \
keep the code<br> as straight-forward as possible. </blockquote><div><br>I swear I \
was trying!<br></div><div> <br></div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;">

get rid 
of KCategorizedItemsViewModels::DefaultItemModel.</blockquote><div><br>Ok. \
Agreed.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

in fact, forget about PlasmaAppletItemModel being a QStandardItemModel. it&#39;s<br>
just overhead in this case: we already have a perfect container object. so<br>
PlasmaAppletItemModel (PAIM? :) should just subclass \
QAbstractItemModel.</blockquote><div><br> In this case I have to override all the \
functions needed to make a model work, right? <br>I didn&#39;t really get this... Why \
is QStandardItemModel overhead again? I believe you, but just want to understand \
:)<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> next, get rid of \
PlasmaAppletItem. we don&#39;t need it.</blockquote><div><br>Whaat? I loved \
PlasmaAppletItem! I simply called applet.anythingyouwannaknow() and it would all \
magically come!<br>No, I&#39;m kidding. -&gt;<br> <br></div><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> then implement data() such that the index.row() \
refers the index in the plugin<br> info list, and the column to the various bits of \
data.</blockquote><div><br>This make all the sense and would be simpler and as useful \
as the PlasmaAppletItem. <br>But what happens when I want to know how many of a \
certain applet is running? Or like the mock introduced: how many of and where are \
them? Wouldn&#39;t it be better if those informations were stored somewhere?<br> \
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> i&#39;m quite happy and willing \
to work on this with you. </blockquote><div><br>Cool! :D<br> </div><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> if you tell me what your<br>
working hours are, we can hook up on irc. the above is really 2-3 hours of<br>
work at most, however.</blockquote><div><br>Well, from now to the day I get on the \
plane to go to aKademy I can&#39;t do much work.. There are 2 projects and 1 exam to \
do to the university untill thursday (I don&#39;t even know how am I gonna accomplish \
all of that). But after that it&#39;s total dedication to gsoc, so my working hours \
will be many and then we can combine the working hour :)<br> Also, let&#39;s try to \
make good use of the Working Days on akademy!<br></div></div><br>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic