Changes for page RealtimeLivetable

Last modified by Vincent Massol on 2024/02/26 17:54

<
From version < 3.1 >
edited by Clément Desableau
on 2020/05/06 17:36
To version < 3.2 >
edited by Clément Desableau
on 2020/05/07 10:08
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -10,11 +10,14 @@
10 10  == Backward Compatibility ==
11 11  
12 12  
13 -The new plugin has to be backward compatible with the previous version, at least for its early development. Thus nothing has to be changed from the Java side:
13 +The new plugin has to be "backward compatible" with the previous version, at least for its early development. Thus nothing has to be changed from the Java side:
14 14  
15 15  * the HTML should receive the Livetable template, containing all the needed metadata.
16 16  * the data should be provided to the Livetable as a JSON object.
17 17  
18 +If adding or improving features during the development requires changing macros in the server, it will be done.
19 +
20 +
18 18  == Migrating existing features ==
19 19  
20 20  
... ... @@ -30,7 +30,7 @@
30 30  
31 31  However, these features could be implemented differently from the first version, to allow more flexibility.
32 32  
33 -Their new implementation is discussed below.
36 +New implementation ideas are discussed below.
34 34  
35 35  
36 36  The new Livetable should also be compatible and adaptable with the current styling configuration of the wiki.
... ... @@ -102,17 +102,30 @@
102 102  
103 103  The end-goal would be to update in real-time not only the Livetables, but also any occurrence of an object in the wiki.
104 104  
105 -This is not part of the project, but this could be taken in account to built code that could extend to this purpose.
108 +User Case 4:
106 106  
110 +(% class="box" %)
111 +(((
112 +//user1//, is viewing the results a Livetable, and //user2// is browsing some wiki pages
107 107  
114 +* //user1// modify a property of an object directly from the Livetable
115 +* the object is modified on the server
116 +* //user2// have that property of the object displayed on its page, and it gets updated
117 +)))
108 108  
119 +This is not part of the project, but this could be taken in account, to built code that could extend to this purpose in the future.
120 +
121 +
122 +
109 109  = Implementation =
110 110  
111 111  
112 112  == The table ==
113 113  
128 +
114 114  === Solution 1 ===
115 115  
131 +
116 116  We could use a JavaScript library to create HTML tables from existing data. This would simplify and accelerate the development of the new Livetable.
117 117  
118 118  [[Tabulator.js>>http://tabulator.info/]] would be a great candidate for those reasons:
... ... @@ -135,6 +135,7 @@
135 135  
136 136  === Solution 2 ===
137 137  
154 +
138 138  We could also re-write entirely the Livetable component by ourselves. As opposed to the solution 1, this would imply more development time, but greater flexibility and maintainability.
139 139  
140 140  In this case, we could use some frameworks like [[vue.js>>https://vuejs.org/]] to fasten the development by automatically binding the HTML table to the JSON object.
... ... @@ -143,14 +143,16 @@
143 143  
144 144  == Real-time ==
145 145  
163 +
146 146  For now, there is no direct way to push data directly from the server to the client.
147 147  
148 -We can use the use the technologies used in cryptpad, allowing the server to push changes to the desired clients.
166 +We can use the use the the net-flux technology used in CryptPad, allowing the server to push changes to the desired clients.
149 149  
150 150  
151 151  
152 152  == Rethinking existing features ==
153 153  
172 +
154 154  The sort and filter option of the current Livetable works well, but they encounter limitations, coming from their design.
155 155  
156 156  Note: some of following proposals would imply to also modify the associated macros.
... ... @@ -158,6 +158,7 @@
158 158  
159 159  === Sorting ===
160 160  
180 +
161 161  For the moment, we can only sort the table according to one column.
162 162  
163 163  It would be nice to be able to sort according multiple column in the next design.
... ... @@ -165,6 +165,7 @@
165 165  
166 166  === Filtering ===
167 167  
188 +
168 168  For the moment, the filter only try to see if the rows match the specified text. It is not possible to check for the inequality of a number, nor for the range of a date for example.
169 169  
170 170  It would be nice to have more complex filtering options, corresponding to the following operators: "=", "≠", "≤", "≥", "between", "like", ...
... ... @@ -177,7 +177,10 @@
177 177  The combination of "AND" and "OR" operators should be kept intuitive though.
178 178  
179 179  
201 +There is also a way to filter by tags, but the current design seems like it's outside the Livetable component. We should find a solution to harmonize that way to filter with the main one.
180 180  
203 +
204 +
181 181  == Caching the data ==
182 182  
183 183  
... ... @@ -189,10 +189,9 @@
189 189  * If an object was updated, its cached version has to be updated too
190 190  * when sorting or filtering, cached data should be reused if possible
191 191  
192 -
193 193  In order to provide such a cache system, we can set up a web worker that is going to take care of the previous considerations.
194 194  
195 -The client will then be able to call the web worker without worrying if the data was previously cached.
218 +The client will then be able to call the web worker without worrying whether the data was previously cached.
196 196  
197 197  
198 198  

Get Connected