summaryrefslogtreecommitdiff
path: root/doc/dev-conventions.txt
blob: 07d026d78402cc98621d426b25c79251998ae7eb (plain)
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
49
50
51
52
53
54
55
Live development guidelines
===========================

This file contains some guidelines for developers about what to obey
when adding new functionality to live plugin.

First of all please look at the existing code and how it was done
there. We are still open for improvement suggestions though.

We want to support a broad range of browsers. On one side are hand held
devices like WEB-enabled PDAs or mobile phones. They often lack full
grown support for ECMAScript and have small screen sizes. The other
extreme are the desktop browsers like FireFox, Konqueror, Opera and
perhaps IE (if the 'powers that be' make him more CSS compliant).
Here WEB 2.0 features can improve the users experience.


With or without ECMAScript
--------------------------

Since not all browsers support ECMAScript, we suggest the following
rule to activate functionality with and without ECMAScript support:

Use anchors analog to this example

 <a href="show_content.html?ref=additional_content_ref"
 onclick="makefalse(requestbox('additional_content_ref'));">link</a>

to retrieve and display extra information either in a WEB 2.0 fashion
in an popup box or on a separte page in a html fashion.


Themeing
--------

Current CSS based themeing in live depends on additional stylesheets
and a configurable location to retrieve images from (see
css-themeing.txt).

Developers must use the <& pageelems.stylesheets &> component in their
pages to include both the default and the themed stylesheet. This is
the easy part, because stylesheets are referred in the header at a
central location.

More difficult is the access to images, which is spread around the
pages at the corresponding locations. To support this, a new method in
the live Setup class (see file setup.h) has been added. It is called
'GetThemedLink'. For every image, that might be customized, you must
use a img tag according to this example:

  <img src="<$ LiveSetup().GetThemedLink("img", "<imagename>") $>"
  alt="someimage" />

Please take a look in the existing ecpp pages for additional usage
examples.