No subject


Tue Jun 24 01:01:01 CEST 2008


    if (d->package && d->configXml) {
        QString uiFile = d->package->filePath("mainconfigui");
        if (uiFile.isEmpty()) {
            return;
        }

        KConfigDialog *dialog = new KConfigDialog(0, dialogId,
d->configXml);
        dialog->setWindowTitle(windowTitle);
        dialog->setAttribute(Qt::WA_DeleteOnClose, true);

        QUiLoader loader;
        QFile f(uiFile);
        if (!f.open(QIODevice::ReadOnly)) {
            delete dialog;

            if (d->script) {
                d->script->showConfigurationInterface();
            }
            return;
        }

Why does this code suddenly lurch off into calling
showConfigurationInterface(); if the scripting interface is being used? If I
have configXml set I assume it means I actually want to dynamically load the
.ui and .kcfg files and not have to intervene. I actually might want my
scripting api to see a hash table of the config options if it doesn't have
all the KConfigSkeleton classes wrapped. I we add KConfig specific calls to
the ScriptEngine api you said last time I asked that it might mean it wasn't
general enough to cater for non-Qt/KDE widgets such as dashboard. So how can
the same api be just right for those entirely alien apis, and at the same
time be good for near-KDE type apis.

The script engine interface makes assumptions about using dynamically loaded
.ui files in other places when the Python, Ruby, C# and Java languages have
all got perfectly good versions of the uic compiler:

void Applet::Private::setupScriptSupport()
{
   ...
    if (!package->filePath("mainconfigui").isEmpty()) {
        q->setHasConfigurationInterface(true);
    }

The point I am making is that nobody is using this code and it isn't
receiving any developer/user feedback like the rest of Plasma is, and points
like this aren't being addressed. If we leave it until 4.2 we will only have
one opportunity to get it right.


>
> > change. All I know is that the current group are all 100% 'ninja' to use
> > Aaron's terminology and would expect to be able to use the full C++ api.
> So
>
> and we'll never get the other 98% of people unless we adjust ourselves from
> catering to those people.

Well, that's your theory, and I have expectations based on understanding the
current Ruby programmer user base. Until we have practical experience and
have actually expanded the user base by 100x I don't think it is possible to
argue one way or the other.


>
>
> > my plan for KDE 4.1 is to try and provide both a ScriptEngine based api,
> > and the full C++ api (with or without proper plasma packaging), and get
> > something moving.
>
> cool; i guess that answers my what's actually read question above.
>
> > In a couple of weeks we are having a hacker sprint in Berlin with a lot
> of
> > the bindings guys (python, ruby, c# and php) and Kross too, and I would
> be
> > very keen on discussing there what to do about Plasma bindings for KDE
> 4.1.
>
> i just hope that the point, purpose and advantage of the ScriptEngine
> strategy
> isn't lost because people are still thinking about things in the
> traditional
> manner of "wrap an API, it's what we want!" versus "define an API, it's
> what is
> manageable and increases the audience"

I'm afraid it the purpose and advantage is lost because we have no practical
experience. It may well be true that your ideas will work, but all I can say
is that ideas about what end user programming should be about have a very
long and distinguished history of being wrong. A good example is AppleScript
with all those wonderful english-like constructs, which is actually pretty
end-user hostile in practice as far as I know. Apple currently have a visual
development tool at present for end users ,and maybe the best answer for
Plasma would be to have something like that. Until we start trying things
out, make mistakes and getting user feedback, I regard talk about increasing
the audience as just talk. If we leave it all until 4.2 we will only really
have one shot.

-- Richard

------=_Part_33515_20951018.1214341938247
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<br><br><div class="gmail_quote">2008/6/24 Aaron J. Seigo &lt;<a href="mailto:aseigo at kde.org">aseigo at kde.org</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tuesday 24 June 2008, Richard Dale wrote:<br>
&gt; 2008/6/23 Aaron J. Seigo &lt;<a href="mailto:aseigo at kde.org">aseigo at kde.org</a>&gt;:<br>
&gt; &gt; On Monday 23 June 2008, Janz wrote:<br>
&gt; &gt; &gt; give any hint) and couldn&#39;t find about how to get started with a<br>
&gt; &gt; &gt; non-C++ plasmoid. I saw a few examples (tiger JS plasmoid and all of<br>
&gt; &gt; &gt; those in script/ on svn playground) but I can&#39;t install them under KDE<br>
&gt; &gt; &gt; 4.1 beta Kubuntu package<br>
&gt; &gt;<br>
&gt; &gt; we actually have a plasmapkg application in kdebase now that can install<br>
&gt; &gt; such<br>
&gt; &gt; packages.<br>
&gt;<br>
&gt; I would like to be able to use the plasapkg packaging mechanism for non-C++<br>
&gt; languages such as C# which don&#39;t use the ScriptEngine api.<br>
<br>
</div>which is completely plausible; the two aren&#39;t actually linked in any way. we<br>
use packages for other things as well, e.g. themes.</blockquote><div>Yes, I can write a Ruby plugin type that would load pretending to be a C++ plugin and then load the ruby code using the plasma packaging api. It&#39;s just&nbsp; that it wouldn&#39;t be built into Plasma like the ScriptEngine/Package loading is. I think that is the best solution for KDE 4.1, and what I will try to actually implement.<br>
&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
&gt; C# is not a<br>
&gt; scripting language and I think people will expect either the C++ api or<br>
&gt; nothing<br>
<br>
</div>makes sense. in which case C# just becomes Another Language which libplasma is<br>
unaware of. this means less integration and no out of the box magic.</blockquote><div>Umm, the problem is that the current ScriptEngine api doesn&#39;t offer &#39;out of the box&#39; magic apart from the packaging mechanism. It may in the future, and maybe knowledge about the security api would affect my opinions. I can only see what I currently see in the code.<br>
&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
personally, i don&#39;t see why, in light of that, we need such languages, other<br>
than to inflate the language count, when we have a number of alternatives. but<br>
if people wish to write in C#, go for it by all means.</blockquote><div>Yes, I would class C# bindings in the &#39;for educational use&#39; category. That is a use case would be for people who want to spend a weekend or two playing with a language like C#, and a relatively small self contained api&nbsp; like the Plasma one, hacking up a clock or something with no practical value. Of course once we actually have C# programmers my opinion may well change.<br>
&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
&gt; - I really can&#39;t see how it would make sense to go through the<br>
&gt; ScriptEngine.<br>
<br>
</div>i don&#39;t want to compromise the tidyness of it on the libplasma side, however.<br>
<div class="Ih2E3d"><br>
&gt; There will be the same issue if we have Java QtJambi bindings<br>
&gt; I think. I have exchanged private emails with Aaron about whether or not<br>
&gt; Ruby should use the ScriptEngine, and I still am not keen on using it as it<br>
&gt; currently stands.<br>
<br>
</div>then it becomes like the C# issue above. a proper API for applets written in<br>
Ruby can also be provided via ScriptEngine at some point. it&#39;s not an<br>
either/or, it&#39;s really a matter of doing it in a way that lets plasma help you<br>
or whether you are completely on your own.<br>
<br>
obviously, integration points and easing support of managing packages, etc is<br>
probably the nicest thing. doesn&#39;t mean it&#39;s the only thing.<br>
<div class="Ih2E3d"><br>
&gt; &nbsp;I personally would prefer to get something going for 4.1 because I don&#39;t<br>
&gt; think we can know what people want - which languages, what skill level and<br>
&gt; so on - until we start iterating with something and get community feedback.<br>
<br>
</div>agreed; but what&#39;s actually *ready*?</blockquote><div>Well nobody is working on improving the script engine api, it has stayed unchanged for over 2 months. I did ask about the method to invoke a config dialog a while ago, saying that the ScriptEngine api didn&#39;t allow you to access a KConfig instance to save the api details. Of course you can just access the underlying applet to do that, but would that be following the script engine api? Or are you just supposed to go via the provided methods and wait for more methods to be added in the future.<br>
<br>From applet.cpp:<br><br>&nbsp;&nbsp;&nbsp; if (d-&gt;package &amp;&amp; d-&gt;configXml) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QString uiFile = d-&gt;package-&gt;filePath(&quot;mainconfigui&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (uiFile.isEmpty()) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KConfigDialog *dialog = new KConfigDialog(0, dialogId, d-&gt;configXml);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dialog-&gt;setWindowTitle(windowTitle);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dialog-&gt;setAttribute(Qt::WA_DeleteOnClose, true);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QUiLoader loader;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QFile f(uiFile);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!f.open(QIODevice::ReadOnly)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delete dialog;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (d-&gt;script) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d-&gt;script-&gt;showConfigurationInterface();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Why does this code suddenly lurch off into calling showConfigurationInterface(); if the scripting interface is being used? If I have configXml set I assume it means I actually want to dynamically load the .ui and .kcfg files and not have to intervene. I actually might want my scripting api to see a hash table of the config options if it doesn&#39;t have all the KConfigSkeleton classes wrapped. I we add KConfig specific calls to the ScriptEngine api you said last time I asked that it might mean it wasn&#39;t general enough to cater for non-Qt/KDE widgets such as dashboard. So how can the same api be just right for those entirely alien apis, and at the same time be good for near-KDE type apis.<br>
<br>The script engine interface makes assumptions about using dynamically loaded .ui files in other places when the Python, Ruby, C# and Java languages have all got perfectly good versions of the uic compiler:<br><br>void Applet::Private::setupScriptSupport()<br>
{<br>&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp; if (!package-&gt;filePath(&quot;mainconfigui&quot;).isEmpty()) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; q-&gt;setHasConfigurationInterface(true);<br>&nbsp;&nbsp;&nbsp; }<br><br>The point I am making is that nobody is using this code and it isn&#39;t receiving any developer/user feedback like the rest of Plasma is, and points like this aren&#39;t being addressed. If we leave it until 4.2 we will only have one opportunity to get it right.<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;"><br>
<div class="Ih2E3d"><br>
&gt; change. All I know is that the current group are all 100% &#39;ninja&#39; to use<br>
&gt; Aaron&#39;s terminology and would expect to be able to use the full C++ api. So<br>
<br>
</div>and we&#39;ll never get the other 98% of people unless we adjust ourselves from<br>
catering to those people.</blockquote><div>Well, that&#39;s your theory, and I have expectations based on understanding the current Ruby programmer user base. Until we have practical experience and have actually expanded the user base by 100x I don&#39;t think it is possible to argue one way or the other.<br>
&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
&gt; my plan for KDE 4.1 is to try and provide both a ScriptEngine based api,<br>
&gt; and the full C++ api (with or without proper plasma packaging), and get<br>
&gt; something moving.<br>
<br>
</div>cool; i guess that answers my what&#39;s actually read question above.<br>
<div class="Ih2E3d"><br>
&gt; In a couple of weeks we are having a hacker sprint in Berlin with a lot of<br>
&gt; the bindings guys (python, ruby, c# and php) and Kross too, and I would be<br>
&gt; very keen on discussing there what to do about Plasma bindings for KDE 4.1.<br>
<br>
</div>i just hope that the point, purpose and advantage of the ScriptEngine strategy<br>
isn&#39;t lost because people are still thinking about things in the traditional<br>
manner of &quot;wrap an API, it&#39;s what we want!&quot; versus &quot;define an API, it&#39;s what is<br>
manageable and increases the audience&quot;</blockquote>I&#39;m afraid it the purpose and advantage is lost because we have no practical experience. It may well be true that your ideas will work, but all I can say is that ideas about what end user programming should be about have a very long and distinguished history of being wrong. A good example is AppleScript with all those wonderful english-like constructs, which is actually pretty end-user hostile in practice as far as I know. Apple currently have a visual development tool at present for end users ,and maybe the best answer for Plasma would be to have something like that. Until we start trying things out, make mistakes and getting user feedback, I regard talk about increasing the audience as just talk. If we leave it all until 4.2 we will only really have one shot.<br>
<br>-- Richard<br></div><br>

------=_Part_33515_20951018.1214341938247--


More information about the Panel-devel mailing list