~gdesklets-desklet-team/gdesklets/develbook

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<section id="ctrl-idea" xmlns:xi="http://www.w3.org/2001/XInclude">
  <title>Idea</title>

<section><title>Problems</title>

  <para><application>gDesklets</application> uses
    <link linkend="script">inline-scripts</link> for dynamic content.
    Because of the
    <link linkend="script-sandbox">sandboxed scripting environment</link>,
    it is not possible to access any system resources.</para>

  <para>Many applets share some common aspects of functionality. There needs
    to be a way to share that functionality among applets without duplicating
    it.</para>

</section>



<section><title>Past</title>

  <para>The concept of <emphasis>sensors</emphasis> solved the problems in
    some way. A sensor was a reusable module of privileged (unsandboxed) code.
    </para>

  <para>However, since the sensors framework was designed long before inline
    scripting, it cannot take advantage of the property based approach, which is
    the central idea behind inline-scripting. Another problem with sensors was
    a lack of separation between functionality and design of the applet. Thus
    many sensors tend to be not reusable very well.</para>

</section>



<section><title>Solution</title>

  <para>It has become necessary to design a new framework to replace the old
    sensors framework. Instead of sensors, the new framework is about
    <emphasis>controls</emphasis>.</para>

  <para>A control is a privileged (unsandboxed) property-based module, which
    can be shared among applets, and implements certain interfaces.</para>

</section>


</section>