r8 - 06 Feb 2008 - 23:50:48 - SvenDowideitYou are here: TWiki >  Codev Web > ChangeProposal > FeatureRequest > ExtractAndCentralizeFormattingRefactor
Tags:
, create new tag

Feature Proposal: Refactor format rendering to use ResultSets (adds paging, consistency and speed)

Motivation

We've known for a long time that we need to add scalable paging to our Searches, GROUPs and such. I propse we do this, by extracting the format= code from all the TML, and move that code to take a TWiki Iterator (the basis of what will become ResultSets). (and we expose that via Func). That way, we create one consistent formatting system, and will be able to add paging in a generic way to all tags.

AddUSERSLISTandGROUPSLIST is another example where we need to implement Paging - the Joomla and LDAP use cases are known to have way more users than should be displayed in one hit.

Description and Documentation

Extract the formatting stage from SEARCH and other tags, re-write it to use TWikiIterators? , with filtering, and late evaluation of Iterators where possible.

Crawford and I have been working towards this over the last years, but it needs a final push (ok, quite a lot of work) to get it completed.

Include adding and merging the TOM specifiers so that we have the same syntax in If, query SEARCH and format strings. see AddAttachmentsVarToFormattedSearch

probable outcomes

  • speedup oportunities - via late evaluation of iterators
  • consistent paging and formating parameters and code that will be reuseable by plugins
  • Would enable ResultSets that could then be used for nested operations
  • =%FORMAT{}% TML func that can be used to apply a format to any list of results - whether that is a SEARCH result, GROUP list, Saved Query Result - basically informs TWiki howto render ResultSets.

Examples

Impact

Implementation

-- Contributors: SvenDowideit - 15 Dec 2007

Discussion

Don't forget to add the DateOfCommitment wink I added 2007-12-15.

I support this proposal. It is a very much needed feature. Both for the core and for plugins.

-- KennethLavrsen - 17 Dec 2007

What does "using TWikiIterators? " mean for the end user who's used to type format="..." ? I don't know much about the concept of iterators so any clarification would be appreciated smile

-- CarloSchulz - 17 Dec 2007

for the user, the only thing they might notice, is that all the format= statements use a common syntax. Right now, some TWikiVariables? don't support $n some use $date - that sort of thing.

mostly, no change except for consistency, and a common paging scheme for all mulitple result tags.

-- SvenDowideit - 17 Dec 2007

An iterator would also be useful in templates. We could do away with SPLIT, and simplify code for lists of buttons.

For iterating over search results, see the proposal in SearchResultsPagination. Note the sort step and the need to have iterating controls.

-- ArthurClemens - 17 Dec 2007

Aha, what Arthur mentions brings up yet another proposal that will be more noticable... ResultSets - which will thus give us the need to add a =%FORMAT{}% function, that will use a specified (or named) result (aka, iterator, setting, search, GROUP)

-- SvenDowideit - 21 Dec 2007

Seems all are happy. Accepted by 14 day rule.

-- KennethLavrsen - 02 Jan 2008

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo