Hi Asiri,
On Thu, Sep 17, 2009 at 1:09 PM, <oana.tabaranu(a)xwiki.com> wrote:
Hi Asiri,
Here is some feedback about the live table since I have been using
it on
client projects:
+ things work well with the standard version
- I was a pain when I had to add a custom column with information
from
the documents in the live table
- performance when filtering a lot of documents
> Hi All,
>
>
> I'm working on designing LiveTable 2.0 macro, an xwiki/2.0 macro
> that is
> supposed to work similar to current LiveTable (say 1.0) Macro. By
> looking
> at
> LiveTable 1.0 macro code I encountered few problems that confuses
> me a
> lot.
>
> * First, LiveTable macro is different from other macros (those I
> have
seen
> /
> written so far) in which the generated content is "live"...
> Normally
> macros
> replaces the macro block with some other generated content but here
> LiveTable macro makes use of AJAX to fetch content dynamically.
> So the
> question, is LiveTable a macro or is it something else? Stuffing
> JavaScript/AJAX code inside a rendering 2.0 feels unfamiliar to me.
>
> * Second, existing LiveTable macro can be viewed in several ways:
>
> 1. Way of presenting a list of documents containing an object of a
> specific
> class.
>
> 2. Way of presenting a list of documents matching a criterion.
>
> 3. Generic way of presenting information mactching a criterion.
I would like the main purpose of the live table to be the display
of a
list of documents from the wiki.
It should be up to the user what documents the live table displays
(with
objects - 1, a query result -2).
> I'm having a hard time figuring out what should be the exact
> purpose of
> LiveTable 2.0 macro, should it be same as LiveTable 1.0 macro?
I agree with
Oana on this one. The Livetable can be used to suit
any of the
purposes you stated. However if we want to keep the macro as simple
as
possible we could use it only for purposes 1 & 2 and tell
developers to use
the underlying code when trying to achieve 3 since it most cases
that's what
they"ll end up doing when they want to add custom rows, data
sources etc...
1) is the most useful when it comes to writing basic applications -
it
would allow an application writer to
easily create a dynamic list
of the
items of any given class. I think it's the most important for
"basic" users
of this macro
2) is how the livetable is used on more ambitious applications,
requiring a
custom data source to be written -> it's used by "advanced" users
of the
livetable
That's not necessarily true.
The default JSON source supports tables without objects, and right now
supports certain filters (like document's space or the fact the
document
is orphaned or not). This is how are built the AllDocs, SpaceIndex and
OrphanedPages UIs in XE.
For me the 2.0 syntax livetable should be user-oriented, not
developer-oriented as the velocity one is, and doesn't need to support
custom JSON source (at least not in a first version).