Helma Logo
main list history

Version 42 by tobi on 12. January 2007, 14:10

92Regarding localization, I suggest we discuss this in another thread or on another page, resp.// *tobi*
93
94(We could handle this by mapping one language to all the others. E.g. imagine a file like this:
95
96  no topics = Keine Themengebiete
97  1 topic = Ein Themengebiet
98  topics = Themengebiete
99
100If this was saved as e.g. "de_AT.locale" and parsed at startup, with an appropriate setting of the responsible locale a simple <code>param.prefix = getLocalizedString(param.prefix);</code> should be sufficient.) // *tobi*

Version 41 by tobi on 03. November 2006, 19:23

100If this was saved as e.g. "de_AT.locale" and parsed at startup, with an appropriate setting of the responsible locale a simple <code>param.prefix = getLocalizedString(param.prefix);</code> should be sufficient.) // *tobi*

Version 40 by tobi on 28. June 2006, 16:56

13# A skin is identified via a label using a new syntax (open for discussion, I am using three hash marks <code><% anchor %></code> in the example).
34    <% this.render skin="time#time" %>.
37    <% this.users.loop skin="user#user" %>
39    ###now<% anchor name="now" %>
42    ###time<% anchor name="time" %>
43    Today is <% this.render skin="now#now" %>.
44    ###user<% anchor name="user%>

Version 39 by tobi on 26. June 2006, 16:15

92Regarding localization, I suggest we discuss this in another thread or on another page, resp.

Version 38 by tobi on 26. June 2006, 16:14

92Regarding localization, I suggest we handle discuss this by mapping one language to all the others.in another thread or another page, Eresp.g. imagine a file like this:
94(We could handle this by mapping one language to all the others. E.g. imagine a file like this:
95
99If this was saved as e.g. "de_AT.locale" and parsed at startup, with an appropriate setting of the responsible locale a simple <code>param.prefix = getLocalizedString(param.prefix);</code> should be sufficient.
100

Version 37 by tobi on 26. June 2006, 15:35

92Regarding localization, I suggest we handle this by mapping one language to all the others. E.g. imagine a file like this:
93
94  no topics = Keine Themengebiete
95  1 topic = Ein Themengebiet
96  topics = Themengebiete
97
98If this was saved as e.g. "de_AT.locale" and parsed at startup, with an appropriate setting of the responsible locale a simple <code>param.prefix = getLocalizedString(param.prefix);</code> should be sufficient.
99

Version 36 by tobi on 26. June 2006, 15:27

63# Helma is automagically mapping all 1:1 child objects and 1:n collections of the current path handler to global handlershandlers: site.topics becomes "topics", topic.stories "stories". The handler of the default collection is named "children".

Version 35 by tobi on 26. June 2006, 15:26

88  <% topicstories.count prefix="(" suffix=")" %>

Version 34 by tobi on 26. June 2006, 15:25

60<em>Lets assume an antville-like object-structure. We have a skin on site-level, and want to display a localized h1-headerlist, a paragraph with a verbose localized string of the number of topics (=Site.topics.count()), and a table (with rows of alternating colors) of all topic names, and their number of stories (=Topic.count()). If no topics are present then the whole table should not be rendered.</em>
61

Version 33 by tobi on 26. June 2006, 15:22

80      skin="topicItem#topicItem" %>
82  <% anchor name="#topicItemtopicItem" %>

Version 32 by tobi on 26. June 2006, 15:17

61# Helma is automagically mapping all 1:1 child objects and 1:n collections of the current path handler to global handlers (the handlers. The handler of the default collection is named "children").

Version 31 by tobi on 26. June 2006, 15:15

61# Helma is automagically mapping all 1:1 child objects and 1:n collections of the current path handler to global handlershandlers (the default collection named "children").

Version 30 by tobi on 26. June 2006, 15:14

80      skin="#topicItemtopicItem" %>

Version 29 by tobi on 26. June 2006, 15:13

62# There is a HopObject-wide <code>count</code> macro that takes three additional parameters called "none", "one" and "many" of which only many "many" is rendered with the calculated actual number of itemsitems calculated by Helma.
63# topic.counter is a macro that gets its function body newly assigned each iterationiteration (needs to be elaborated).

Version 28 by tobi on 26. June 2006, 15:07

58== "Common Proposal Programming Task" scenario  ==
59

Version 27 by tobi on 26. June 2006, 14:57

61# There is a HopObject-wide <code>count</code> macro that takes three additional parameters called "none", "one" and "many" of which only many is rendered with the calculated number of items.
73      many=" topics" %>

Version 26 by tobi on 26. June 2006, 14:54

62# inline Inline skins work similar to HTML anchor elements. Helma should stop rendering the skin itself as soon as it detects an <code><% anchor %></code> macro. with With each following occurence of an <code><% anchor %></code> the previous anchor skin is ended and a new one begins.

Version 25 by tobi on 26. June 2006, 14:54

62# inline skins work similar to HTML anchor elements. Helma should stop rendering the skin itself as soon as it detects an <code><% anchor %></code> macro. with each following occurence of an <% <code><% anchor %> %></code> the previous anchor skin is ended and a new one begins.

Version 24 by tobi on 26. June 2006, 14:54

62# inline skins work similar to HTML anchor elements. Helma should stop rendering the skin itself as soon as it detects an <% <code><% anchor %> %></code> macro. with each following occurence of an <% anchor %> the previous anchor skin is ended and a new one begins.

Version 23 by tobi on 26. June 2006, 14:53

57<a name="cpt"></a>== "Common Proposal Task" scenario  ==
58== "Common Proposal Task" scenario  ==

Version 22 by tobi on 26. June 2006, 14:53

59  1. # Helma is automagically mapping all 1:1 child objects and 1:n collections of the current path handler to global handlers.
60  2. # topic.counter is a macro that gets its function body newly assigned each iteration.
61  3. # inline skins work similar to HTML anchor elements. Helma should stop rendering the skin itself as soon as it detects an <% anchor %> macro. with each following occurence of an <% anchor %> the previous anchor skin is ended and a new one begins.

Version 21 by tobi on 26. June 2006, 14:52

57<a name="cpt"></a>== "Common Proposal Task" scenario  ==
58Assumptions:
59  1. Helma is automagically mapping all 1:1 child objects and 1:n collections of the current path handler to global handlers.
60  2. topic.counter is a macro that gets its function body newly assigned each iteration.
61  3. inline skins work similar to HTML anchor elements. Helma should stop rendering the skin itself as soon as it detects an <% anchor %> macro. with each following occurence of an <% anchor %> the previous anchor skin is ended and a new one begins.
62
63  <h1>Headerlist<h1>
64  <small>(sorry, I currently have no idea what this headerlist thing is about...)</small>
65   
66  <p>
67  <% topics.count
68      prefix="Number of topics: "
69      none="no topics"
70      one="1 topic"
71      many="topics" %>
72  </p>
73   
74  <% topics.list
75      prefix="<table>"
76      suffix="</table>"
77      skin="#topicItem" %>
78   
79  <% anchor name="#topicItem" %>
80  <tr>
81  <td <% topic.counter odd='style="background-color: yellow;"' %>>
82  <% topic.name %>
83  <% topic.count prefix="(" suffix=")" %>
84  </td>
85  </tr>
86

Version 20 by tobi on 15. February 2006, 16:15

21...and some
22

Version 19 by tobi on 15. February 2006, 16:14

31    <% greeting %>, <% thissession.administratoruser.name %>!

Version 18 by tobi on 15. February 2006, 16:13

25# Certain macros already come implemented with useful parameter options. E.g. if the macro renders a number it should provide a way for reflecting the amount in the measure unit like "no comment", "one comment", "5 comments".

Version 17 by tobi on 15. February 2006, 16:03

28    <% define greeting="Hello" %>

Version 16 by tobi on 15. February 2006, 16:01

29    

Version 15 by tobi on 15. February 2006, 16:01

16# Skins can contain local symbols (or call it variables) containing a string value that can be re-used throughout one single skin. (Syntax open for discussion.
29

Version 14 by tobi on 15. February 2006, 16:00

37    
40    
43

Version 13 by tobi on 15. February 2006, 15:59

34    

Version 12 by tobi on 15. February 2006, 15:59

45    AdeleHello, Adele!
46    CarverHello, Carver!
47    DianeHello, Diane!

Version 11 by tobi on 15. February 2006, 15:56

28    <% greeting="Hello," <% this.administrator.name %>!%>
29    <% greeting %>, <% this.administrator.name %>!
38    Hello<% greeting %>, <% user.name %>!

Version 10 by tobi on 15. February 2006, 15:53

23# Each HopObject contains certain macros from scratch (e.g. loop w/ sorting, skin embedding etc.) -> scaffolding!

Version 9 by tobi on 15. February 2006, 15:51

15# Skin labels can are to be used as reference in a macrofunctions and macros. This provides both, familiar access to as well as advanced rendering (loops, switch/case-like conditions?) of skins.

Version 8 by tobi on 15. February 2006, 15:50

1From our experience with Helma's skin templating features we came to the following general conclusion conclusions for further developments in version 2.0:

Version 7 by tobi on 15. February 2006, 15:48

17# Macros in skins are delimited by <% %>&lt;% %&gt;.

Version 6 by tobi on 15. February 2006, 15:47

15# Skin labels can be used as reference in a macro. This provides both, familiar access to as well as advanced rendering (loops, switch/case-like conditions?) of skins.

Version 5 by tobi on 15. February 2006, 15:46

36    Today is <% skin namethis.render skin="now" %>.

Version 4 by tobi on 15. February 2006, 15:46

13# A skin is identified via a label using a new syntax (open for discussion, I am using three hash marks in the example).

Version 3 by tobi on 15. February 2006, 15:46

33    #now###now
35    #time###time
37    #user###user

Version 2 by tobi on 15. February 2006, 15:46

28    Hello, <% this.administrator.name %>!<br />%>!
29    <% this.render skin="time" %>.<br />
30    logged in:<br />in:
32
35
38
40    Hello, <% user.name %>!<br />%>!
41

Version 1 by tobi on 15. February 2006, 15:44

1From our experience with Helma's skin templating features we came to the following general conclusion for further developments in version 2.0:
2
3# Helma core has to remain as simple as we know it.
4# Separation of presentation and logic has priority.
5# Backwards-compatibility is required in any way.
6# Other concepts (templating engines) should only be considered as pluggable extensions to helma.
7
8That's why we come up with a
9
10== Rather rigid specification ==
11
12# Skin files can contain more than one skin meaning we can have similar structures with skins as we already have with JavaScript functions. (Yes, the skin file's name is irrelevant, then.)
13# A skin is identified via a label using a new syntax (open for discussion, I am using hash marks in the example).
14# There is only one single level of label hierarchy, ie. a flat collection of labels.
15# Skin labels can be used as reference in a macro. This provides both, familiar access to as well as advanced rendering (loops, conditions?) of skins.
16# Skins can contain local symbols (or call it variables) containing a string value that can be re-used throughout one single skin.
17# Macros in skins are delimited by <% %>.
18# There are no nested macros in macros. (I know, this will hardly stand the desire.)
19# Object mappings extend the macro handler for easier access to properties of the contained object.
20
21== Rather vague wishes ==
22
23# Each HopObject contains certain macros from scratch (e.g. loop w/ sorting, skin etc.) -> scaffolding!
24# HopObject properties and the corresponding form input in a skin (display, check, error messaging) are firmly and closely connected, generally and finally.
25
26== Example file ==
27
28    Hello, <% this.administrator.name %>!<br />
29    <% this.render skin="time" %>.<br />
30    There are currently <% this.users.size %> other users
31    logged in:<br />
32    <% this.users.loop skin="user" %>
33
34    #now
35    <% now format="EEE, dd.MM.yyyy, HH:mm'h'" %>
36
37    #time
38    Today is <% skin name="now" %>.
39
40    #user
41    Hello, <% user.name %>!<br />
42
43The imagined output of rendering the above skin:
44
45    Hello, Brian!
46    Today is Wed, 15.02.2006, 15:31h.
47    There are currently 3 other users logged in:
48    Adele
49    Carver
50    Diane